embassy-stm32

Crates

0.1.0

Versions

stm32l496ze

Flavors

Struct TIM16

Source
pub struct TIM16 { /* private fields */ }
Expand description

TIM16 peripheral

Implementations§

Source§

impl TIM16

Source

pub unsafe fn steal() -> Self

Unsafely create an instance of this peripheral out of thin air.

§Safety

You must ensure that you’re only using one instance of this type at a time.

Trait Implementations§

Source§

impl Basic16bitInstance for TIM16

Source§

type Interrupt = TIM1_UP_TIM16

Interrupt for this timer.
Source§

fn regs() -> TimBasic

Get access to the basic 16bit timer registers. Read more
Source§

fn start(&mut self)

Start the timer.
Source§

fn stop(&mut self)

Stop the timer.
Source§

fn reset(&mut self)

Reset the counter value to 0
Source§

fn set_frequency(&mut self, frequency: Hertz)

Set the frequency of how many times per second the timer counts up to the max value or down to 0. Read more
Source§

fn clear_update_interrupt(&mut self) -> bool

Clear update interrupt. Read more
Source§

fn enable_update_interrupt(&mut self, enable: bool)

Enable/disable the update interrupt.
Source§

fn enable_update_dma(&mut self, enable: bool)

Enable/disable the update dma.
Source§

fn get_update_dma_state(&self) -> bool

Get the update dma enable/disable state.
Source§

fn set_autoreload_preload(&mut self, enable: bool)

Enable/disable autoreload preload.
Source§

fn get_frequency(&self) -> Hertz

Get the timer frequency.
Source§

impl BreakInputPin<TIM16> for PB5

Source§

fn af_num(&self) -> u8

Get the AF number needed to use this pin as BreakInputPin
Source§

impl CaptureCompare16bitInstance for TIM16

Source§

fn enable_outputs(&mut self)

Enable timer outputs.
Source§

fn set_input_capture_filter(&mut self, channel: Channel, icf: Icf)

Set input capture filter.
Source§

fn clear_input_interrupt(&mut self, channel: Channel)

Clear input interrupt.
Source§

fn enable_input_interrupt(&mut self, channel: Channel, enable: bool)

Enable input interrupt.
Source§

fn set_input_capture_prescaler(&mut self, channel: Channel, factor: u8)

Set input capture prescaler.
Source§

fn set_input_ti_selection(&mut self, channel: Channel, tisel: InputTISelection)

Set input TI selection.
Source§

fn set_input_capture_mode(&mut self, channel: Channel, mode: InputCaptureMode)

Set input capture mode.
Source§

fn set_output_compare_mode(&mut self, channel: Channel, mode: OutputCompareMode)

Set output compare mode.
Source§

fn set_output_polarity(&mut self, channel: Channel, polarity: OutputPolarity)

Set output polarity.
Source§

fn enable_channel(&mut self, channel: Channel, enable: bool)

Enable/disable a channel.
Source§

fn get_channel_enable_state(&self, channel: Channel) -> bool

Get enable/disable state of a channel
Source§

fn set_compare_value(&mut self, channel: Channel, value: u16)

Set compare value for a channel.
Source§

fn get_capture_value(&mut self, channel: Channel) -> u16

Get capture value for a channel.
Source§

fn get_max_compare_value(&self) -> u16

Get max compare value. This depends on the timer frequency and the clock frequency from RCC.
Source§

fn get_compare_value(&self, channel: Channel) -> u16

Get compare value for a channel.
Source§

fn set_output_compare_preload(&mut self, channel: Channel, preload: bool)

Set output compare preload.
Source§

impl Channel1ComplementaryPin<TIM16> for PB6

Source§

fn af_num(&self) -> u8

Get the AF number needed to use this pin as Channel1ComplementaryPin
Source§

impl Channel1Pin<TIM16> for PA6

Source§

fn af_num(&self) -> u8

Get the AF number needed to use this pin as Channel1Pin
Source§

impl Channel1Pin<TIM16> for PB8

Source§

fn af_num(&self) -> u8

Get the AF number needed to use this pin as Channel1Pin
Source§

impl Channel1Pin<TIM16> for PE0

Source§

fn af_num(&self) -> u8

Get the AF number needed to use this pin as Channel1Pin
Source§

impl GeneralPurpose16bitInstance for TIM16

Source§

fn regs_gp16() -> TimGp16

Get access to the general purpose 16bit timer registers. Read more
Source§

fn set_counting_mode(&mut self, mode: CountingMode)

Set counting mode.
Source§

fn get_counting_mode(&self) -> CountingMode

Get counting mode.
Source§

fn set_clock_division(&mut self, ckd: Ckd)

Set clock divider.
Source§

impl Peripheral for TIM16

Source§

type P = TIM16

Peripheral singleton type
Source§

unsafe fn clone_unchecked(&self) -> Self::P

Unsafely clone (duplicate) a peripheral singleton. Read more
Source§

fn into_ref<'a>(self) -> PeripheralRef<'a, Self::P>
where Self: 'a,

Convert a value into a PeripheralRef. Read more
Source§

impl RccPeripheral for TIM16

Source§

impl UpDma<TIM16> for DMA1_CH3

Source§

fn request(&self) -> Request

Get the DMA request number needed to use this channel asUpDma Note: in some chips, ST calls this the “channel”, and calls channels “streams”. embassy-stm32 always uses the “channel” and “request number” names.
Source§

impl UpDma<TIM16> for DMA1_CH6

Source§

fn request(&self) -> Request

Get the DMA request number needed to use this channel asUpDma Note: in some chips, ST calls this the “channel”, and calls channels “streams”. embassy-stm32 always uses the “channel” and “request number” names.
Source§

impl Basic16bitInstance for TIM16

Source§

impl CaptureCompare16bitInstance for TIM16

Source§

impl GeneralPurpose16bitInstance for TIM16

Source§

impl RccPeripheral for TIM16

Auto Trait Implementations§

§

impl Freeze for TIM16

§

impl RefUnwindSafe for TIM16

§

impl Send for TIM16

§

impl Sync for TIM16

§

impl Unpin for TIM16

§

impl UnwindSafe for TIM16

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.