TMPM4KxA Group Peripheral Driver User Manual  V1.0.4.0
Functions | Variables
txz_uart.c File Reference

This file provides API functions for UART driver. More...

Functions

__STATIC_INLINE int32_t check_param_cts_handshake (uint32_t param)
 Check the CTS Handshake's parameter. More...
 
__STATIC_INLINE int32_t check_param_rts_handshake (uint32_t param)
 Check the RTS Handshake's parameter. More...
 
__STATIC_INLINE int32_t check_param_data_complemention (uint32_t param)
 Check the Data Complementation's parameter. More...
 
__STATIC_INLINE int32_t check_param_data_direction (uint32_t param)
 Check the Data Direction's parameter. More...
 
__STATIC_INLINE int32_t check_param_stop_bit (uint32_t param)
 Check the Stop Bit's parameter. More...
 
__STATIC_INLINE int32_t check_param_parity_bit (uint32_t param)
 Check the Parity Bit's parameter. More...
 
__STATIC_INLINE int32_t check_param_parity_enable (uint32_t param)
 Check the Parity Enable's parameter. More...
 
__STATIC_INLINE int32_t check_param_data_length (uint32_t param)
 Check the Data Length's parameter. More...
 
__STATIC_INLINE int32_t check_param_tx_fill_level_range (uint32_t param)
 Check the Tx Fill Level Range's parameter. More...
 
__STATIC_INLINE int32_t check_param_rx_fill_level_range (uint32_t param)
 Check the Rx Fill Level's parameter. More...
 
__STATIC_INLINE int32_t check_param_tx_fifo_int (uint32_t param)
 Check the Tx FIFO Interrpt's parameter. More...
 
__STATIC_INLINE int32_t check_param_tx_int (uint32_t param)
 Check the Tx Interrpt's parameter. More...
 
__STATIC_INLINE int32_t check_param_rx_fifo_int (uint32_t param)
 Check the Rx FIFO Interrpt's parameter. More...
 
__STATIC_INLINE int32_t check_param_rx_int (uint32_t param)
 Check the Rx Interrpt's parameter. More...
 
__STATIC_INLINE int32_t check_param_err_int (uint32_t param)
 Check the Error Interrupt's parameter. More...
 
__STATIC_INLINE int32_t check_param_prescaler (uint32_t param)
 Check the Prescaler's parameter. More...
 
__STATIC_INLINE int32_t check_param_division (uint32_t param)
 Check the Division's parameter. More...
 
__STATIC_INLINE int32_t check_param_rangeK (uint32_t param)
 Check the Range K's parameter. More...
 
__STATIC_INLINE int32_t check_param_rangeN (uint32_t param)
 Check the Range N's parameter. More...
 
__STATIC_INLINE int32_t check_param_tx_buff_num (uint32_t param)
 Check the num of buff for transmit. More...
 
__STATIC_INLINE int32_t check_param_rx_buff_num (uint32_t param)
 Check the num of buff for receive. More...
 
__STATIC_INLINE uint32_t convert_tx_fifo_fill_level_to_reg (uint32_t level)
 Convert Tx FIFO fill level to register. More...
 
__STATIC_INLINE uint32_t convert_rx_fifo_fill_level_to_reg (uint32_t level)
 Convert Rx FIFO fill level to register. More...
 
__STATIC_INLINE int32_t check_param_noize_filter (uint32_t param)
 Check the Noize Fileter's parameter. More...
 
TXZ_Result uart_init (uart_t *p_obj)
 Initialize the UART object. More...
 
TXZ_Result uart_deinit (uart_t *p_obj)
 Release the UART object. More...
 
TXZ_Result uart_discard_transmit (uart_t *p_obj)
 Discard transmit. More...
 
TXZ_Result uart_discard_receive (uart_t *p_obj)
 Discard receive. More...
 
TXZ_Result uart_transmitIt (uart_t *p_obj, uart_transmit_t *p_info)
 Transmit data. Non-Blocking Communication. More...
 
TXZ_Result uart_receiveIt (uart_t *p_obj, uart_receive_t *p_info)
 Receive data. Non-Blocking Communication. More...
 
void uart_transmit_irq_handler (uart_t *p_obj)
 IRQ Handler for transmit. More...
 
void uart_receive_irq_handler (uart_t *p_obj)
 IRQ Handler for receive. More...
 
void uart_error_irq_handler (uart_t *p_obj)
 IRQ Handler for error. More...
 
TXZ_Result uart_get_status (uart_t *p_obj, uint32_t *p_status)
 Get status. More...
 
TXZ_Result uart_get_error (uart_t *p_obj, uint32_t *p_error)
 Get error information. More...
 
TXZ_Result uart_get_boudrate_setting (uint32_t clock, uart_clock_t *p_clk, uint32_t boudrate, uart_boudrate_t *p_brd)
 Get the setting of boudrate. More...
 

Variables

 C
 

Detailed Description

This file provides API functions for UART driver.

Version
V1.0.0.1
Date
2017-08-08 16:03:48

DO NOT USE THIS SOFTWARE WITHOUT THE SOFTWARE LICENSE AGREEMENT.

(C)Copyright TOSHIBA MICROELECTRONICS CORPORATION 2017 All rights reserved

Function Documentation

◆ check_param_cts_handshake()

__STATIC_INLINE int32_t check_param_cts_handshake ( uint32_t  param)

Check the CTS Handshake's parameter.

Parameters
param:CTS Handshake's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is CTS Handshake"UART_CTS_xxxx".

◆ check_param_data_complemention()

__STATIC_INLINE int32_t check_param_data_complemention ( uint32_t  param)

Check the Data Complementation's parameter.

Parameters
param:Data Complementation's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Data Complementation"UART_DATA_COMPLEMENTION_xxxx".

◆ check_param_data_direction()

__STATIC_INLINE int32_t check_param_data_direction ( uint32_t  param)

Check the Data Direction's parameter.

Parameters
param:Data Direction's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Data Direction"UART_DATA_DIRECTION_xxxx".

◆ check_param_data_length()

__STATIC_INLINE int32_t check_param_data_length ( uint32_t  param)

Check the Data Length's parameter.

Parameters
param:Data Length's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Data Length"UART_DATA_LENGTH_xxxx".

◆ check_param_division()

__STATIC_INLINE int32_t check_param_division ( uint32_t  param)

Check the Division's parameter.

Parameters
param:Division's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Division"UART_DIVISION_xxxx".

◆ check_param_err_int()

__STATIC_INLINE int32_t check_param_err_int ( uint32_t  param)

Check the Error Interrupt's parameter.

Parameters
param:Error Interrupt's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Error Interrupt"UART_ERR_INT_xxxx".

◆ check_param_noize_filter()

__STATIC_INLINE int32_t check_param_noize_filter ( uint32_t  param)

Check the Noize Fileter's parameter.

Parameters
param:Noize fileter's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Noise Filter"UART_NOISE_FILTER_xxxx".

◆ check_param_parity_bit()

__STATIC_INLINE int32_t check_param_parity_bit ( uint32_t  param)

Check the Parity Bit's parameter.

Parameters
param:Parity Bit's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Parity Bit"UART_PARITY_BIT_xxxx".

◆ check_param_parity_enable()

__STATIC_INLINE int32_t check_param_parity_enable ( uint32_t  param)

Check the Parity Enable's parameter.

Parameters
param:Parity Enable's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Parity Enable"UART_PARITY_xxxx".

◆ check_param_prescaler()

__STATIC_INLINE int32_t check_param_prescaler ( uint32_t  param)

Check the Prescaler's parameter.

Parameters
param:Prescaler's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Prescaler"UART_PLESCALER_xxxx".

◆ check_param_rangeK()

__STATIC_INLINE int32_t check_param_rangeK ( uint32_t  param)

Check the Range K's parameter.

Parameters
param:Range K's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Range K"UART_RANGE_K_xxxx".

◆ check_param_rangeN()

__STATIC_INLINE int32_t check_param_rangeN ( uint32_t  param)

Check the Range N's parameter.

Parameters
param:Range N's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Range N"UART_RANGE_N_xxxx".

◆ check_param_rts_handshake()

__STATIC_INLINE int32_t check_param_rts_handshake ( uint32_t  param)

Check the RTS Handshake's parameter.

Parameters
param:RTS Handshake's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is RTS Handshake"UART_RTS_xxxx".

◆ check_param_rx_buff_num()

__STATIC_INLINE int32_t check_param_rx_buff_num ( uint32_t  param)

Check the num of buff for receive.

Parameters
param:Num of buff.
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
-

◆ check_param_rx_fifo_int()

__STATIC_INLINE int32_t check_param_rx_fifo_int ( uint32_t  param)

Check the Rx FIFO Interrpt's parameter.

Parameters
param:Rx FIFO Interrpt's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Rx FIFO Interrpt"UART_RX_FIFO_INT_xxxx".

◆ check_param_rx_fill_level_range()

__STATIC_INLINE int32_t check_param_rx_fill_level_range ( uint32_t  param)

Check the Rx Fill Level's parameter.

Parameters
param:Rx Fill Level's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is UART_RxFillLevel"UART_RX_FILL_RANGE_xxxx".

◆ check_param_rx_int()

__STATIC_INLINE int32_t check_param_rx_int ( uint32_t  param)

Check the Rx Interrpt's parameter.

Parameters
param:Rx Interrpt's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Rx Interrpt"UART_RX_INT_xxxx".

◆ check_param_stop_bit()

__STATIC_INLINE int32_t check_param_stop_bit ( uint32_t  param)

Check the Stop Bit's parameter.

Parameters
param:Stop Bit's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Stop Bit"UART_STOP_BIT_xxxx".

◆ check_param_tx_buff_num()

__STATIC_INLINE int32_t check_param_tx_buff_num ( uint32_t  param)

Check the num of buff for transmit.

Parameters
param:Num of buff.
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
-

◆ check_param_tx_fifo_int()

__STATIC_INLINE int32_t check_param_tx_fifo_int ( uint32_t  param)

Check the Tx FIFO Interrpt's parameter.

Parameters
param:Tx FIFO Interrpt's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Tx FIFO Interrpt"UART_TX_FIFO_INT_xxxx".

◆ check_param_tx_fill_level_range()

__STATIC_INLINE int32_t check_param_tx_fill_level_range ( uint32_t  param)

Check the Tx Fill Level Range's parameter.

Parameters
param:Tx Fill Level Range's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Tx Fill Level Range"UART_TX_FILL_RANGE_xxxx".

◆ check_param_tx_int()

__STATIC_INLINE int32_t check_param_tx_int ( uint32_t  param)

Check the Tx Interrpt's parameter.

Parameters
param:Tx Interrpt's parameter
Return values
UART_PARAM_OK:Valid
UART_PARAM_NG:Invalid
Note
Macro definition is Tx Interrpt"UART_TX_INT_xxxx".

◆ convert_rx_fifo_fill_level_to_reg()

__STATIC_INLINE uint32_t convert_rx_fifo_fill_level_to_reg ( uint32_t  level)

Convert Rx FIFO fill level to register.

Parameters
level:Fill Level.
Return values
Registervalue.
Note
-

◆ convert_tx_fifo_fill_level_to_reg()

__STATIC_INLINE uint32_t convert_tx_fifo_fill_level_to_reg ( uint32_t  level)

Convert Tx FIFO fill level to register.

Parameters
level:Fill Level.
Return values
Registervalue.
Note
-

Variable Documentation

◆ C

C

Disable to get bourate setting. Enable to get bourate setting. When the function finds within error margin, finish calculation. The function calculates all patern(calculates minimum error margin). Error Margin(%). Fiexd Point Bit.