# RUI SPI Read/Write

RUI_RETURN_STATUS rui_spi_rw(RUI_IF_READ_WRITE rw, uint8_t *tx, uint16_t tx_len, uint8_t *rx, uint16_t rx_len);
@brief This API is used to read/write through SPI.
@return RUI_RETURN_STATUS
@param RUI_IF_READ_WRITE rw: read or write through SPI.

uint8_t *tx: write through SPI.

uint16_t tx_len: TX length

uint8_t *rx: read buffer.

uint16_t rx_len: RX length.
@module RAK4400, RAK4600 and RAK5010.