[][src]Struct apigpio::ConnectionCore

pub struct ConnectionCore { /* fields omitted */ }

Most of the Connection methods, mirroring pigpiod_if2, are actually provided here.

Where methods are named after a facility in pigpiod_if2 http://abyz.me.uk/rpi/pigpio/pdif2.html they perform the same function here. Documentation here in agpipio is present only if there is something unusual.

Methods

impl ConnectionCore[src]

pub async fn set_mode<'_>(&'_ self, pin: Pin, mode: GpioMode) -> Result<()>[src]

pub async fn get_mode<'_>(&'_ self, pin: Pin) -> Result<GpioMode>[src]

pub async fn set_pull_up_down<'_>(
    &'_ self,
    pin: Word,
    pud: PullUpDown
) -> Result<()>
[src]

pub async fn gpio_read<'_>(&'_ self, pin: Pin) -> Result<Level>[src]

pub async fn gpio_write<'_>(&'_ self, pin: Pin, level: Level) -> Result<()>[src]

pub async fn wave_clear<'_>(&'_ self) -> Result<()>[src]

pub async fn wave_add_new<'_>(&'_ self) -> Result<WaveId>[src]

pub async fn wave_create<'_>(&'_ self) -> Result<WaveId>[src]

Caller is responsible for not calling wave_* functions for multiple purposes concurrently - ie, for enforcing the concurrency control implied by pigpiod's interface.

Getting this wrong is not a memory safety concern (hence the lack of unsafe) but would cause wrong behaviours.

Note that this applies even across multiple different pigpiod clients.

pub async unsafe fn wave_delete<'_>(&'_ self, wave: WaveId) -> Result<()>[src]

This is safe if no-one in the whole system ever calls wave_send_using_mode with mode *SYNC*. See the pigpio documentation on wave_send_using_mode for full details.

pub async fn wave_send_once<'_>(&'_ self, wave: WaveId) -> Result<Word>[src]

pub async fn wave_send_repeat<'_>(&'_ self, wave: WaveId) -> Result<Word>[src]

pub async fn wave_tx_stop<'_>(&'_ self) -> Result<()>[src]

pub async fn wave_tx_at<'_>(&'_ self) -> Result<Option<WaveId>>[src]

pub async fn wave_tx_busy<'_>(&'_ self) -> Result<bool>[src]

pub async fn wave_add_generic<'_, '_>(
    &'_ self,
    pulses: &'_ [Pulse]
) -> Result<Word>
[src]

pub async fn wave_get_micros<'_>(&'_ self) -> Result<Word>[src]

pub async fn wave_get_high_micros<'_>(&'_ self) -> Result<Word>[src]

pub async fn wave_get_max_micros<'_>(&'_ self) -> Result<Word>[src]

pub async unsafe fn wave_send_using_mode<'_>(
    &'_ self,
    wave: WaveId,
    txmode: Word
) -> Result<Word>
[src]

Caller must ensure that if txmode is *SYNC* the "bad things" described in the pigpio docs do not happen.

If any calls to this function use *SYNC*, then wave_delete is potentially unsafe and all calls to it must be checked.

Note that because everything is shared amongst all clients of pigpiod, this might involve auditing your process handling etc.

Caller must also ensure that txmode is a valid value. If it is not then possibly it invokes some hazardous new feature of pigpiod.

Auto Trait Implementations

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, 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.