pub struct SPIImpl<IF> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<IF: SPI01> SPI for SPIImpl<IF>
impl<IF: SPI01> SPI for SPIImpl<IF>
Source§fn configure(
&self,
work_mode: work_mode,
frame_format: frame_format,
data_bit_length: u8,
endian: u32,
instruction_length: u8,
address_length: u8,
wait_cycles: u8,
instruction_address_trans_mode: aitm,
tmod: tmod,
)
fn configure( &self, work_mode: work_mode, frame_format: frame_format, data_bit_length: u8, endian: u32, instruction_length: u8, address_length: u8, wait_cycles: u8, instruction_address_trans_mode: aitm, tmod: tmod, )
Configure SPI transaction
Source§fn set_clk_rate(&self, spi_clk: u32) -> u32
fn set_clk_rate(&self, spi_clk: u32) -> u32
Set SPI clock rate
Source§fn recv_data_dma(
&self,
dmac: &DMAC,
channel_num: dma_channel,
chip_select: u32,
rx: &mut [u32],
)
fn recv_data_dma( &self, dmac: &DMAC, channel_num: dma_channel, chip_select: u32, rx: &mut [u32], )
Receive 32-bit data using DMA.
Source§fn send_data_dma(
&self,
dmac: &DMAC,
channel_num: dma_channel,
chip_select: u32,
tx: &[u32],
)
fn send_data_dma( &self, dmac: &DMAC, channel_num: dma_channel, chip_select: u32, tx: &[u32], )
Send 32-bit data using DMA. If you want to use this function to send 8-bit or 16-bit data, you need to wrap each data unit in a 32-bit word. This is intentionally left to the caller: the difficulty here is to avoid the need for alloc/freeing() buffers every time as the SDK does because this is highly undesirable!
Source§fn fill_data_dma(
&self,
dmac: &DMAC,
channel_num: dma_channel,
chip_select: u32,
value: u32,
tx_len: usize,
)
fn fill_data_dma( &self, dmac: &DMAC, channel_num: dma_channel, chip_select: u32, value: u32, tx_len: usize, )
Send repeated data (using DMA)
Auto Trait Implementations§
impl<IF> Freeze for SPIImpl<IF>where
IF: Freeze,
impl<IF> RefUnwindSafe for SPIImpl<IF>where
IF: RefUnwindSafe,
impl<IF> Send for SPIImpl<IF>where
IF: Send,
impl<IF> Sync for SPIImpl<IF>where
IF: Sync,
impl<IF> Unpin for SPIImpl<IF>where
IF: Unpin,
impl<IF> UnwindSafe for SPIImpl<IF>where
IF: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more