Enum saks::PinMode [−][src]
#[repr(u32)] pub enum PinMode { Input, Output, }
Expand description
bcm2711-peripherals.pdf page 66:
The FSELn field determines the functionality of the nth GPIO pin
GPFSEL0-GPFSEL5: 这组6个寄存器都是控制每个GPIO的模式 每个寄存器每3bit控制一个GPIO,例如GPFSEL0的bit[3..=5]控制GPIO1的模式 bit[30..=31]没用,仅用于32bit对齐寄存器
例如蜂鸣器连向BCM12的引脚,计算12/10得知需要GPFSEL1来控制蜂鸣器引脚的模式 也就是mmap上索引为1的寄存器
Variants
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PinMode
impl UnwindSafe for PinMode