Appiko
|
Hardware abstraction layer of the SPI in Master mode. This driver is completely event driven and non-blocking, suitable for low power applications. More...
Data Structures | |
struct | hal_spim_init_t |
Enumerations | |
enum | hal_spim_freq_t |
enum | hal_spim_spi_mode_t { HAL_SPIM_SPI_MODE0, HAL_SPIM_SPI_MODE1, HAL_SPIM_SPI_MODE2, HAL_SPIM_SPI_MODE3 } |
enum | hal_spim_byte_order_t { HAL_SPIM_MSB_FIRST, HAL_SPIM_LSB_FIRST } |
enum | hal_spim_intr_t { HAL_SPIM_TX_DONE = SPIM_INTENSET_ENDTX_Msk, HAL_SPIM_RX_DONE = SPIM_INTENSET_ENDRX_Msk } |
Functions | |
void | hal_spim_init (hal_spim_init_t *spim_init) |
Function to Initiate the SPIM module. More... | |
void | hal_spim_tx_rx (void *p_tx_data, uint32_t tx_len, void *p_rx_data, uint32_t rx_len) |
Function to start communication. More... | |
uint32_t | hal_spim_is_busy () |
Function to check if SIPM module is available or not. More... | |
void | hal_spim_deinit () |
Function to de-initialize the SPIM module. | |
Enum containing options for Byte order
Enumerator | |
---|---|
HAL_SPIM_MSB_FIRST | Byte Order : MSB First |
HAL_SPIM_LSB_FIRST | Byte Order : LSB First |
Definition at line 75 of file hal_spim.h.
enum hal_spim_freq_t |
Enum containing list of all the possible transmission frequencies
Definition at line 49 of file hal_spim.h.
enum hal_spim_intr_t |
Enum to contain list of interrupts which can be enabled from application
Enumerator | |
---|---|
HAL_SPIM_TX_DONE | To enable Tx Done event |
HAL_SPIM_RX_DONE | To enable Rx Done event |
Definition at line 84 of file hal_spim.h.
enum hal_spim_spi_mode_t |
Enum containing list of all SPI Modes
Definition at line 62 of file hal_spim.h.
void hal_spim_init | ( | hal_spim_init_t * | spim_init | ) |
spim_init | Settings which is to be used to initiate the SPIM module. |
Definition at line 60 of file hal_spim.c.
uint32_t hal_spim_is_busy | ( | ) |
true | hal_spim module is not available |
false | hal_spim module is available |
Definition at line 135 of file hal_spim.c.
Referenced by SdkEvalSpiCommandStrobes(), SdkEvalSpiReadFifo(), SdkEvalSpiReadRegisters(), SdkEvalSpiWriteFifo(), and SdkEvalSpiWriteRegisters().
void hal_spim_tx_rx | ( | void * | p_tx_data, |
uint32_t | tx_len, | ||
void * | p_rx_data, | ||
uint32_t | rx_len | ||
) |
p_tx_data | Pointer to the data which is to be sent |
tx_len | Number of bytes which are to be sent |
p_rx_data | Pointer to the location where received data is to be stored. |
rx_len | Number of received bytes which are to be stored |
Definition at line 108 of file hal_spim.c.
References ASSERT.
Referenced by SdkEvalSpiCommandStrobes(), SdkEvalSpiReadFifo(), SdkEvalSpiReadRegisters(), SdkEvalSpiWriteFifo(), and SdkEvalSpiWriteRegisters().