Skip to content

Instantly share code, notes, and snippets.

View kbeckmann's full-sized avatar
💾

Konrad Beckmann kbeckmann

💾
View GitHub Profile
#define SPI_INSTANCE 1 /**< SPI instance index. */
#define BUFF_LENGTH 2 /**< Transfer length. */
static const nrf_drv_spi_t spi = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE); /**< SPI instance. */
static uint8_t m_tx_buf[BUFF_LENGTH]; /**< TX buffer. */
static uint8_t m_rx_buf[BUFF_LENGTH]; /**< RX buffer. */
static volatile bool burst_completed = false;
static volatile bool spi_xfer_done = false; /**< Flag used to indicate that SPI instance completed the transfer. */
#define SPI_INSTANCE 1 /**< SPI instance index. */
#define BUFF_LENGTH 2 /**< Transfer length. */
static const nrf_drv_spi_t spi = NRF_DRV_SPI_INSTANCE(SPI_INSTANCE); /**< SPI instance. */
static uint8_t m_tx_buf[BUFF_LENGTH]; /**< TX buffer. */
static uint8_t m_rx_buf[BUFF_LENGTH]; /**< RX buffer. */
static volatile bool burst_completed = false;
static volatile bool spi_xfer_done = false; /**< Flag used to indicate that SPI instance completed the transfer. */