CRTP adapter mapping BaseSpi::Transfer onto at25040::SpiInterface.
More...
#include <At25040Handler.h>
|
| | At25040SpiAdapter (BaseSpi &spi) noexcept |
| |
| bool | transfer (const uint8_t *tx, uint8_t *rx, std::size_t len, uint32_t timeout_ms) |
| | Full-duplex transfer used by the AT25040 driver.
|
| |
| void | delay_us (uint32_t us) noexcept |
| | Optional driver hook: sleep between RDSR polls of the write cycle.
|
| |
CRTP adapter mapping BaseSpi::Transfer onto at25040::SpiInterface.
◆ At25040SpiAdapter()
| At25040SpiAdapter::At25040SpiAdapter |
( |
BaseSpi & |
spi | ) |
|
|
inlineexplicitnoexcept |
- Parameters
-
| spi | Host SPI device; must outlive this adapter. |
◆ delay_us()
| void At25040SpiAdapter::delay_us |
( |
uint32_t |
us | ) |
|
|
inlinenoexcept |
Optional driver hook: sleep between RDSR polls of the write cycle.
- Parameters
-
| us | Microseconds (the driver asks for 100 µs). |
◆ transfer()
| bool At25040SpiAdapter::transfer |
( |
const uint8_t * |
tx, |
|
|
uint8_t * |
rx, |
|
|
std::size_t |
len, |
|
|
uint32_t |
timeout_ms |
|
) |
| |
|
inline |
Full-duplex transfer used by the AT25040 driver.
- Parameters
-
| tx | Transmit buffer (may be nullptr to clock zeros). |
| rx | Receive buffer (may be nullptr to discard). |
| len | Byte count. |
| timeout_ms | Transfer deadline. |
- Returns
- true when
BaseSpi::Transfer reports success.
◆ spi_
| BaseSpi& At25040SpiAdapter::spi_ |
|
private |
The documentation for this class was generated from the following file: