179#define NILE_SPI_XCH_ERROR_MASK 0xFF00
#define NILE_SPI_BUFFER_IDX
#define NILE_SPI_MODE_WRITE
static bool nile_spi_tx_sync_block(const void __far *buf, uint16_t size)
Synchronously transfer block of data over the SPI interface.
bool nile_spi_wait_ready(void)
Wait until the SPI interface is ready. The maximum number of milliseconds for the wait is set using n...
bool nile_spi_set_speed(nile_spi_speed_t speed)
Safely set the speed used by the SPI controller.
void nile_spi_set_timeout(uint16_t ms)
Set the SPI communication timeout value, in milliseconds.
uint16_t nile_spi_xch(uint8_t value)
Synchronously exchange byte over the SPI interface.
bool nile_spi_set_control(uint16_t value)
Safely configure the control port.
uint16_t nile_spi_get_timeout(void)
Get the SPI communication timeout value, in milliseconds.
static bool nile_spi_tx_async(uint16_t size)
Asynchronously transfer block of data over the SPI interface.
bool nile_spi_abort(void)
Abort SPI transfer.
static void nile_spi_flip_buffer(void)
Flip the currently accessible SPI buffer.
bool nile_spi_rx_async(uint16_t size, uint16_t mode)
Asynchronously receive block of data over the SPI interface.
bool nile_spi_rx_sync_flip(uint16_t size, uint16_t mode)
Synchronously receive block of data over the SPI interface and flip the buffer so that it can be acce...
bool nile_spi_xch_block(void __far *buf, uint16_t size)
Synchronously exchange block of data over the SPI interface.
bool nile_spi_tx_async_block(const void __far *buf, uint16_t size)
Asynchronously transfer block of data over the SPI interface.
bool nile_spi_rx_sync_block(void __far *buf, uint16_t size, uint16_t mode)
Synchronously receive block of data over the SPI interface.
bool nile_spi_set_device(uint16_t device)
Safely set the device targetted by the SPI controller.
@ NILE_SPI_SPEED_384KHZ
384 KHz
@ NILE_SPI_SPEED_24MHZ
24 MHz (increased power draw)
@ NILE_SPI_SPEED_6MHZ
6 MHz on SPHINX, 384 KHz on ASWAN