UART: UART.h File Reference

Modbus RTU XMC47

UART.h File Reference

Detailed Description

Date
2015-12-17

NOTE: This file is generated by DAVE. Any manual modification done to this file will be lost when the code is regenerated.

Definition in file UART.h.

#include <xmc_scu.h> #include <xmc_gpio.h>
#include <xmc_uart.h>
#include <DAVE_common.h>
#include "uart_conf.h"
#include "uart_extern.h"

Data Structures

struct  UART_TX_CONFIG
 Structure for transmit pin configuration. More...
 
struct  UART_CONFIG
 Structure for holding the configuration parameters of UART channel. More...
 
struct  UART_RUNTIME
 Structure to hold the dynamic variables for the UART communication. More...
 
struct  UART
 Handler structure with pointers to dynamic and static parameters. More...
 

Typedefs

typedef void(* UART_cbhandler )(void)
 Function pointer used for callback function.
 
typedef UART_STATUS_t(* UART_init_handler )(void)
 Function pointer used for initialization function.
 
typedef XMC_UART_CH_STATUS_FLAG_t UART_PROTOCOL_STATUS_t
 Wrapper typedefinition for XMC_UART_PROTOCOL_STATUS_t.
 
typedef struct UART_TX_CONFIG UART_TX_CONFIG_t
 Structure for transmit pin configuration.
 
typedef struct UART_CONFIG UART_CONFIG_t
 Structure for holding the configuration parameters of UART channel.
 
typedef struct UART_RUNTIME UART_RUNTIME_t
 Structure to hold the dynamic variables for the UART communication.
 
typedef struct UART UART_t
 Handler structure with pointers to dynamic and static parameters.
 

Functions

DAVE_APP_VERSION_t UART_GetAppVersion (void)
 Get the UART APP version. More...
 
UART_STATUS_t UART_Init (const UART_t *const handle)
 Initializes the UART module as per the configuration made in UI. More...
 
UART_STATUS_t UART_Receive (const UART_t *const handle, uint8_t *data_ptr, uint32_t count)
 Registers a request for receiving data over UART channel. More...
 
UART_STATUS_t UART_Transmit (const UART_t *const handle, uint8_t *data_ptr, uint32_t count)
 Registers a request for transmitting data over UART channel. More...
 
UART_STATUS_t UART_SetBaudrate (const UART_t *handle, uint32_t baud, uint32_t oversampling)
 Changes the baudrate of UART channel. More...
 
__STATIC_INLINE uint32_t UART_GetTXFIFOStatus (const UART_t *const handle)
 Gets the transmit FIFO event flags. More...
 
__STATIC_INLINE uint8_t UART_GetReceivedWord (const UART_t *const handle)
 Provides the received data from receive buffer. More...
 
__STATIC_INLINE void UART_TransmitWord (const UART_t *const handle, uint8_t data)
 Transmits a word of data. More...
 
__STATIC_INLINE void UART_EnableEvent (const UART_t *const handle, uint32_t events)
 Enables the selected protocol events for interrupt generation. More...
 
__STATIC_INLINE void UART_DisableEvent (const UART_t *const handle, uint32_t events)
 Disables selected events from generating interrupt. More...
 
__STATIC_INLINE bool UART_IsTXFIFOFull (const UART_t *const handle)
 Checks if the transmit FIFO is full. More...
 
__STATIC_INLINE bool UART_IsRXFIFOEmpty (const UART_t *const handle)
 Checks if the receive FIFO is empty. More...
 
__STATIC_INLINE void UART_SetTXFIFOTriggerLimit (const UART_t *const handle, uint32_t limit)
 Configures trigger limit for the transmit FIFO. More...
 
__STATIC_INLINE void UART_SetRXFIFOTriggerLimit (const UART_t *const handle, uint32_t limit)
 Configures trigger limit for the receive FIFO. More...
 
__STATIC_INLINE uint32_t UART_GetRXFIFOStatus (const UART_t *const handle)
 Gets the status of event flags related to receive FIFO. More...
 
__STATIC_INLINE void UART_ClearTXFIFOStatus (const UART_t *const handle, const uint32_t flag)
 Function clears the specified FIFO event flag related to transmit FIFO. More...
 
__STATIC_INLINE void UART_ClearRXFIFOStatus (const UART_t *const handle, const uint32_t flag)
 Function clears the specified FIFO event flag related to receive FIFO. It should be used to clear the status of standard receive buffer interrupt, alternative receive buffer interupt and receive buffer error interrupt flags. More...
 
__STATIC_INLINE uint32_t UART_GetFlagStatus (const UART_t *const handle, uint32_t protocol_status)
 Provides the status of protocol events. More...
 
__STATIC_INLINE void UART_ClearFlag (const UART_t *const handle, const uint32_t protocol_status)
 Clears the event status in the register(PSR_ASCMode). More...
 
__STATIC_INLINE bool UART_IsTxBusy (const UART_t *const handle)
 Checks if the transmission is in progress. More...
 
__STATIC_INLINE bool UART_IsRxBusy (const UART_t *const handle)
 Checks if data reception is in progress. More...
 
enum  UART_STATUS {
  UART_STATUS_SUCCESS, UART_STATUS_FAILURE, UART_STATUS_BUSY, UART_STATUS_BUFFER_INVALID,
  UART_STATUS_MODE_MISMATCH
}
 Enum to describe the possible status values, returned by UART APIs. More...
 
enum  UART_MODE { UART_MODE_FULLDUPLEX, UART_MODE_HALFDUPLEX, UART_MODE_LOOPBACK }
 Enum used to describe the UART Mode of operation. More...
 
enum  UART_EVENT {
  UART_EVENT_SYNC_BRK, UART_EVENT_RX_NOISE, UART_EVENT_FORMAT_ERR0, UART_EVENT_FORMAT_ERR1,
  UART_EVENT_COLLISION, UART_EVENT_MAX
}
 Enum used to identify UART protocol event callback function. More...
 
enum  UART_TRANSFER_MODE { UART_TRANSFER_MODE_INTERRUPT, UART_TRANSFER_MODE_DMA, UART_TRANSFER_MODE_DIRECT }
 Enum used to identify the transfer type used for either transmit or receive function. More...
 
typedef enum UART_STATUS UART_STATUS_t
 Enum to describe the possible status values, returned by UART APIs.
 
typedef enum UART_MODE UART_MODE_t
 Enum used to describe the UART Mode of operation.
 
typedef enum UART_EVENT UART_EVENT_t
 Enum used to identify UART protocol event callback function.
 
typedef enum UART_TRANSFER_MODE UART_TRANSFER_MODE_t
 Enum used to identify the transfer type used for either transmit or receive function.
 

Go to the source code of this file.