M480 BSP V3.05.006
The Board Support Package for M480 Series
Macros | Functions

Macros

#define UUART_WRITE(uuart, u8Data)
 Write USCI_UART data. More...
 
#define UUART_READ(uuart)
 Read USCI_UART data. More...
 
#define UUART_GET_TX_EMPTY(uuart)
 Get Tx empty. More...
 
#define UUART_GET_RX_EMPTY(uuart)
 Get Rx empty. More...
 
#define UUART_IS_TX_EMPTY(uuart)
 Check specified usci_uart port transmission is over. More...
 
#define UUART_IS_RX_EMPTY(uuart)
 Check specified usci_uart port receiver is empty. More...
 
#define UUART_WAIT_TX_EMPTY(uuart)
 Wait specified usci_uart port transmission is over. More...
 
#define UUART_IS_TX_FULL(uuart)
 Check TX buffer is full or not. More...
 
#define UUART_IS_RX_FULL(uuart)
 Check RX buffer is full or not. More...
 
#define UUART_GET_TX_FULL(uuart)
 Get Tx full register value. More...
 
#define UUART_GET_RX_FULL(uuart)
 Get Rx full register value. More...
 
#define UUART_ENABLE_PROT_INT(uuart, u32IntSel)
 Enable specified USCI_UART protocol interrupt. More...
 
#define UUART_DISABLE_PROT_INT(uuart, u32IntSel)
 Disable specified USCI_UART protocol interrupt. More...
 
#define UUART_ENABLE_BUF_INT(uuart, u32IntSel)
 Enable specified USCI_UART buffer interrupt. More...
 
#define UUART_DISABLE_BUF_INT(uuart, u32IntSel)
 Disable specified USCI_UART buffer interrupt. More...
 
#define UUART_ENABLE_TRANS_INT(uuart, u32IntSel)
 Enable specified USCI_UART transfer interrupt. More...
 
#define UUART_DISABLE_TRANS_INT(uuart, u32IntSel)
 Disable specified USCI_UART transfer interrupt. More...
 
#define UUART_GET_PROT_STATUS(uuart)
 Get protocol interrupt flag/status. More...
 
#define UUART_CLR_PROT_INT_FLAG(uuart, u32IntTypeFlag)
 Clear specified protocol interrupt flag. More...
 
#define UUART_GET_BUF_STATUS(uuart)
 Get transmit/receive buffer interrupt flag/status. More...
 
#define UUART_CLR_BUF_INT_FLAG(uuart, u32IntTypeFlag)
 Clear specified buffer interrupt flag. More...
 
#define UUART_GET_WAKEUP_FLAG(uuart)
 Get wakeup flag. More...
 
#define UUART_CLR_WAKEUP_FLAG(uuart)
 Clear wakeup flag. More...
 
#define UUART_TRIGGER_RX_PDMA(uuart)
 Trigger RX PDMA function. More...
 
#define UUART_TRIGGER_TX_PDMA(uuart)
 Trigger TX PDMA function. More...
 
#define UUART_DISABLE_RX_PDMA(uuart)
 Disable RX PDMA transfer. More...
 
#define UUART_DISABLE_TX_PDMA(uuart)
 Disable TX PDMA transfer. More...
 
#define UUART_PDMA_ENABLE(uuart, u32FuncSel)
 Enable specified USCI_UART PDMA function. More...
 
#define UUART_PDMA_DISABLE(uuart, u32FuncSel)
 Disable specified USCI_UART PDMA function. More...
 

Functions

void UUART_ClearIntFlag (UUART_T *uuart, uint32_t u32Mask)
 Clear USCI_UART specified interrupt flag. More...
 
uint32_t UUART_GetIntFlag (UUART_T *uuart, uint32_t u32Mask)
 Get USCI_UART specified interrupt flag. More...
 
void UUART_Close (UUART_T *uuart)
 Disable USCI_UART function mode. More...
 
void UUART_DisableInt (UUART_T *uuart, uint32_t u32Mask)
 Disable interrupt function. More...
 
void UUART_EnableInt (UUART_T *uuart, uint32_t u32Mask)
 Enable interrupt function. More...
 
uint32_t UUART_Open (UUART_T *uuart, uint32_t u32baudrate)
 Open and set USCI_UART function. More...
 
uint32_t UUART_Read (UUART_T *uuart, uint8_t pu8RxBuf[], uint32_t u32ReadBytes)
 Read USCI_UART data. More...
 
uint32_t UUART_SetLine_Config (UUART_T *uuart, uint32_t u32baudrate, uint32_t u32data_width, uint32_t u32parity, uint32_t u32stop_bits)
 Set USCI_UART line configuration. More...
 
uint32_t UUART_Write (UUART_T *uuart, uint8_t pu8TxBuf[], uint32_t u32WriteBytes)
 Write USCI_UART data. More...
 
void UUART_EnableWakeup (UUART_T *uuart, uint32_t u32WakeupMode)
 Enable USCI_UART Wake-up Function. More...
 
void UUART_DisableWakeup (UUART_T *uuart)
 Disable USCI_UART Wake-up Function. More...
 
void UUART_EnableFlowCtrl (UUART_T *uuart)
 Enable USCI_UART auto flow control. More...
 
void UUART_DisableFlowCtrl (UUART_T *uuart)
 Disable USCI_UART auto flow control. More...
 

Detailed Description

Macro Definition Documentation

◆ UUART_CLR_BUF_INT_FLAG

#define UUART_CLR_BUF_INT_FLAG (   uuart,
  u32IntTypeFlag 
)

Clear specified buffer interrupt flag.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32IntTypeFlagInterrupt Type Flag, should be
Returns
None

This macro clear specified buffer interrupt flag.

Definition at line 382 of file usci_uart.h.

◆ UUART_CLR_PROT_INT_FLAG

#define UUART_CLR_PROT_INT_FLAG (   uuart,
  u32IntTypeFlag 
)

Clear specified protocol interrupt flag.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32IntTypeFlagInterrupt Type Flag, should be
Returns
None

This macro clear specified protocol interrupt flag.

Definition at line 354 of file usci_uart.h.

◆ UUART_CLR_WAKEUP_FLAG

#define UUART_CLR_WAKEUP_FLAG (   uuart)

Clear wakeup flag.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Returns
None

This macro clear wakeup flag.

Definition at line 409 of file usci_uart.h.

◆ UUART_DISABLE_BUF_INT

#define UUART_DISABLE_BUF_INT (   uuart,
  u32IntSel 
)

Disable specified USCI_UART buffer interrupt.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32IntSelInterrupt type select
Returns
None

This macro disable specified USCI_UART buffer interrupt.

Definition at line 282 of file usci_uart.h.

◆ UUART_DISABLE_PROT_INT

#define UUART_DISABLE_PROT_INT (   uuart,
  u32IntSel 
)

Disable specified USCI_UART protocol interrupt.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32IntSelInterrupt type select
Returns
None

This macro disable specified USCI_UART protocol interrupt.

Definition at line 252 of file usci_uart.h.

◆ UUART_DISABLE_RX_PDMA

#define UUART_DISABLE_RX_PDMA (   uuart)

Disable RX PDMA transfer.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
Returns
None.

Clear RXPDMAEN bit of UUART_PDMACTL register to disable RX PDMA transfer function.

Definition at line 445 of file usci_uart.h.

◆ UUART_DISABLE_TRANS_INT

#define UUART_DISABLE_TRANS_INT (   uuart,
  u32IntSel 
)

Disable specified USCI_UART transfer interrupt.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32IntSelInterrupt type select
Returns
None

This macro disable specified USCI_UART transfer interrupt.

Definition at line 318 of file usci_uart.h.

◆ UUART_DISABLE_TX_PDMA

#define UUART_DISABLE_TX_PDMA (   uuart)

Disable TX PDMA transfer.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
Returns
None.

Clear TXPDMAEN bit of UUART_PDMACTL register to disable TX PDMA transfer function.

Definition at line 457 of file usci_uart.h.

◆ UUART_ENABLE_BUF_INT

#define UUART_ENABLE_BUF_INT (   uuart,
  u32IntSel 
)

Enable specified USCI_UART buffer interrupt.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32IntSelInterrupt type select
Returns
None

This macro enable specified USCI_UART buffer interrupt.

Definition at line 267 of file usci_uart.h.

◆ UUART_ENABLE_PROT_INT

#define UUART_ENABLE_PROT_INT (   uuart,
  u32IntSel 
)

Enable specified USCI_UART protocol interrupt.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32IntSelInterrupt type select
Returns
None

This macro enable specified USCI_UART protocol interrupt.

Definition at line 236 of file usci_uart.h.

◆ UUART_ENABLE_TRANS_INT

#define UUART_ENABLE_TRANS_INT (   uuart,
  u32IntSel 
)

Enable specified USCI_UART transfer interrupt.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32IntSelInterrupt type select
Returns
None

This macro enable specified USCI_UART transfer interrupt.

Definition at line 300 of file usci_uart.h.

◆ UUART_GET_BUF_STATUS

#define UUART_GET_BUF_STATUS (   uuart)

Get transmit/receive buffer interrupt flag/status.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Returns
The interrupt flag/status of buffer status register.

This macro get buffer status register value.

Definition at line 367 of file usci_uart.h.

◆ UUART_GET_PROT_STATUS

#define UUART_GET_PROT_STATUS (   uuart)

Get protocol interrupt flag/status.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Returns
The interrupt flag/status of protocol status register.

This macro get protocol status register value.

Definition at line 331 of file usci_uart.h.

◆ UUART_GET_RX_EMPTY

#define UUART_GET_RX_EMPTY (   uuart)

Get Rx empty.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
0Rx buffer is not empty
>=1Rx buffer is empty

This macro get Receiver buffer empty register value.

Definition at line 121 of file usci_uart.h.

◆ UUART_GET_RX_FULL

#define UUART_GET_RX_FULL (   uuart)

Get Rx full register value.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
0Rx buffer is not full.
>=1Rx buffer is full.

This macro get Rx full register value.

Definition at line 220 of file usci_uart.h.

◆ UUART_GET_TX_EMPTY

#define UUART_GET_TX_EMPTY (   uuart)

Get Tx empty.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
0Tx buffer is not empty
>=1Tx buffer is empty

This macro get Transmitter buffer empty register value.

Definition at line 107 of file usci_uart.h.

◆ UUART_GET_TX_FULL

#define UUART_GET_TX_FULL (   uuart)

Get Tx full register value.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
0Tx buffer is not full.
>=1Tx buffer is full.

This macro get Tx full register value.

Definition at line 206 of file usci_uart.h.

◆ UUART_GET_WAKEUP_FLAG

#define UUART_GET_WAKEUP_FLAG (   uuart)

Get wakeup flag.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
0Chip did not wake up from power-down mode.
1Chip waked up from power-down mode.

This macro get wakeup flag.

Definition at line 396 of file usci_uart.h.

◆ UUART_IS_RX_EMPTY

#define UUART_IS_RX_EMPTY (   uuart)

Check specified usci_uart port receiver is empty.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
0Rx receiver is not empty
1Rx receiver is empty

This macro return Receive Empty Flag register bit value.
It indicates if specified usci_uart port receiver is empty nor not.

Definition at line 151 of file usci_uart.h.

◆ UUART_IS_RX_FULL

#define UUART_IS_RX_FULL (   uuart)

Check RX buffer is full or not.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
1RX buffer is full
0RX buffer is not full

This macro check RX buffer is full or not.

Definition at line 192 of file usci_uart.h.

◆ UUART_IS_TX_EMPTY

#define UUART_IS_TX_EMPTY (   uuart)

Check specified usci_uart port transmission is over.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
0Tx transmission is not over
1Tx transmission is over

This macro return Transmitter Empty Flag register bit value.
It indicates if specified usci_uart port transmission is over nor not.

Definition at line 136 of file usci_uart.h.

◆ UUART_IS_TX_FULL

#define UUART_IS_TX_FULL (   uuart)

Check TX buffer is full or not.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Return values
1TX buffer is full
0TX buffer is not full

This macro check TX buffer is full or not.

Definition at line 178 of file usci_uart.h.

◆ UUART_PDMA_DISABLE

#define UUART_PDMA_DISABLE (   uuart,
  u32FuncSel 
)

Disable specified USCI_UART PDMA function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32FuncSelCombination of following functions
Returns
None

Definition at line 488 of file usci_uart.h.

◆ UUART_PDMA_ENABLE

#define UUART_PDMA_ENABLE (   uuart,
  u32FuncSel 
)

Enable specified USCI_UART PDMA function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u32FuncSelCombination of following functions
Returns
None

Definition at line 473 of file usci_uart.h.

◆ UUART_READ

#define UUART_READ (   uuart)

Read USCI_UART data.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Returns
The oldest data byte in RX buffer.

This macro read Rx data register.

Definition at line 93 of file usci_uart.h.

◆ UUART_TRIGGER_RX_PDMA

#define UUART_TRIGGER_RX_PDMA (   uuart)

Trigger RX PDMA function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
Returns
None.

Set RXPDMAEN bit of UUART_PDMACTL register to enable RX PDMA transfer function.

Definition at line 421 of file usci_uart.h.

◆ UUART_TRIGGER_TX_PDMA

#define UUART_TRIGGER_TX_PDMA (   uuart)

Trigger TX PDMA function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
Returns
None.

Set TXPDMAEN bit of UUART_PDMACTL register to enable TX PDMA transfer function.

Definition at line 433 of file usci_uart.h.

◆ UUART_WAIT_TX_EMPTY

#define UUART_WAIT_TX_EMPTY (   uuart)

Wait specified usci_uart port transmission is over.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
Returns
None

This macro wait specified usci_uart port transmission is over.

Definition at line 164 of file usci_uart.h.

◆ UUART_WRITE

#define UUART_WRITE (   uuart,
  u8Data 
)

Write USCI_UART data.

Parameters
[in]uuartThe pointer of the specified USCI_UART module
[in]u8DataData byte to transmit.
Returns
None

This macro write Data to Tx data register.

Definition at line 80 of file usci_uart.h.

Function Documentation

◆ UUART_ClearIntFlag()

void UUART_ClearIntFlag ( UUART_T uuart,
uint32_t  u32Mask 
)

Clear USCI_UART specified interrupt flag.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]u32MaskThe combination of all related interrupt sources. Each bit corresponds to a interrupt source. This parameter decides which interrupt flags will be cleared. It could be the combination of:
Returns
None

The function is used to clear USCI_UART related interrupt flags specified by u32Mask parameter.

Definition at line 45 of file usci_uart.c.

◆ UUART_Close()

void UUART_Close ( UUART_T uuart)

Disable USCI_UART function mode.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
Returns
None

The function is used to disable USCI_UART function mode.

Definition at line 180 of file usci_uart.c.

◆ UUART_DisableFlowCtrl()

void UUART_DisableFlowCtrl ( UUART_T uuart)

Disable USCI_UART auto flow control.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
Returns
None

The function is used to disable USCI_UART auto flow control.

Definition at line 686 of file usci_uart.c.

◆ UUART_DisableInt()

void UUART_DisableInt ( UUART_T uuart,
uint32_t  u32Mask 
)

Disable interrupt function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]u32MaskThe combination of all related interrupt enable bits. Each bit corresponds to a interrupt enable bit. This parameter decides which interrupts will be disabled. It is combination of:
Returns
None

The function is used to disabled USCI_UART related interrupts specified by u32Mask parameter.

Definition at line 205 of file usci_uart.c.

◆ UUART_DisableWakeup()

void UUART_DisableWakeup ( UUART_T uuart)

Disable USCI_UART Wake-up Function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
Returns
None

The function is used to disable Wake-up function of USCI_UART.

Definition at line 650 of file usci_uart.c.

◆ UUART_EnableFlowCtrl()

void UUART_EnableFlowCtrl ( UUART_T uuart)

Enable USCI_UART auto flow control.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
Returns
None

The function is used to enable USCI_UART auto flow control.

Definition at line 665 of file usci_uart.c.

◆ UUART_EnableInt()

void UUART_EnableInt ( UUART_T uuart,
uint32_t  u32Mask 
)

Enable interrupt function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]u32MaskThe combination of all related interrupt enable bits. Each bit corresponds to a interrupt enable bit. This parameter decides which interrupts will be enabled. It is combination of:
Returns
None

The function is used to enable USCI_UART related interrupts specified by u32Mask parameter.

Definition at line 271 of file usci_uart.c.

◆ UUART_EnableWakeup()

void UUART_EnableWakeup ( UUART_T uuart,
uint32_t  u32WakeupMode 
)

Enable USCI_UART Wake-up Function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]u32WakeupModeThe wakeup mode of USCI_UART module.
Returns
None

The function is used to enable Wake-up function of USCI_UART.

Definition at line 634 of file usci_uart.c.

◆ UUART_GetIntFlag()

uint32_t UUART_GetIntFlag ( UUART_T uuart,
uint32_t  u32Mask 
)

Get USCI_UART specified interrupt flag.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]u32MaskThe combination of all related interrupt sources. Each bit corresponds to a interrupt source. This parameter decides which interrupt flags will be read. It is combination of:
Returns
Interrupt flags of selected sources.

The function is used to get USCI_UART related interrupt flags specified by u32Mask parameter.

Definition at line 105 of file usci_uart.c.

◆ UUART_Open()

uint32_t UUART_Open ( UUART_T uuart,
uint32_t  u32baudrate 
)

Open and set USCI_UART function.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]u32baudrateThe baud rate of USCI_UART module.
Returns
Real baud rate of USCI_UART module.

This function use to enable USCI_UART function and set baud-rate.

Definition at line 327 of file usci_uart.c.

◆ UUART_Read()

uint32_t UUART_Read ( UUART_T uuart,
uint8_t  pu8RxBuf[],
uint32_t  u32ReadBytes 
)

Read USCI_UART data.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]pu8RxBufThe buffer to receive the data of receive buffer.
[in]u32ReadBytesThe read bytes number of data.
Returns
Receive byte count

The function is used to read Rx data from RX buffer and the data will be stored in pu8RxBuf.

Definition at line 432 of file usci_uart.c.

◆ UUART_SetLine_Config()

uint32_t UUART_SetLine_Config ( UUART_T uuart,
uint32_t  u32baudrate,
uint32_t  u32data_width,
uint32_t  u32parity,
uint32_t  u32stop_bits 
)

Set USCI_UART line configuration.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]u32baudrateThe register value of baud rate of USCI_UART module. If u32baudrate = 0, USCI_UART baud rate will not change.
[in]u32data_widthThe data length of USCI_UART module.
[in]u32parityThe parity setting (none/odd/even) of USCI_UART module.
[in]u32stop_bitsThe stop bit length (1/2 bit) of USCI_UART module.
Returns
Real baud rate of USCI_UART module.

This function use to config USCI_UART line setting.

Definition at line 485 of file usci_uart.c.

◆ UUART_Write()

uint32_t UUART_Write ( UUART_T uuart,
uint8_t  pu8TxBuf[],
uint32_t  u32WriteBytes 
)

Write USCI_UART data.

Parameters
[in]uuartThe pointer of the specified USCI_UART module.
[in]pu8TxBufThe buffer to send the data to USCI transmission buffer.
[out]u32WriteBytesThe byte number of data.
Returns
Transfer byte count

The function is to write data into TX buffer to transmit data by USCI_UART.

Definition at line 593 of file usci_uart.c.