57 #ifndef CONFIG_USART_SPI_DUMMY 58 #define CONFIG_USART_SPI_DUMMY 0xFF 81 spi_flags_t flags,
unsigned long baud_rate, board_spi_select_id_t sel_id);
uint32_t usart_spi_write_packet(Usart *p_usart, const uint8_t *data, size_t len)
Send a sequence of bytes to an SPI device using USART in SPI mode.
void usart_spi_enable(Usart *p_usart)
Enable the USART for the specified USART in SPI mode.
Usart hardware registers.
uint32_t usart_spi_is_rx_ready(Usart *p_usart)
Check whether the USART in SPI master mode contains a received character.
uint32_t usart_spi_is_tx_ready(Usart *p_usart)
Check if the USART Transmit Holding Register is empty or not in SPI mode.
void usart_spi_init(Usart *p_usart)
Enable the USART system clock in SPI master mode.
uint8_t spi_flags_t
SPI Flags Definition.
Commonly used includes, types and macros.
void usart_spi_write_single(Usart *p_usart, uint8_t data)
Write one byte to an SPI device using USART in SPI mode.
void usart_spi_setup_device(Usart *p_usart, struct usart_spi_device *device, spi_flags_t flags, unsigned long baud_rate, board_spi_select_id_t sel_id)
Set up a USART in SPI master mode device.
uint32_t board_spi_select_id_t
Board SPI Select Id Definition.
void usart_spi_disable(Usart *p_usart)
Disable the USART for the specified USART in SPI mode.
void usart_spi_select_device(Usart *p_usart, struct usart_spi_device *device)
Select the given device on the SPI bus.
uint32_t usart_spi_read_packet(Usart *p_usart, uint8_t *data, size_t len)
Receive a sequence of bytes from a USART in SPI mode device.
USBInterfaceDescriptor data
Polled SPI device definition.
uint32_t usart_spi_is_rx_full(Usart *p_usart)
Check if both receive buffers are full.
void usart_spi_read_single(Usart *p_usart, uint8_t *data)
Receive one byte from an SPI device using USART in SPI mode.
void usart_spi_deselect_device(Usart *p_usart, struct usart_spi_device *device)
De-select the given device on the SPI bus.
uint32_t usart_spi_is_tx_empty(Usart *p_usart)
Check whether there are data in Transmit Holding Register or Transmit Shift Register in SPI master mo...