SPI#

This module provides low-level access to SPI, intended for communication with the minions board (NOTE: a new minions driver is currently being written, so this use case might change). Internally, we provide a spin-locking mechanism for short SPI messages (shorter than 8 bytes) and an OS level pend on longer ones.

group BSP_SPI

Functions

void BSP_SPI_Init(void)#

Initializes the SPI communication to be used to communicate with minion board(s)

Initializes the SPI communication to be used to communicate with minion board(s)

Parameters:

None

Returns:

None

Returns:

None

void BSP_SPI_Write(uint8_t *txBuf, uint8_t txLen)#

Transmits a message through SPI.

Transmits a message through SPI.

Note

Blocking statement

Parameters:
  • txBuf – data to transmit

  • txLen – length of the data packet

  • txBuf – data array that contains the data to be sent.

  • txLen – length of data array.

Returns:

None Do not call from an ISR

Returns:

None Do not call from an ISR

void BSP_SPI_Read(uint8_t *rxBuf, uint8_t rxLen)#

Receives a message through SPI.

Receives a message through SPI.

Note

Blocking statement

Parameters:
  • rxBuf – buffer to store the received data

  • rxLen – length of the buffer

  • rxBuf – data array to store the data that is received.

  • rxLen – length of data array.

Returns:

None Do not call from an ISR

Returns:

None Do not call from an ISR