Struct InkyBoard

Source
pub struct InkyBoard<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> InkyBoard<'a>

Source

pub fn get() -> InkyBoard<'a>

Source

pub fn leds(&self) -> &Leds

Source

pub fn spi_bus(&self) -> &Spi

Source

pub fn sync_pcf_to_rtc(&self)

Source

pub fn sync_rtc_to_pcf(&self)

Source

pub fn buttons(&self) -> &mut Buttons

Source

pub fn set_rtc_and_pcf(&self, v: Time)

Source

pub fn wake_reason(&self) -> WakeReason

Source

pub fn i2c_bus(&self) -> &I2cController

Source

pub fn pcf(&'a self) -> &'a mut PcfRtc<'a>

Source

pub fn sd_card(&self) -> Storage<Card<'_>>

Source

pub fn shift_register(&self) -> &ShiftRegister

Source

pub fn set_rtc_wake(&self, secs: u32) -> Result<u32, RtcError>

Returns wait period in milliseconds.

Source

pub unsafe fn power_off(&self)

SAFETY: This is unsafe as this will immediately power off the device if it’s on LIPO/Battery power. Make sure to sync and finish all work beforehand.

This has no affect if powered by USB or External (non-Battery) and cannot be ‘!’.

Source

pub unsafe fn deep_sleep(&self, secs: u32) -> Result<(), RtcError>

SAFETY: This is unsafe as this will immediately power off the device if it’s on LIPO/Battery power. Make sure to sync and finish all work beforehand.

The device will wake up after the specified number of seconds. If powered externally by USB or External (non-Battery), the device will sleep for the period of time instead.

Methods from Deref<Target = Pico>§

Source

pub fn sleep(&self, ms: u32)

Source

pub fn timer(&self) -> &Timer

Source

pub fn rtc(&self) -> &RtcClock

Source

pub fn sleep_us(&self, us: u32)

Source

pub fn system_freq(&self) -> u32

Source

pub fn current_tick(&self) -> u64

Source

pub fn watchdog(&self) -> &Watchdog

Source

pub fn system_clock(&self) -> &Clock

Source

pub fn pin(&self, p: PinID) -> Pin<Output>

Trait Implementations§

Source§

impl Deref for InkyBoard<'_>

Source§

type Target = Pico

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Pico

Dereferences the value.

Auto Trait Implementations§

§

impl<'a> Freeze for InkyBoard<'a>

§

impl<'a> !RefUnwindSafe for InkyBoard<'a>

§

impl<'a> !Send for InkyBoard<'a>

§

impl<'a> !Sync for InkyBoard<'a>

§

impl<'a> Unpin for InkyBoard<'a>

§

impl<'a> !UnwindSafe for InkyBoard<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.