Hilscher netX microcontroller driver  V0.0.5.0
Documentation of the netX driver package
DRV_UART_HANDLE_T Struct Reference

The handle of the driver. More...

#include <netx_drv_uart.h>

Collaboration diagram for DRV_UART_HANDLE_T:
Collaboration graph

Public Member Functions

DRV_STATUS_E DRV_UART_Init (DRV_UART_HANDLE_T *const ptDriver)
 Initializes the uart device and handle by the given configuration. More...
 
DRV_STATUS_E DRV_UART_DeInit (DRV_UART_HANDLE_T *const ptDriver)
 Deinitializes the uart device and handle. More...
 
DRV_STATUS_E DRV_UART_Transmit (DRV_UART_HANDLE_T *const ptDriver, uint8_t const *const data, size_t size)
 Performs a transmission of the given size of the data array via the given uart. More...
 
DRV_STATUS_E DRV_UART_Receive (DRV_UART_HANDLE_T *const ptDriver, uint8_t *const data, size_t size)
 Receives the given size and stores it into data via the given uart. More...
 
DRV_STATUS_E DRV_UART_TransmitReceive (DRV_UART_HANDLE_T *const ptDriver, uint8_t *const txData, uint8_t *const rxData, size_t size)
 Transmits and receives data of given size via the given uart. More...
 
DRV_STATUS_E DRV_UART_PutChar (DRV_UART_HANDLE_T *const ptDriver, unsigned char const cData)
 Transmits a single char via the given uart. More...
 
DRV_STATUS_E DRV_UART_GetChar (DRV_UART_HANDLE_T *const ptDriver, unsigned char *const pcData)
 Receives a single char via the given uart. More...
 
DRV_STATUS_E DRV_UART_Abort (DRV_UART_HANDLE_T *const ptDriver)
 Aborts any transmissions on the given uart. More...
 
DRV_STATUS_E DRV_UART_GetState (DRV_UART_HANDLE_T *const ptDriver, DRV_UART_STATE_E *const ptState)
 The driver and device state are returned by this function. More...
 
DRV_STATUS_E DRV_UART_GetRxState (DRV_UART_HANDLE_T *const ptDriver, DRV_UART_STATE_E *const ptState)
 The driver and device state are returned by this function. More...
 
DRV_STATUS_E DRV_UART_GetTxState (DRV_UART_HANDLE_T *const ptDriver, DRV_UART_STATE_E *const ptState)
 The driver and device state are returned by this function. More...
 
__STATIC_FORCEINLINE uint32_t DRV_UART_GetRxCounter (DRV_UART_HANDLE_T *const ptDriver)
 This function returns the amount of bytes received. More...
 
__STATIC_FORCEINLINE uint32_t DRV_UART_GetTxCounter (DRV_UART_HANDLE_T *const ptDriver)
 This function returns the amount of bytes transmitted. More...
 
__STATIC_FORCEINLINE uint8_t volatile * DRV_UART_GetStaticBuffer (DRV_UART_HANDLE_T *const ptDriver)
 This function returns the static buffer. More...
 
__STATIC_INLINE void DRV_UART_IRQ_Inline_Handler (DRV_UART_DEVICE_ID_E const eDeviceID)
 

Private Member Functions

__STATIC_INLINE void DRV_UART_Flush_Buffers (DRV_UART_HANDLE_T *const ptDriver)
 This function shall flush the software and hardware buffers of the device. More...
 

Private Attributes

DRV_UART_DEVICE_TptDevice
 
DRV_UART_CONFIGURATION_T tConfiguration
 
DRV_LOCK_T tLock
 
uint64_t ullFrameStartTick
 
void *volatile TxBuffer
 
size_t volatile TxBufferSize
 
size_t volatile TxBufferCounter
 
void *volatile RxBuffer
 
uint8_t volatile RxBufferStatic [16]
 
size_t volatile RxBufferSize
 
size_t volatile RxBufferCounter
 

Detailed Description

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 230 of file netx_drv_uart.h.

Field Documentation

DRV_UART_DEVICE_T* DRV_UART_HANDLE_T::ptDevice
private

The UART device register as bitfield and value unions.

Definition at line 232 of file netx_drv_uart.h.

void* volatile DRV_UART_HANDLE_T::RxBuffer
private

Receive buffer

Definition at line 239 of file netx_drv_uart.h.

size_t volatile DRV_UART_HANDLE_T::RxBufferCounter
private

Receive counter

Definition at line 242 of file netx_drv_uart.h.

size_t volatile DRV_UART_HANDLE_T::RxBufferSize
private

Receive size

Definition at line 241 of file netx_drv_uart.h.

uint8_t volatile DRV_UART_HANDLE_T::RxBufferStatic[16]
private

Receive buffer

Definition at line 240 of file netx_drv_uart.h.

DRV_UART_CONFIGURATION_T DRV_UART_HANDLE_T::tConfiguration
private

Contains the configuration of the device.

Definition at line 233 of file netx_drv_uart.h.

DRV_LOCK_T DRV_UART_HANDLE_T::tLock
private

The drivers locking variable used as internal mutex

Definition at line 234 of file netx_drv_uart.h.

void* volatile DRV_UART_HANDLE_T::TxBuffer
private

Transmit buffer

Definition at line 236 of file netx_drv_uart.h.

size_t volatile DRV_UART_HANDLE_T::TxBufferCounter
private

Transmit counter

Definition at line 238 of file netx_drv_uart.h.

size_t volatile DRV_UART_HANDLE_T::TxBufferSize
private

Transmit size

Definition at line 237 of file netx_drv_uart.h.

uint64_t DRV_UART_HANDLE_T::ullFrameStartTick
private

Used for timeout detection.

Definition at line 235 of file netx_drv_uart.h.


The documentation for this struct was generated from the following files: