Skip to main content

PortFunction

Enum PortFunction 

Source
#[repr(u8)]
pub enum PortFunction {
Show 16 variants HiZ = 0, Agt = 1, Gpt0 = 2, Gpt1 = 3, Sci0 = 4, Sci1 = 5, Spi = 6, I2c = 7, Kint = 8, ClkCmpRtc = 9, CacAdc = 10, Ctsu = 12, Slcdc = 13, Can = 16, Ssie = 18, UsbFs = 19,
}
Expand description

Additional, non-GPIO, functions that can be assigned to a pin.

Not every function applies to every pin. See tables 19.5–19.17 in the reference manual for details.

Variants§

§

HiZ = 0

Hi-Z / JTAG / SWD

§

Agt = 1

Low-Power Asynchronous General Purpose Timer

§

Gpt0 = 2

General PWM Timer

§

Gpt1 = 3

General PWM Timer

§

Sci0 = 4

Serial Communications Interface

§

Sci1 = 5

Serial Communications Interface

§

Spi = 6

Serial Peripheral Interface

§

I2c = 7

Inter-Integrated Circuit Bus Interface

§

Kint = 8

Key Interrupt Function

§

ClkCmpRtc = 9

CLKOUT / Analog Comparator / Real-Time Clock

§

CacAdc = 10

Clock Frequency Accuracy / ADC14

§

Ctsu = 12

Capacitive Touch

§

Slcdc = 13

Segment LCD

§

Can = 16

Controller Area Network Bus

§

Ssie = 18

Serial Sound Interface Enhanced

§

UsbFs = 19

USB Full-Speed

Trait Implementations§

Source§

impl Clone for PortFunction

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PortFunction

Source§

impl From<PortFunction> for PortFunction

Source§

fn from(value: PortFunction) -> Self

Converts to this type from the input type.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.