Herzog Library 00.00.01
rel_libdev.herzog.00.00.01.10606
|
Go to the source code of this file.
Data Structures | |
struct | UART_SFRS_t |
A structure to represent Special Function Registers for UART. More... | |
Macros | |
#define | UART_SFRS ((__IO UART_SFRS_t *) (0x50000010)) |
#define | E_UART_STATUS_DATA_READY ((uint8_t) (1<<0)) |
#define | E_UART_STATUS_OVERRUN_ERROR ((uint8_t) (1<<1)) |
#define | E_UART_STATUS_PARITY_ERROR ((uint8_t) (1<<2)) |
#define | E_UART_STATUS_FRAME_ERROR ((uint8_t) (1<<3)) |
#define | E_UART_STATUS_BREAKINT_ERROR ((uint8_t) (1<<4)) |
#define | E_UART_STATUS_TX_FIFO_EMPTY ((uint8_t) (1<<5)) |
#define | E_UART_STATUS_TX_EMPTY ((uint8_t) (1<<6)) |
#define | E_UART_STATUS_ERROR ((uint8_t) (1<<7)) |
#define | E_UART_INT_STATUS_NONE 0x01 |
#define | E_UART_INT_STATUS_TX_COMPLETE 0x02 |
#define | E_UART_INT_STATUS_RX_READY 0x04 |
#define | E_UART_INT_STATUS_RX_ERROR 0x06 |
#define | E_UART_INT_STATUS_RX_TIMEOUT 0x0C |
#define | E_UART_DATA_SIZE_5BIT 0 |
#define | E_UART_DATA_SIZE_6BIT 1 |
#define | E_UART_DATA_SIZE_7BIT 2 |
#define | E_UART_DATA_SIZE_8BIT 3 |
#define | E_UART_STOP_BIT_1 0 |
#define | E_UART_STOP_BIT_2 1 |
#define | E_UART_PARITY_BIT_ODD 0 |
#define | E_UART_PARITY_BIT_EVEN 1 |
#define | E_UART_INT_DELAY_1 0 |
#define | E_UART_INT_DELAY_3 1 |
Functions | |
static __INLINE void | f_UART_BaudRateDiv (uint32_t div) |
Set UART baud rate divider. More... | |
static __INLINE uint8_t | f_UART_LineStatus (void) |
Get UART line status. More... | |
static __INLINE void | f_UART_RxFiFoReset (void) |
Reset UART receiver FIFO. More... | |
static __INLINE void | f_UART_TxFiFoReset (void) |
Reset UART transmitter FIFO. More... | |
static __INLINE void | f_UART_Enable (void) |
Enable UART hardware module. More... | |
static __INLINE void | f_UART_Disable (void) |
Disable UART hardware module. More... | |
static __INLINE uint8_t | f_UART_RxData (void) |
UART receive data. More... | |
static __INLINE void | f_UART_TxData (uint8_t data) |
UART transmit data. More... | |
static __INLINE void | f_UART_EnableRxIRQ (void) |
Enable UART receiver interrupt. More... | |
static __INLINE void | f_UART_DisableRxIRQ (void) |
Disable UART receiver interrupt. More... | |
static __INLINE void | f_UART_EnableTxIRQ (void) |
Enable UART transmitter interrupt. More... | |
static __INLINE void | f_UART_DisableTxIRQ (void) |
Disable UART transmitter interrupt. More... | |
static __INLINE void | f_UART_EnableRxTimeoutIRQ (void) |
Enable UART receiver time out interrupt. More... | |
static __INLINE void | f_UART_DisableRxTimeoutIRQ (void) |
Disable UART receiver time out interrupt. More... | |
static __INLINE void | f_UART_EnableRxErrorIRQ (void) |
Enable UART receiver error interrupt. More... | |
static __INLINE void | f_UART_DisableRxErrorIRQ (void) |
Disable UART receiver error interrupt. More... | |
static __INLINE uint8_t | f_UART_TxEmpty (void) |
Check if UART transmitter empty. More... | |
static __INLINE uint8_t | f_UART_RxDataReady (void) |
check if UART data received More... | |
static __INLINE uint8_t | f_UART_IntStatus (void) |
Get UART interrupt status. More... | |
static __INLINE void | f_UART_SetDataSize (uint8_t size) |
Set UART data size in number of bits. More... | |
static __INLINE void | f_UART_SetStopBit (uint8_t stop) |
Set UART stop bit size in number of bits. More... | |
static __INLINE void | f_UART_SetEvenParityBit (void) |
Set UART parity bit as even. More... | |
static __INLINE void | f_UART_SetOddParityBit (void) |
Set UART parity bit as odd. More... | |
static __INLINE void | f_UART_EnableParity (void) |
Enable UART parity. More... | |
static __INLINE void | f_UART_DisableParity (void) |
Disable UART parity. More... | |
static __INLINE void | f_UART_EnableStickyParity (void) |
Enable UART sticky parity. More... | |
static __INLINE void | f_UART_DisableStickyParity (void) |
Disable UART sticky parity. More... | |
static __INLINE void | f_UART_EnableBreak (void) |
Enable UART break. More... | |
static __INLINE void | f_UART_DisableBreak (void) |
Disable UART break. More... | |
static __INLINE void | f_UART_EnableLoopBack (void) |
Enable UART loop back. More... | |
static __INLINE void | f_UART_DisableLoopBack (void) |
Disable UART loop back. More... | |
static __INLINE void | f_UART_SetInterruptDelay (uint8_t delay) |
Set UART interrupt delay in cycles. More... | |
This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.
#define E_UART_DATA_SIZE_5BIT 0 |
UART data size 5 bits.
#define E_UART_DATA_SIZE_6BIT 1 |
UART data size 6 bits.
#define E_UART_DATA_SIZE_7BIT 2 |
UART data size 7 bits.
#define E_UART_DATA_SIZE_8BIT 3 |
UART data size 8 bits.
#define E_UART_INT_DELAY_1 0 |
UART interrupt delay 1 cycle.
#define E_UART_INT_DELAY_3 1 |
UART interrupt delay 3 cycles.
#define E_UART_INT_STATUS_NONE 0x01 |
UART no interrupt.
#define E_UART_INT_STATUS_RX_ERROR 0x06 |
UART error occurred in receiver.
#define E_UART_INT_STATUS_RX_READY 0x04 |
UART data received.
#define E_UART_INT_STATUS_RX_TIMEOUT 0x0C |
UART receiver time out.
#define E_UART_INT_STATUS_TX_COMPLETE 0x02 |
UART transmission complete.
#define E_UART_PARITY_BIT_EVEN 1 |
UART even parity bit.
#define E_UART_PARITY_BIT_ODD 0 |
UART odd parity bit.
#define E_UART_STATUS_BREAKINT_ERROR ((uint8_t) (1<<4)) |
UART break interrupt occurred.
#define E_UART_STATUS_DATA_READY ((uint8_t) (1<<0)) |
UART data ready.
#define E_UART_STATUS_ERROR ((uint8_t) (1<<7)) |
UART error occurred.
#define E_UART_STATUS_FRAME_ERROR ((uint8_t) (1<<3)) |
UART frame error occurred.
#define E_UART_STATUS_OVERRUN_ERROR ((uint8_t) (1<<1)) |
UART over run error occurred.
#define E_UART_STATUS_PARITY_ERROR ((uint8_t) (1<<2)) |
UART parity error occurred.
#define E_UART_STATUS_TX_EMPTY ((uint8_t) (1<<6)) |
UART transmitter empty.
#define E_UART_STATUS_TX_FIFO_EMPTY ((uint8_t) (1<<5)) |
UART transmission FIFO empty.
#define E_UART_STOP_BIT_1 0 |
UART 1 stop bit.
#define E_UART_STOP_BIT_2 1 |
UART 2 stop bit.
#define UART_SFRS ((__IO UART_SFRS_t *) (0x50000010)) |
The starting address of UART SFRS.
|
static |
Set UART baud rate divider.
div | The baud rate divider. |
|
static |
Disable UART hardware module.
|
static |
Disable UART break.
|
static |
Disable UART loop back.
|
static |
Disable UART parity.
|
static |
Disable UART receiver error interrupt.
|
static |
Disable UART receiver interrupt.
|
static |
Disable UART receiver time out interrupt.
|
static |
Disable UART sticky parity.
|
static |
Disable UART transmitter interrupt.
|
static |
Enable UART hardware module.
|
static |
Enable UART break.
|
static |
Enable UART loop back.
|
static |
Enable UART parity.
|
static |
Enable UART receiver error interrupt.
|
static |
Enable UART receiver interrupt.
|
static |
Enable UART receiver time out interrupt.
|
static |
Enable UART sticky parity.
|
static |
Enable UART transmitter interrupt.
|
static |
Get UART interrupt status.
|
static |
Get UART line status.
|
static |
UART receive data.
|
static |
check if UART data received
|
static |
Reset UART receiver FIFO.
|
static |
Set UART data size in number of bits.
size | The number of bits. |
|
static |
Set UART parity bit as even.
|
static |
Set UART interrupt delay in cycles.
|
static |
Set UART parity bit as odd.
|
static |
Set UART stop bit size in number of bits.
stop | The number of bits. |
|
static |
UART transmit data.
data | The data to be transmitted. |
|
static |
Check if UART transmitter empty.
|
static |
Reset UART transmitter FIFO.