Kinetis SDK v.1.3 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

This section describes the programming interface of the UART-ISO7816 HAL driver.

Files

file  fsl_uart_hal.h
 

Enumerations

enum  uart_status_t
 Error codes for the UART driver. More...
 
enum  uart_stop_bit_count_t {
  kUartOneStopBit = 0U,
  kUartTwoStopBit = 1U
}
 UART number of stop bits. More...
 
enum  uart_parity_mode_t {
  kUartParityDisabled = 0x0U,
  kUartParityEven = 0x2U,
  kUartParityOdd = 0x3U
}
 UART parity mode. More...
 
enum  uart_bit_count_per_char_t {
  kUart8BitsPerChar = 0U,
  kUart9BitsPerChar = 1U
}
 UART number of bits in a character. More...
 
enum  uart_operation_config_t {
  kUartOperates = 0U,
  kUartStops = 1U
}
 UART operation configuration constants. More...
 
enum  uart_receiver_source_t {
  kUartLoopBack = 0U,
  kUartSingleWire = 1U
}
 UART receiver source select mode. More...
 
enum  uart_wakeup_method_t {
  kUartIdleLineWake = 0U,
  kUartAddrMarkWake = 1U
}
 UART wakeup from standby method constants. More...
 
enum  uart_idle_line_select_t {
  kUartIdleLineAfterStartBit = 0U,
  kUartIdleLineAfterStopBit = 1U
}
 UART idle-line detect selection types. More...
 
enum  uart_break_char_length_t {
  kUartBreakChar10BitMinimum = 0U,
  kUartBreakChar13BitMinimum = 1U
}
 UART break character length settings for transmit/detect. More...
 
enum  uart_singlewire_txdir_t {
  kUartSinglewireTxdirIn = 0U,
  kUartSinglewireTxdirOut = 1U
}
 UART single-wire mode transmit direction. More...
 
enum  uart_ir_tx_pulsewidth_t {
  kUartIrThreeSixteenthsWidth = 0U,
  kUartIrOneSixteenthWidth = 1U,
  kUartIrOneThirtysecondsWidth = 2U,
  kUartIrOneFourthWidth = 3U
}
 UART infrared transmitter pulse width options. More...
 
enum  uart_iso7816_transfer_protocoltype_t {
  kUartIso7816TransfertType0 = 0U,
  kUartIso7816TransfertType1 = 1U
}
 UART ISO7816 transport protocol type options. More...
 
enum  uart_iso7816_onack_config_t {
  kUartIso7816OnackEnable = 0U,
  kUartIso7816OnackDisable = 1U
}
 UART ISO7816 ONACK generation. More...
 
enum  uart_iso7816_anack_config_t {
  kUartIso7816AnackDisable = 0U,
  kUartIso7816AnackEnable = 1U
}
 UART ISO7816 ANACK generation. More...
 
enum  uart_iso7816_initd_config_t {
  kUartIso7816InitdDisable = 0U,
  kUartIso7816InitdEnable = 1U
}
 UART ISO7816 Initial Character detection. More...
 
enum  uart_status_flag_t {
  kUartTxDataRegEmpty = 0U << UART_SHIFT | UART_S1_TDRE_SHIFT,
  kUartTxComplete = 0U << UART_SHIFT | UART_S1_TC_SHIFT,
  kUartRxDataRegFull = 0U << UART_SHIFT | UART_S1_RDRF_SHIFT,
  kUartIdleLineDetect = 0U << UART_SHIFT | UART_S1_IDLE_SHIFT,
  kUartRxOverrun = 0U << UART_SHIFT | UART_S1_OR_SHIFT,
  kUartNoiseDetect = 0U << UART_SHIFT | UART_S1_NF_SHIFT,
  kUartFrameErr = 0U << UART_SHIFT | UART_S1_FE_SHIFT,
  kUartParityErr = 0U << UART_SHIFT | UART_S1_PF_SHIFT,
  kUartRxActiveEdgeDetect = 1U << UART_SHIFT | UART_S2_RXEDGIF_SHIFT,
  kUartRxActive = 1U << UART_SHIFT | UART_S2_RAF_SHIFT
}
 UART status flags. More...
 
enum  uart_interrupt_t {
  kUartIntRxActiveEdge = 0U << UART_SHIFT | UART_BDH_RXEDGIE_SHIFT,
  kUartIntTxDataRegEmpty = 1U << UART_SHIFT | UART_C2_TIE_SHIFT,
  kUartIntTxComplete = 1U << UART_SHIFT | UART_C2_TCIE_SHIFT,
  kUartIntRxDataRegFull = 1U << UART_SHIFT | UART_C2_RIE_SHIFT,
  kUartIntIdleLine = 1U << UART_SHIFT | UART_C2_ILIE_SHIFT,
  kUartIntRxOverrun = 2U << UART_SHIFT | UART_C3_ORIE_SHIFT,
  kUartIntNoiseErrFlag = 2U << UART_SHIFT | UART_C3_NEIE_SHIFT,
  kUartIntFrameErrFlag = 2U << UART_SHIFT | UART_C3_FEIE_SHIFT,
  kUartIntParityErrFlag = 2U << UART_SHIFT | UART_C3_PEIE_SHIFT
}
 UART interrupt configuration structure, default settings are 0 (disabled). More...
 
enum  uart_iso7816_interrupt_t {
  kUartIntIso7816RxThreasholdExceeded = 0U,
  kUartIntIso7816TxThresholdExceeded = 1U,
  kUartIntIso7816GuardTimerViolated = 2U,
  kUartIntIso7816AtrDurationTimer = 3U,
  kUartIntIso7816InitialCharDetected = 4U,
  kUartIntIso7816BlockWaitTimer = 5U,
  kUartIntIso7816CharWaitTimer = 6U,
  kUartIntIso7816WaitTimer = 7U
}
 UART ISO7816-specific interrupt configuration. More...
 

UART Common Configurations

void UART_HAL_Init (UART_Type *base)
 Initializes the UART controller. More...
 
static void UART_HAL_EnableTransmitter (UART_Type *base)
 Enables the UART transmitter. More...
 
static void UART_HAL_DisableTransmitter (UART_Type *base)
 Disables the UART transmitter. More...
 
static bool UART_HAL_IsTransmitterEnabled (UART_Type *base)
 Gets the UART transmitter enabled/disabled configuration setting. More...
 
static void UART_HAL_EnableReceiver (UART_Type *base)
 Enables the UART receiver. More...
 
static void UART_HAL_DisableReceiver (UART_Type *base)
 Disables the UART receiver. More...
 
static bool UART_HAL_IsReceiverEnabled (UART_Type *base)
 Gets the UART receiver enabled/disabled configuration setting. More...
 
uart_status_t UART_HAL_SetBaudRate (UART_Type *base, uint32_t sourceClockInHz, uint32_t baudRate)
 Configures the UART baud rate. More...
 
void UART_HAL_SetBaudRateDivisor (UART_Type *base, uint16_t baudRateDivisor)
 Sets the UART baud rate modulo divisor value. More...
 
static void UART_HAL_SetBitCountPerChar (UART_Type *base, uart_bit_count_per_char_t bitCountPerChar)
 Configures the number of bits per character in the UART controller. More...
 
void UART_HAL_SetParityMode (UART_Type *base, uart_parity_mode_t parityMode)
 Configures the parity mode in the UART controller. More...
 
static uint32_t UART_HAL_GetDataRegAddr (UART_Type *base)
 Get UART transmit/receive data register address. More...
 

UART Interrupts and DMA

void UART_HAL_SetIntMode (UART_Type *base, uart_interrupt_t interrupt, bool enable)
 Configures the UART module interrupts to enable/disable various interrupt sources. More...
 
bool UART_HAL_GetIntMode (UART_Type *base, uart_interrupt_t interrupt)
 Returns whether the UART module interrupts is enabled/disabled. More...
 

UART Transfer Functions

void UART_HAL_Putchar (UART_Type *base, uint8_t data)
 This function allows the user to send an 8-bit character from the UART data register. More...
 
void UART_HAL_Putchar9 (UART_Type *base, uint16_t data)
 This function allows the user to send a 9-bit character from the UART data register. More...
 
void UART_HAL_Getchar (UART_Type *base, uint8_t *readData)
 This function gets a received 8-bit character from the UART data register. More...
 
void UART_HAL_Getchar9 (UART_Type *base, uint16_t *readData)
 This function gets a received 9-bit character from the UART data register. More...
 
void UART_HAL_SendDataPolling (UART_Type *base, const uint8_t *txBuff, uint32_t txSize)
 Sends out multiple bytes of data using polling method. More...
 
uart_status_t UART_HAL_ReceiveDataPolling (UART_Type *base, uint8_t *rxBuff, uint32_t rxSize)
 Receives multiple bytes of data using polling method. More...
 

UART Status Flags

bool UART_HAL_GetStatusFlag (UART_Type *base, uart_status_flag_t statusFlag)
 Gets all UART status flag states. More...
 
uart_status_t UART_HAL_ClearStatusFlag (UART_Type *base, uart_status_flag_t statusFlag)
 Clears an individual and specific UART status flag. More...
 

UART Special Feature Configurations

static void UART_HAL_SetLoopCmd (UART_Type *base, bool enable)
 Configures the UART loopback operation. More...
 
static void UART_HAL_SetReceiverSource (UART_Type *base, uart_receiver_source_t source)
 Configures the UART single-wire operation. More...
 
static void UART_HAL_SetTransmitterDir (UART_Type *base, uart_singlewire_txdir_t direction)
 Configures the UART transmit direction while in single-wire mode. More...
 
uart_status_t UART_HAL_PutReceiverInStandbyMode (UART_Type *base)
 Places the UART receiver in standby mode. More...
 
static void UART_HAL_PutReceiverInNormalMode (UART_Type *base)
 Places the UART receiver in normal mode (disable standby mode operation). More...
 
static bool UART_HAL_IsReceiverInStandby (UART_Type *base)
 Determines if the UART receiver is currently in standby mode. More...
 
static void UART_HAL_SetReceiverWakeupMethod (UART_Type *base, uart_wakeup_method_t method)
 Selects the UART receiver wakeup method (idle-line or address-mark) from standby mode. More...
 
static uart_wakeup_method_t UART_HAL_GetReceiverWakeupMethod (UART_Type *base)
 Gets the UART receiver wakeup method (idle-line or address-mark) from standby mode. More...
 
void UART_HAL_ConfigIdleLineDetect (UART_Type *base, uint8_t idleLine, uint8_t rxWakeIdleDetect)
 Configures the operation options of the UART idle line detect. More...
 
static void UART_HAL_SetBreakCharTransmitLength (UART_Type *base, uart_break_char_length_t length)
 Configures the UART break character transmit length. More...
 
static void UART_HAL_SetBreakCharCmd (UART_Type *base, bool enable)
 Configures the UART transmit send break character operation. More...
 
void UART_HAL_SetMatchAddress (UART_Type *base, bool matchAddrMode1, bool matchAddrMode2, uint8_t matchAddrValue1, uint8_t matchAddrValue2)
 Configures the UART match address mode control operation. More...
 

Enumeration Type Documentation

These constants define the number of allowable stop bits to configure in a UART base.

Enumerator
kUartOneStopBit 

one stop bit

kUartTwoStopBit 

two stop bits

These constants define the UART parity mode options: disabled or enabled of type even or odd.

Enumerator
kUartParityDisabled 

parity disabled

kUartParityEven 

parity enabled, type even, bit setting: PE|PT = 10

kUartParityOdd 

parity enabled, type odd, bit setting: PE|PT = 11

These constants define the number of allowable data bits per UART character. Note, check the UART documentation to determine if the desired UART base supports the desired number of data bits per UART character.

Enumerator
kUart8BitsPerChar 

8-bit data characters

kUart9BitsPerChar 

9-bit data characters

This provides constants for UART operational states: "operates normally" or "stops/ceases operation"

Enumerator
kUartOperates 

UART continues to operate normally.

kUartStops 

UART ceases operation.

Enumerator
kUartLoopBack 

Internal loop back mode.

kUartSingleWire 

Single wire mode.

This provides constants for the two UART wakeup methods: idle-line or address-mark.

Enumerator
kUartIdleLineWake 

The idle-line wakes UART receiver from standby.

kUartAddrMarkWake 

The address-mark wakes UART receiver from standby.

This provides constants for the UART idle character bit-count start: either after start or stop bit.

Enumerator
kUartIdleLineAfterStartBit 

UART idle character bit count start after start bit.

kUartIdleLineAfterStopBit 

UART idle character bit count start after stop bit.

This provides constants for the UART break character length for both transmission and detection purposes. Note that the actual maximum bit times may vary depending on the UART base.

Enumerator
kUartBreakChar10BitMinimum 

UART break char length 10 bit times (if M = 0, SBNS = 0) or 11 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 12 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 13 (if M10 = 1, SNBS = 1)

kUartBreakChar13BitMinimum 

UART break char length 13 bit times (if M = 0, SBNS = 0) or 14 (if M = 1, SBNS = 0 or M = 0, SBNS = 1) or 15 (if M = 1, SBNS = 1 or M10 = 1, SNBS = 0) or 16 (if M10 = 1, SNBS = 1)

This provides constants for the UART transmit direction when configured for single-wire mode. The transmit line TXDIR is either an input or output.

Enumerator
kUartSinglewireTxdirIn 

UART Single-Wire mode TXDIR input.

kUartSinglewireTxdirOut 

UART Single-Wire mode TXDIR output.

This provides constants for the UART infrared (IR) pulse widths. Options include 3/16, 1/16 1/32, and 1/4 pulse widths.

Enumerator
kUartIrThreeSixteenthsWidth 

3/16 pulse

kUartIrOneSixteenthWidth 

1/16 pulse

kUartIrOneThirtysecondsWidth 

1/32 pulse

kUartIrOneFourthWidth 

1/4 pulse

This provides constants for the UART ISO7816 transport ptotocol types.

Enumerator
kUartIso7816TransfertType0 

Transfer type 0.

kUartIso7816TransfertType1 

Transfer type 1.

This provides constants for the UART ISO7816 module ONACK generation.

Enumerator
kUartIso7816OnackEnable 

Enable ONACK generation.

kUartIso7816OnackDisable 

Disable ONACK generation.

This provides constants for the UART ISO7816 module ANACK generation.

Enumerator
kUartIso7816AnackDisable 

Disable ANACK generation.

kUartIso7816AnackEnable 

Enable ANACK generation.

This provides constants for the UART ISO7816 module Initial generation.

Enumerator
kUartIso7816InitdDisable 

Disable Initial Character detection.

kUartIso7816InitdEnable 

Enable Initial Character detection.

This provides constants for the UART status flags for use in the UART functions.

Enumerator
kUartTxDataRegEmpty 

Transmit data register empty flag, sets when transmit buffer is empty.

kUartTxComplete 

Transmission complete flag, sets when transmission activity complete.

kUartRxDataRegFull 

Receive data register full flag, sets when the receive data buffer is full.

kUartIdleLineDetect 

Idle line detect flag, sets when idle line detected.

kUartRxOverrun 

Receive Overrun, sets when new data is received before data is read from receive register.

kUartNoiseDetect 

Receive takes 3 samples of each received bit.

If any of these samples differ, noise flag sets

kUartFrameErr 

Frame error flag, sets if logic 0 was detected where stop bit expected.

kUartParityErr 

If parity enabled, sets upon parity error detection.

kUartRxActiveEdgeDetect 

Receive pin active edge interrupt flag, sets when active edge detected.

kUartRxActive 

Receiver Active Flag (RAF), sets at beginning of valid start bit.

This structure contains the settings for all of the UART interrupt configurations.

Enumerator
kUartIntRxActiveEdge 

Receive Active Edge.

kUartIntTxDataRegEmpty 

Transmit data register empty.

kUartIntTxComplete 

Transmission complete.

kUartIntRxDataRegFull 

Receiver data register full.

kUartIntIdleLine 

Idle line.

kUartIntRxOverrun 

Receiver Overrun.

kUartIntNoiseErrFlag 

Noise error flag.

kUartIntFrameErrFlag 

Framing error flag.

kUartIntParityErrFlag 

Parity error flag.

This enumeration contains the settings for all of the UART ISO7816 feature-specific interrupt configurations.

Enumerator
kUartIntIso7816RxThreasholdExceeded 

Receive Threshold Exceeded.

kUartIntIso7816TxThresholdExceeded 

TransmitThresholdExceeded.

kUartIntIso7816GuardTimerViolated 

Guard Timer Violated.

kUartIntIso7816AtrDurationTimer 

ATR Duration Timer.

kUartIntIso7816InitialCharDetected 

Initial Character Detected.

kUartIntIso7816BlockWaitTimer 

Block Wait Timer.

kUartIntIso7816CharWaitTimer 

Character Wait Timer.

kUartIntIso7816WaitTimer 

Wait Timer.

Function Documentation

void UART_HAL_Init ( UART_Type *  base)

This function initializes the module to a known state.

Parameters
baseUART module base pointer.
static void UART_HAL_EnableTransmitter ( UART_Type *  base)
inlinestatic

This function allows the user to enable the UART transmitter.

Parameters
baseUART module base pointer.
static void UART_HAL_DisableTransmitter ( UART_Type *  base)
inlinestatic

This function allows the user to disable the UART transmitter.

Parameters
baseUART module base pointer.
static bool UART_HAL_IsTransmitterEnabled ( UART_Type *  base)
inlinestatic

This function allows the user to get the setting of the UART transmitter.

Parameters
baseUART module base pointer.
Returns
The state of UART transmitter enable(true)/disable(false) setting.
static void UART_HAL_EnableReceiver ( UART_Type *  base)
inlinestatic

This function allows the user to enable the UART receiver.

Parameters
baseUART module base pointer.
static void UART_HAL_DisableReceiver ( UART_Type *  base)
inlinestatic

This function allows the user to disable the UART receiver.

Parameters
baseUART module base pointer.
static bool UART_HAL_IsReceiverEnabled ( UART_Type *  base)
inlinestatic

This function allows the user to get the setting of the UART receiver.

Parameters
baseUART module base pointer.
Returns
The state of UART receiver enable(true)/disable(false) setting.
uart_status_t UART_HAL_SetBaudRate ( UART_Type *  base,
uint32_t  sourceClockInHz,
uint32_t  baudRate 
)

This function programs the UART baud rate to the desired value passed in by the user. The user must also pass in the module source clock so that the function can calculate the baud rate divisors to their appropriate values. In some UART bases it is required that the transmitter/receiver be disabled before calling this function. Generally this is applied to all UARTs to ensure safe operation.

Parameters
baseUART module base pointer.
sourceClockInHzUART source input clock in Hz.
baudRateUART desired baud rate.
Returns
An error code or kStatus_UART_Success
void UART_HAL_SetBaudRateDivisor ( UART_Type *  base,
uint16_t  baudRateDivisor 
)

This function allows the user to program the baud rate divisor directly in situations where the divisor value is known. In this case, the user may not want to call the UART_HAL_SetBaudRate() function, because the divisor is already known.

Parameters
baseUART module base pointer.
baudRateDivisorThe baud rate modulo division "SBR" value.
static void UART_HAL_SetBitCountPerChar ( UART_Type *  base,
uart_bit_count_per_char_t  bitCountPerChar 
)
inlinestatic

This function allows the user to configure the number of bits per character according to the typedef uart_bit_count_per_char_t.

Parameters
baseUART module base pointer.
bitCountPerCharNumber of bits per char (8, 9, or 10, depending on the UART base).
void UART_HAL_SetParityMode ( UART_Type *  base,
uart_parity_mode_t  parityMode 
)

This function allows the user to configure the parity mode of the UART controller to disable it or enable it for even parity or for odd parity.

Parameters
baseUART module base pointer.
parityModeParity mode setting (enabled, disable, odd, even - see parity_mode_t struct).
static uint32_t UART_HAL_GetDataRegAddr ( UART_Type *  base)
inlinestatic
Parameters
baseUART module base pointer.
Returns
UART transmit/receive data register address.
void UART_HAL_SetIntMode ( UART_Type *  base,
uart_interrupt_t  interrupt,
bool  enable 
)
Parameters
baseUART module base pointer.
interruptUART interrupt configuration data.
enabletrue: enable, false: disable.
bool UART_HAL_GetIntMode ( UART_Type *  base,
uart_interrupt_t  interrupt 
)
Parameters
baseUART module base pointer.
interruptUART interrupt configuration data.
Returns
true: enable, false: disable.
void UART_HAL_Putchar ( UART_Type *  base,
uint8_t  data 
)
Parameters
baseUART module base pointer.
dataThe data to send of size 8-bit.
void UART_HAL_Putchar9 ( UART_Type *  base,
uint16_t  data 
)
Parameters
baseUART module base pointer.
dataThe data to send of size 9-bit.
void UART_HAL_Getchar ( UART_Type *  base,
uint8_t *  readData 
)
Parameters
baseUART module base pointer.
readDataThe received data read from data register of size 8-bit.
void UART_HAL_Getchar9 ( UART_Type *  base,
uint16_t *  readData 
)
Parameters
baseUART module base pointer.
readDataThe received data read from data register of size 9-bit.
void UART_HAL_SendDataPolling ( UART_Type *  base,
const uint8_t *  txBuff,
uint32_t  txSize 
)

This function only supports 8-bit transaction.

Parameters
baseUART module base pointer.
txBuffThe buffer pointer which saves the data to be sent.
txSizeSize of data to be sent in unit of byte.
uart_status_t UART_HAL_ReceiveDataPolling ( UART_Type *  base,
uint8_t *  rxBuff,
uint32_t  rxSize 
)

This function only supports 8-bit transaction.

Parameters
baseUART module base pointer.
rxBuffThe buffer pointer which saves the data to be received.
rxSizeSize of data need to be received in unit of byte.
Returns
Whether the transaction is success or rx overrun.
bool UART_HAL_GetStatusFlag ( UART_Type *  base,
uart_status_flag_t  statusFlag 
)
Parameters
baseUART module base pointer.
statusFlagStatus flag name.
Returns
Whether the current status flag is set(true) or not(false).
uart_status_t UART_HAL_ClearStatusFlag ( UART_Type *  base,
uart_status_flag_t  statusFlag 
)

This function allows the user to clear an individual and specific UART status flag. Refer to structure definition uart_status_flag_t for list of status bits.

Parameters
baseUART module base pointer.
statusFlagThe desired UART status flag to clear.
Returns
An error code or kStatus_UART_Success.
static void UART_HAL_SetLoopCmd ( UART_Type *  base,
bool  enable 
)
inlinestatic

This function enables or disables the UART loopback operation.

Parameters
baseUART module base pointer.
enableThe UART loopback mode configuration, either disabled (false) or enabled (true).
static void UART_HAL_SetReceiverSource ( UART_Type *  base,
uart_receiver_source_t  source 
)
inlinestatic

This function enables or disables the UART single-wire operation. In some UART bases it is required that the transmitter/receiver be disabled before calling this function. This may be applied to all UARTs to ensure safe operation.

Parameters
baseUART module base pointer.
sourceThe UART single-wire mode configuration.
static void UART_HAL_SetTransmitterDir ( UART_Type *  base,
uart_singlewire_txdir_t  direction 
)
inlinestatic

This function configures the transmitter direction when the UART is configured for single-wire operation.

Parameters
baseUART module base pointer.
directionThe UART single-wire mode transmit direction configuration of type uart_singlewire_txdir_t (either kUartSinglewireTxdirIn or kUartSinglewireTxdirOut.
uart_status_t UART_HAL_PutReceiverInStandbyMode ( UART_Type *  base)

This function, when called, places the UART receiver into standby mode. In some UART bases, there are conditions that must be met before placing Rx in standby mode. Before placing UART in standby, determine if receiver is set to wake on idle, and if receiver is already in idle state. NOTE: RWU should only be set with C1[WAKE] = 0 (wakeup on idle) if the channel is currently not idle. This can be determined by the S2[RAF] flag. If set to wake up FROM an IDLE event and the channel is already idle, it is possible that the UART discards data because data must be received (or a LIN break detect) after an IDLE is detected before IDLE is allowed to be reasserted.

Parameters
baseUART module base pointer.
Returns
Error code or kStatus_UART_Success.
static void UART_HAL_PutReceiverInNormalMode ( UART_Type *  base)
inlinestatic

This function, when called, places the UART receiver into normal mode and out of standby mode.

Parameters
baseUART module base pointer.
static bool UART_HAL_IsReceiverInStandby ( UART_Type *  base)
inlinestatic

This function determines the state of the UART receiver. If it returns true, this means that the UART receiver is in standby mode; if it returns false, the UART receiver is in normal mode.

Parameters
baseUART module base pointer.
Returns
The UART receiver is in normal mode (false) or standby mode (true).
static void UART_HAL_SetReceiverWakeupMethod ( UART_Type *  base,
uart_wakeup_method_t  method 
)
inlinestatic

This function configures the wakeup method of the UART receiver from standby mode. The options are idle-line wake or address-mark wake.

Parameters
baseUART module base pointer.
methodThe UART receiver wakeup method options: kUartIdleLineWake - Idle-line wake or kUartAddrMarkWake - address-mark wake.
static uart_wakeup_method_t UART_HAL_GetReceiverWakeupMethod ( UART_Type *  base)
inlinestatic

This function returns how the UART receiver is configured to wake from standby mode. The wake method options that can be returned are kUartIdleLineWake or kUartAddrMarkWake.

Parameters
baseUART module base pointer.
Returns
The UART receiver wakeup from standby method, false: kUartIdleLineWake (idle-line wake) or true: kUartAddrMarkWake (address-mark wake).
void UART_HAL_ConfigIdleLineDetect ( UART_Type *  base,
uint8_t  idleLine,
uint8_t  rxWakeIdleDetect 
)

This function allows the user to configure the UART idle-line detect operation. There are two separate operations for the user to configure, the idle line bit-count start and the receive wake up affect on IDLE status bit. The user passes in a structure of type uart_idle_line_config_t.

Parameters
baseUART module base pointer.
idleLineIdle bit count start: 0 - after start bit (default), 1 - after stop bit
rxWakeIdleDetectReceiver Wake Up Idle Detect. IDLE status bit operation during receive standby. Controls whether idle character that wakes up receiver also sets IDLE status bit. 0 - IDLE status bit doesn't get set (default), 1 - IDLE status bit gets set
static void UART_HAL_SetBreakCharTransmitLength ( UART_Type *  base,
uart_break_char_length_t  length 
)
inlinestatic

This function allows the user to configure the UART break character transmit length. Refer to the typedef uart_break_char_length_t for setting options. In some UART bases it is required that the transmitter be disabled before calling this function. This may be applied to all UARTs to ensure safe operation.

Parameters
baseUART module base pointer.
lengthThe UART break character length setting of type uart_break_char_length_t, either a minimum 10-bit times or a minimum 13-bit times.
static void UART_HAL_SetBreakCharCmd ( UART_Type *  base,
bool  enable 
)
inlinestatic

This function allows the user to queue a UART break character to send. If true is passed into the function, then a break character is queued for transmission. A break character is continuously queued until this function is called again when a false is passed into this function.

Parameters
baseUART module base pointer.
enableIf false, the UART normal/queue break character setting is disabled, which configures the UART for normal transmitter operation. If true, a break character is queued for transmission.
void UART_HAL_SetMatchAddress ( UART_Type *  base,
bool  matchAddrMode1,
bool  matchAddrMode2,
uint8_t  matchAddrValue1,
uint8_t  matchAddrValue2 
)

(Note: Feature available on select UART bases)

The function allows the user to configure the UART match address control operation. The user has the option to enable the match address mode and to program the match address value. There are two match address modes, each with its own enable and programmable match address value.

Parameters
baseUART module base pointer.
matchAddrMode1If true, this enables match address mode 1 (MAEN1), where false disables.
matchAddrMode2If true, this enables match address mode 2 (MAEN2), where false disables.
matchAddrValue1The match address value to program for match address mode 1.
matchAddrValue2The match address value to program for match address mode 2.