Enum AlternateFunction

Source
#[repr(u32)]
pub enum AlternateFunction {
Show 16 variants AF0 = 0, AF1 = 1, AF2 = 2, AF3 = 3, AF4 = 4, AF5 = 5, AF6 = 6, AF7 = 7, AF8 = 8, AF9 = 9, AF10 = 10, AF11 = 11, AF12 = 12, AF13 = 13, AF14 = 14, AF15 = 15,
}
Expand description

Alternate functions that may be assigned to a Pin.

GPIO pins on the STM32303vct6 may serve multiple functions. In addition to the default functionality, each pin can be assigned up to sixteen different alternate functions. The various functions for each pin are described in “Alternate Function”“ section of the STM32303vct6 datasheet1.

Alternate Function bit mapping is shown here2.


  1. Section 4, Pinout and pin description, Table 14. Alternate function, pages 45-52 

  2. Section 7.4.9, page 192 of Reference Manual // TODO 

Variants§

§

AF0 = 0

§

AF1 = 1

§

AF2 = 2

§

AF3 = 3

§

AF4 = 4

§

AF5 = 5

§

AF6 = 6

§

AF7 = 7

§

AF8 = 8

§

AF9 = 9

§

AF10 = 10

§

AF11 = 11

§

AF12 = 12

§

AF13 = 13

§

AF14 = 14

§

AF15 = 15

Auto Trait Implementations§

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.