Data Structures | Defines | Typedefs | Enumerations | Functions
csl_uart.h File Reference

UART functional layer API header file. More...

#include "cslr.h"
#include "csl_error.h"
#include "csl_types.h"
#include "cslr_uart.h"
#include "soc.h"
#include "csl_intc.h"
#include "csl_general.h"

Go to the source code of this file.

Data Structures

struct  CSL_UartSetup
 UART Setup structure. More...
struct  CSL_UartConfig
 UART Config structure The members of this structure directly maps to a particular register of UART. More...
struct  CSL_UartIsrAddr
 UART callback pointer structure. More...
struct  CSL_UartObj
 UART Object structure. More...

Defines

#define RBR   THR
#define IIR   FCR
#define CSL_UART_BAUD_MULTIPLIER   (16u)
#define CSL_UART_CLK_DIVIDER(baud)   ( Uint32 ) ( (Uint32)CSL_UART_BAUD_MULTIPLIER * (Uint32) ( baud) )
#define UART_EVT_TBEI_IID   0x01
#define UART_EVT_RBI_IID   0x02
#define UART_EVT_LSI_IID   0x03
#define UART_EVT_CTOI_IID   0x06
#define CSL_UART_WORD5   0x05
#define CSL_UART_WORD6   0x06
#define CSL_UART_WORD7   0x07
#define CSL_UART_WORD8   0x08
#define CSL_UART_DISABLE_PARITY   (0x00u)
#define CSL_UART_ODD_PARITY   (0x01u)
#define CSL_UART_EVEN_PARITY   (0x02u)
#define CSL_UART_MARK_PARITY   (0x03u)
#define CSL_UART_SPACE_PARITY   (0x04u)
#define CSL_UART_FIFO_DISABLE   CSL_FMKT(UART_FCR_FIFOEN,DISABLE)
#define CSL_UART_FIFO_DMA1_DISABLE_TRIG01
#define CSL_UART_FIFO_DMA1_DISABLE_TRIG04
#define CSL_UART_FIFO_DMA1_DISABLE_TRIG08
#define CSL_UART_FIFO_DMA1_DISABLE_TRIG14
#define CSL_UART_FIFO_DMA1_ENABLE_TRIG01
#define CSL_UART_FIFO_DMA1_ENABLE_TRIG04
#define CSL_UART_FIFO_DMA1_ENABLE_TRIG08
#define CSL_UART_FIFO_DMA1_ENABLE_TRIG14
#define CSL_UART_NO_LOOPBACK   (0x00u)
#define CSL_UART_LOOPBACK   (0x01u)
#define CSL_UART_NO_AFE   (0x00u)
#define CSL_UART_AFE   (0x01u)
#define CSL_UART_NO_RTS   (0x00u)
#define CSL_UART_RTS   (0x01u)

Typedefs

typedef enum CSL_UartEventType CSL_UartEventType
 enum variable for the selection of UART interrupt Receiver Line Status Int,Transmitter Holding Register Empty Int, Receiver data available Int.
typedef struct CSL_UartObj CSL_UartObj
 UART Object structure.
typedef CSL_UartObjCSL_UartHandle

Enumerations

enum  CSL_UartInsId {
  CSL_UART_INST_0 = (0u),
  CSL_UART_INST_INVALID = (1u)
}
 UART instance numbers. More...
enum  CSL_UartOpmode {
  UART_POLLED = 0,
  UART_INTERRUPT,
  UART_OPMODE_OTHER
}
 UART Device mode of transmission. More...
enum  CSL_UartXferMode {
  CSL_UART_FIFO_MODE = 0,
  CSL_UART_NON_FIFO_MODE = 1,
  CSL_UART_MODE_UNDEFINED = 2
}
 This enum defines Xfer mode of UART. More...
enum  CSL_UartEventType {
  CSL_UART_RECVOR_REG_DATA_INTERRUPT,
  CSL_UART_XMITOR_REG_EMPTY_INTERRUPT,
  CSL_UART_RECVOR_LINE_STATUS_INTERRUPT
}
 enum variable for the selection of UART interrupt Receiver Line Status Int,Transmitter Holding Register Empty Int, Receiver data available Int. More...

Functions

CSL_Status UART_init (CSL_UartObj *uartObj, Uint32 uartInstId, CSL_UartOpmode opmode)
CSL_Status UART_setup (CSL_UartHandle hUart, CSL_UartSetup *uartSetup)
CSL_Status UART_config (CSL_UartHandle hUart, CSL_UartConfig *uartConfig)
CSL_Status UART_setupBaudRate (CSL_UartHandle hUart, Uint32 clkInput, Uint32 baudRate)
CSL_Status UART_reset (CSL_UartHandle hUart)
CSL_Status UART_resetOff (CSL_UartHandle hUart)
CSL_Status UART_eventEnable (CSL_UartHandle hUart, CSL_UartEventType uartEvent)
CSL_Status UART_eventDisable (CSL_UartHandle hUart, CSL_UartEventType uartEvent)
CSL_Status UART_read (CSL_UartHandle hUart, Char *pBuf, Uint16 count, Uint32 timeout)
CSL_Status UART_write (CSL_UartHandle hUart, Char *pBuf, Uint16 count, Uint32 timeout)
CSL_Status UART_fgetc (CSL_UartHandle hUart, Char *elem, Uint32 timeout)
CSL_Status UART_fputc (CSL_UartHandle hUart, const Char elem, Uint32 timeout)
CSL_Status UART_fgets (CSL_UartHandle hUart, Char *pBuf, Uint16 bufSize, Uint32 timeout)
CSL_Status UART_fputs (CSL_UartHandle hUart, const Char *pBuf, Uint32 timeout)
Int16 UART_getEventId (CSL_UartHandle hUart)
CSL_Status UART_getConfig (CSL_UartHandle hUart, CSL_UartConfig *config)
CSL_Status UART_setCallback (CSL_UartHandle hUart, CSL_UartIsrAddr *isrAddr)

Detailed Description

UART functional layer API header file.

Path: \(CSLPATH)\ inc