[][src]Struct matrix_rhal::gpio::bank::Bank

pub struct Bank<'a> {
    pub memory_offset: u16,
    pub timer_setup: u16,
    // some fields omitted
}

Bank contains functions to configure a PWM. A bank is a set of 4 pins, starting from pin 0 and going in order.

Bank 0: pins (0->3)

Bank 1: pins (4->8)

Bank 2: pins (9->12)

Bank 3: pins (13->16)

Fields

memory_offset: u16

FPGA memory offset

timer_setup: u16

Methods

impl<'a> Bank<'a>[src]

pub fn new(bus: &Bus) -> Bank[src]

Create a new instance of GPIO Bank.

pub fn new_set(bus: &Bus) -> Vec<Bank>[src]

Create 4 banks configured for use in a MATRIX device.

pub fn set_period(&self, period: u16)[src]

Set the period for PWM.

pub fn set_duty(&self, channel: u16, duty: u16)[src]

Set the duty cycle for PWM.

Trait Implementations

impl<'a> Clone for Bank<'a>[src]

impl<'a> Debug for Bank<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Bank<'a>

impl<'a> Send for Bank<'a>

impl<'a> Sync for Bank<'a>

impl<'a> Unpin for Bank<'a>

impl<'a> UnwindSafe for Bank<'a>

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.