![]() |
ISF
2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
|
fsl_uart_hal.h defines structures and types for the i2c master HAL layer. More...
Go to the source code of this file.
Data Structures | |
struct | UartConfig |
UART configuration structure. More... | |
Typedefs | |
typedef enum _uart_status | uart_status_t |
Error codes for the UART driver. More... | |
typedef enum _uart_stop_bit_count | uart_stop_bit_count_t |
UART number of stop bits. More... | |
typedef enum _uart_parity_mode | uart_parity_mode_t |
UART parity mode. More... | |
typedef enum _uart_bit_count_per_char | uart_bit_count_per_char_t |
UART number of bits in a character. More... | |
typedef enum _uart_operation_config | uart_operation_config_t |
UART operation configuration constants. More... | |
typedef enum _uart_wakeup_method | uart_wakeup_method_t |
UART wakeup from standby method constants. More... | |
typedef enum _uart_idle_line_select | uart_idle_line_select_t |
UART idle line detect selection types. More... | |
typedef enum _uart_break_char_length | uart_break_char_length_t |
UART break character length settings for transmit/detect. More... | |
typedef struct UartConfig | uart_config_t |
UART configuration structure. More... | |
Functions | |
uart_status_t | uart_hal_init (uint32 uartInstance, const uart_config_t *config) |
Initialize the UART controller. More... | |
void | uart_hal_enable_transmitter (uint32 uartInstance) |
Enable the UART transmitter. More... | |
void | uart_hal_disable_transmitter (uint32 uartInstance) |
Disable the UART transmitter. More... | |
void | uart_hal_enable_receiver (uint32 uartInstance) |
Enable the UART receiver. More... | |
void | uart_hal_disable_receiver (uint32 uartInstance) |
Disable the UART receiver. More... | |
fsl_uart_hal.h defines structures and types for the i2c master HAL layer.
File: fsl_uart_hal.h
Copyright (c) 2014, Freescale Semiconductor, Inc.
Definition in file fsl_uart_hal.h.
typedef enum _uart_bit_count_per_char uart_bit_count_per_char_t |
UART number of bits in a character.
These constants define the number of allowable data bits per UART character. Note, check the UART documentation to determine if the desired UART instance supports the desired number of data bits per UART character.
typedef enum _uart_break_char_length uart_break_char_length_t |
UART break character length settings for transmit/detect.
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 instance.
typedef struct UartConfig uart_config_t |
UART configuration structure.
This structure contains the settings for the most common UART configurations including the UART module source clock, baud rate, parity mode, stop bit count, data bit count per character, and tx/rx inversion options (which is the least common of the configuration).
typedef enum _uart_idle_line_select uart_idle_line_select_t |
UART idle line detect selection types.
This provides constants for the UART idle character bit-count start: either after start or stop bit.
typedef enum _uart_operation_config uart_operation_config_t |
UART operation configuration constants.
This provides constants for UART operational states: "operates normally" or "stops/siezes to operation"
typedef enum _uart_parity_mode uart_parity_mode_t |
UART parity mode.
These constants define the UART parity mode options: disabled or enabled of type even or odd.
typedef enum _uart_status uart_status_t |
Error codes for the UART driver.
typedef enum _uart_stop_bit_count uart_stop_bit_count_t |
UART number of stop bits.
These constants define the number of allowable stop bits to configure in a UART instance.
typedef enum _uart_wakeup_method uart_wakeup_method_t |
UART wakeup from standby method constants.
This provides constants for the two UART wakeup methods: idle-line or address-mark.
UART number of bits in a character.
These constants define the number of allowable data bits per UART character. Note, check the UART documentation to determine if the desired UART instance supports the desired number of data bits per UART character.
Enumerator | |
---|---|
kUart8BitsPerChar |
8-bit data characters |
kUart9BitsPerChar |
9-bit data characters |
kUart10BitsPerChar |
10-bit data characters |
Definition at line 74 of file fsl_uart_hal.h.
UART break character length settings for transmit/detect.
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 instance.
Definition at line 118 of file fsl_uart_hal.h.
UART idle line detect selection types.
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 |
Definition at line 107 of file fsl_uart_hal.h.
UART operation configuration constants.
This provides constants for UART operational states: "operates normally" or "stops/siezes to operation"
Enumerator | |
---|---|
kUartOperates |
UART continues to operate normally |
kUartStops |
UART siezes operation |
Definition at line 86 of file fsl_uart_hal.h.
enum _uart_parity_mode |
UART parity mode.
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 |
Definition at line 61 of file fsl_uart_hal.h.
enum _uart_status |
Error codes for the UART driver.
Definition at line 21 of file fsl_uart_hal.h.
enum _uart_stop_bit_count |
UART number of stop bits.
These constants define the number of allowable stop bits to configure in a UART instance.
Enumerator | |
---|---|
kUartOneStopBit |
one stop bit. |
kUartTwoStopBit |
two stop bits. |
Definition at line 51 of file fsl_uart_hal.h.
enum _uart_wakeup_method |
UART wakeup from standby method constants.
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 addr-mark wakes UART receiver from standby |
Definition at line 96 of file fsl_uart_hal.h.
void uart_hal_disable_receiver | ( | uint32 | uartInstance | ) |
Disable the UART receiver.
This function allows the user to disable the UART receiver.
uartInstance | UART module instance number. |
Referenced by uart_adapter_stop().
void uart_hal_disable_transmitter | ( | uint32 | uartInstance | ) |
Disable the UART transmitter.
This function allows the user to disable the UART transmitter.
uartInstance | UART module instance number. |
Referenced by uart_adapter_stop().
void uart_hal_enable_receiver | ( | uint32 | uartInstance | ) |
Enable the UART receiver.
This function allows the user to enable the UART receiver.
uartInstance | UART module instance number. |
Referenced by uart_adapter_start().
void uart_hal_enable_transmitter | ( | uint32 | uartInstance | ) |
Enable the UART transmitter.
This function allows the user to enable the UART transmitter.
uartInstance | UART module instance number. |
Referenced by uart_adapter_start().
uart_status_t uart_hal_init | ( | uint32 | uartInstance, |
const uart_config_t * | config | ||
) |
Initialize the UART controller.
This function will initialize the module to user defined settings and default settings. Here is an example demonstrating how to define the uart_config_t structure and call the uart_hal_init function:
uartInstance | UART module instance number. |
config | UART configuration data. |
Referenced by uart_adapter_configure().