[][src]Struct trellis_m4::Keypad

pub struct Keypad { /* fields omitted */ }

NeoTrellis M4 Express 8x4 keypad

Implementations

impl Keypad[src]

pub fn decompose<'a>(&'a self) -> [[KeypadInput<'a>; 8]; 4][src]

Get a 2d array of embedded-hal input pins, each representing one key in the keypad matrix.

pub fn release(
    self
) -> ((OldInputPin<Pa18<Input<PullUp>>>, OldInputPin<Pa19<Input<PullUp>>>, OldInputPin<Pb22<Input<PullUp>>>, OldInputPin<Pb23<Input<PullUp>>>), (RefCell<OldOutputPin<Pa14<Output<OpenDrain>>>>, RefCell<OldOutputPin<Pa15<Output<OpenDrain>>>>, RefCell<OldOutputPin<Pa16<Output<OpenDrain>>>>, RefCell<OldOutputPin<Pa17<Output<OpenDrain>>>>, RefCell<OldOutputPin<Pa20<Output<OpenDrain>>>>, RefCell<OldOutputPin<Pa21<Output<OpenDrain>>>>, RefCell<OldOutputPin<Pa22<Output<OpenDrain>>>>, RefCell<OldOutputPin<Pa23<Output<OpenDrain>>>>))
[src]

Give back ownership of the row and column pins.

This consumes the keypad struct. All references to its virtual KeypadInput pins must have gone out of scope before you try to call .release(), or it will fail to compile. Opting in to the non-lexical lifetimes feature in your project can make that simpler.

The column pins will be returned inside of RefCells (because macros are hard). You can use .into_inner() to extract each column pin from its RefCell.

impl Keypad[src]

pub fn new(pins: Keypad, port: &mut Port) -> Self[src]

Create a new Keypad from the given pins

Auto Trait Implementations

impl Send for Keypad[src]

impl !Sync for Keypad[src]

impl Unpin for Keypad[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.