Trait stm32_extras::GPIOExtras [] [src]

pub trait GPIOExtras<T> {
    fn write_pin_range(&self, offset: usize, count: usize, data: u16);
fn read_pin_range(&self, offset: usize, count: usize) -> u16;
fn pin_config(&self, pin: usize) -> &T; fn write_pin(&self, offset: usize, bit: bool) { ... }
fn read_pin(&self, offset: usize) -> bool { ... } }

Convenient access to the bit blocks on GPIO ports.

Required Methods

Set count bits on the GPIO port starting from the bit number offset. Other bits are not affected. Uses BSRR register to set/clear individual bits. Bits must fit into 16 bits of the GPIO port.

Get count bits on the GPIO port starting from the bit number offset.

Get access to configuration bits for pin of GPIO port.

Provided Methods

Set single bit at the given offset in GPIO port. offset must be in the range 0..16.

Get single bit at the given offset in GPIO port. offset must be in the range 0..16.

Implementors