Hilscher netX microcontroller driver
V0.0.5.0
Documentation of the netX driver package
|
The handle of the driver. More...
#include <netx_drv_spi.h>
Public Member Functions | |
DRV_STATUS_E | DRV_SPI_Init (DRV_SPI_HANDLE_T *const ptDriver) |
This function initializes the DRV_SPI_HANDLE_T object. More... | |
DRV_STATUS_E | DRV_SPI_DeInit (DRV_SPI_HANDLE_T *const ptDriver) |
This function disables the DRV_SPI_HANDLE_T object. More... | |
DRV_STATUS_E | DRV_SPI_Transmit (DRV_SPI_HANDLE_T *const ptDriver, uint8_t *pcData, size_t size) |
Function for transmitting data of given size via the SPI device. More... | |
DRV_STATUS_E | DRV_SPI_Receive (DRV_SPI_HANDLE_T *const ptDriver, uint8_t *pcData, size_t size) |
Function for receiveing data of given size by the SPI device. More... | |
DRV_STATUS_E | DRV_SPI_TransmitReceive (DRV_SPI_HANDLE_T *const ptDriver, uint8_t *txData, uint8_t *rxData, size_t size) |
Function for transmitting and receiveing data at the same time of given size by the SPI device. More... | |
DRV_STATUS_E | DRV_SPI_ChangeFss (DRV_SPI_HANDLE_T *const ptDriver, DRV_SPI_FSS_E eFss) |
Function for changing the fss between transactions. More... | |
DRV_STATUS_E | DRV_SPI_Abort (DRV_SPI_HANDLE_T *const ptDriver) |
Function for aborting the current data transfer on the SPI device. More... | |
DRV_STATUS_E | DRV_SPI_GetState (DRV_SPI_HANDLE_T *const ptDriver, DRV_SPI_STATE_E *const ptState) |
Function returning a driver spi state enumeration and a return code. More... | |
Data Fields | |
DRV_SPI_CONFIGURATION_T | tConfiguration |
Private Member Functions | |
__STATIC_INLINE DRV_STATUS_E | DRV_SPI_Flush_Buffers (DRV_SPI_HANDLE_T *const ptDriver) |
This function shall flush the software and hardware buffers of the device. More... | |
static DRV_STATUS_E | DRV_SPI_Flush_POLL (DRV_SPI_HANDLE_T *const ptDriver) |
This method shall perform a flush by polling mode. More... | |
static DRV_STATUS_E | DRV_SPI_Flush_IRQ (DRV_SPI_HANDLE_T *const ptDriver) |
This method shall perform a flush by interrupt mode. More... | |
static DRV_STATUS_E | DRV_SPI_Flush_DMA (DRV_SPI_HANDLE_T *const ptDriver) |
This method shall perform a flush by dma mode. More... | |
__STATIC_INLINE void | DRV_SPI_IRQ_Inline_Handler (DRV_SPI_DEVICE_ID_E const eDeviceID) |
Private Attributes | |
DRV_SPI_DEVICE_U | ptDevice |
uint64_t | ullFrameStartTick |
void *volatile | TxBuffer |
size_t volatile | TxBufferSize |
size_t volatile | TxBufferCounter |
void *volatile | RxBuffer |
size_t volatile | RxBufferSize |
size_t volatile | RxBufferCounter |
DRV_LOCK_T | tLock |
The handle of the driver.
The configuration SHALL be changed before initializing the device and shall not be changed afterwards. The rest of it SHALL not be modified outside of the driver, even if it appears to be possible.
Definition at line 355 of file netx_drv_spi.h.
|
private |
The SPI device register as bitfield and value unions.
Definition at line 357 of file netx_drv_spi.h.
|
private |
Receive buffer
Definition at line 363 of file netx_drv_spi.h.
|
private |
Receive counter
Definition at line 365 of file netx_drv_spi.h.
|
private |
Receive size
Definition at line 364 of file netx_drv_spi.h.
DRV_SPI_CONFIGURATION_T DRV_SPI_HANDLE_T::tConfiguration |
The configuration of the spi device.
Definition at line 358 of file netx_drv_spi.h.
|
private |
The drivers locking variable used as internal mutex
Definition at line 366 of file netx_drv_spi.h.
|
private |
Transmit buffer
Definition at line 360 of file netx_drv_spi.h.
|
private |
Transmit counter
Definition at line 362 of file netx_drv_spi.h.
|
private |
Transmit size
Definition at line 361 of file netx_drv_spi.h.
|
private |
Used for timeout detection.
Definition at line 359 of file netx_drv_spi.h.