Skip to main content

ChannelEnable

Trait ChannelEnable 

Source
pub trait ChannelEnable<const C: u8>: Instance {
    // Required methods
    fn set_chxen(&mut self, on: bool);
    fn set_chxie(&mut self, on: bool);
    fn read_chxie(&self) -> bool;
    fn read_chxif(&self) -> bool;
    fn clear_chxif(&mut self);
}
Expand description

The switch turning channel C on, whichever direction it points.

CHxEN releases the output on a compare channel and arms the latch on a capture one. Implemented for the timer/channel pairs that exist: TIMER13 has channel 0 alone, TIMER5 none at all.

Required Methods§

Source

fn set_chxen(&mut self, on: bool)

Enables or disables the channel, leaving its setup in place.

Source

fn set_chxie(&mut self, on: bool)

Lets this channel’s event through to the NVIC. The flag is raised either way, and every channel shares the timer’s one interrupt line.

Source

fn read_chxie(&self) -> bool

Whether this channel’s event reaches the NVIC.

Source

fn read_chxif(&self) -> bool

Channel flag — a capture latched or a compare matched, depending on the role the channel is in. Set by hardware, never cleared by it.

Source

fn clear_chxif(&mut self)

Clears the channel flag.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl ChannelEnable<0> for Timer0

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<0> for Timer2

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<0> for Timer13

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<0> for Timer15

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<0> for Timer16

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<1> for Timer0

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<1> for Timer2

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<2> for Timer0

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<2> for Timer2

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<3> for Timer0

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Source§

impl ChannelEnable<3> for Timer2

Source§

fn set_chxen(&mut self, on: bool)

Source§

fn set_chxie(&mut self, on: bool)

Source§

fn read_chxie(&self) -> bool

Source§

fn read_chxif(&self) -> bool

Source§

fn clear_chxif(&mut self)

Implementors§