Struct nrf52832_hal::twis::Twis [−][src]
pub struct Twis<T>(_)
where
T: Instance;
Expand description
Interface to a TWIS instance.
Implementations
impl<T> Twis<T> where
T: Instance,
[src]
impl<T> Twis<T> where
T: Instance,
[src]pub fn new(twis: T, pins: Pins, address0: u8) -> Twis<T>
[src]
pub fn set_address1(&self, address1: u8) -> &Twis<T>
[src]
pub fn set_address1(&self, address1: u8) -> &Twis<T>
[src]Configures secondary I2C address.
pub fn set_orc(&self, orc: u8) -> &Twis<T>
[src]
pub fn set_orc(&self, orc: u8) -> &Twis<T>
[src]Sets the over-read character (character sent on over-read of the transmit buffer).
pub fn enable_interrupt(&self, event: TwiEvent) -> &Twis<T>
[src]
pub fn enable_interrupt(&self, event: TwiEvent) -> &Twis<T>
[src]Enables interrupt for specified command.
pub fn disable_interrupt(&self, event: TwiEvent) -> &Twis<T>
[src]
pub fn disable_interrupt(&self, event: TwiEvent) -> &Twis<T>
[src]Disables interrupt for specified command.
pub fn reset_events(&self)
[src]
pub fn reset_events(&self)
[src]Resets read and write events.
pub fn reset_event(&self, event: TwiEvent)
[src]
pub fn reset_event(&self, event: TwiEvent)
[src]Resets specified event.
pub fn address_match(&self) -> u8
[src]
pub fn address_match(&self) -> u8
[src]Returns matched address for latest command.
pub fn is_event_triggered(&self, event: TwiEvent) -> bool
[src]
pub fn is_event_triggered(&self, event: TwiEvent) -> bool
[src]Checks if specified event has been triggered.
pub fn is_overflow(&self) -> bool
[src]
pub fn is_overflow(&self) -> bool
[src]Checks if RX buffer overflow was detected.
pub fn is_data_nack(&self) -> bool
[src]
pub fn is_data_nack(&self) -> bool
[src]Checks if NACK was sent after receiving a data byte.
pub fn is_overread(&self) -> bool
[src]
pub fn is_overread(&self) -> bool
[src]Checks if TX buffer over-read was detected and ORC was clocked out.
pub fn event_read(&self) -> &Reg<u32, _EVENTS_READ>
[src]
pub fn event_read(&self) -> &Reg<u32, _EVENTS_READ>
[src]Returns reference to READ
event endpoint for PPI.
pub fn event_write(&self) -> &Reg<u32, _EVENTS_WRITE>
[src]
pub fn event_write(&self) -> &Reg<u32, _EVENTS_WRITE>
[src]Returns reference to WRITE
event endpoint for PPI.
pub fn event_stopped(&self) -> &Reg<u32, _EVENTS_STOPPED>
[src]
pub fn event_stopped(&self) -> &Reg<u32, _EVENTS_STOPPED>
[src]Returns reference to STOPPED
event endpoint for PPI.
pub fn event_error(&self) -> &Reg<u32, _EVENTS_ERROR>
[src]
pub fn event_error(&self) -> &Reg<u32, _EVENTS_ERROR>
[src]Returns reference to ERROR
event endpoint for PPI.
pub fn event_rx_started(&self) -> &Reg<u32, _EVENTS_RXSTARTED>
[src]
pub fn event_rx_started(&self) -> &Reg<u32, _EVENTS_RXSTARTED>
[src]Returns reference to RXSTARTED
event endpoint for PPI.
pub fn event_tx_started(&self) -> &Reg<u32, _EVENTS_TXSTARTED>
[src]
pub fn event_tx_started(&self) -> &Reg<u32, _EVENTS_TXSTARTED>
[src]Returns reference to TXSTARTED
event endpoint for PPI.
pub fn task_stop(&self) -> &Reg<u32, _TASKS_STOP>
[src]
pub fn task_stop(&self) -> &Reg<u32, _TASKS_STOP>
[src]Returns reference to STOP
task endpoint for PPI.
pub fn task_suspend(&self) -> &Reg<u32, _TASKS_SUSPEND>
[src]
pub fn task_suspend(&self) -> &Reg<u32, _TASKS_SUSPEND>
[src]Returns reference to SUSPEND
task endpoint for PPI.
pub fn task_resume(&self) -> &Reg<u32, _TASKS_RESUME>
[src]
pub fn task_resume(&self) -> &Reg<u32, _TASKS_RESUME>
[src]Returns reference to RESUME
task endpoint for PPI.
pub fn task_prepare_rx(&self) -> &Reg<u32, _TASKS_PREPARERX>
[src]
pub fn task_prepare_rx(&self) -> &Reg<u32, _TASKS_PREPARERX>
[src]Returns reference to PREPARERX
task endpoint for PPI.
pub fn task_prepare_tx(&self) -> &Reg<u32, _TASKS_PREPARETX>
[src]
pub fn task_prepare_tx(&self) -> &Reg<u32, _TASKS_PREPARETX>
[src]Returns reference to PREPARETX
task endpoint for PPI.
pub fn tx_blocking(&mut self, buffer: &[u8]) -> Result<(), Error>
[src]
pub fn tx_blocking(&mut self, buffer: &[u8]) -> Result<(), Error>
[src]Write to an I2C controller.
The buffer must reside in RAM and have a length of at most 255 bytes on the nRF52832 and at most 65535 bytes on the nRF52840.
pub fn rx_blocking(&mut self, buffer: &mut [u8]) -> Result<(), Error>
[src]
pub fn rx_blocking(&mut self, buffer: &mut [u8]) -> Result<(), Error>
[src]Read from an I2C controller.
The buffer must have a length of at most 255 bytes on the nRF52832 and at most 65535 bytes on the nRF52840.
pub fn rx<W, B>(self, buffer: B) -> Result<Transfer<T, B>, Error> where
B: WriteBuffer<Word = W> + 'static,
[src]
pub fn rx<W, B>(self, buffer: B) -> Result<Transfer<T, B>, Error> where
B: WriteBuffer<Word = W> + 'static,
[src]Receives data into the given buffer
. Buffer must be located in RAM.
Returns a value that represents the in-progress DMA transfer.
Auto Trait Implementations
impl<T> Send for Twis<T> where
T: Send,
T: Send,
impl<T> Sync for Twis<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Twis<T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CheckedAs for T
[src]
impl<T> CheckedAs for T
[src]pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]
pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]Casts the value.
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]pub fn lossless_try_into(self) -> Option<Dst>
[src]
pub fn lossless_try_into(self) -> Option<Dst>
[src]Performs the conversion.
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]pub fn lossy_into(self) -> Dst
[src]
pub fn lossy_into(self) -> Dst
[src]Performs the conversion.
impl<T> OverflowingAs for T
[src]
impl<T> OverflowingAs for T
[src]pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]
pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]Casts the value.
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> SaturatingAs for T
[src]
impl<T> SaturatingAs for T
[src]pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]
pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]Casts the value.
impl<T> UnwrappedAs for T
[src]
impl<T> UnwrappedAs for T
[src]pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]
pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]Casts the value.
impl<T> WrappingAs for T
[src]
impl<T> WrappingAs for T
[src]pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]
pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]Casts the value.