[−][src]Struct matrix_rhal::gpio::bank::Bank
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,