This is the generated driver source file for the UART1 driver. More...
Go to the source code of this file.
Macros | |
#define | UART1_CLOCK 100000000U |
#define | UART1_BAUD_TO_BRG_WITH_FRACTIONAL(x) (UART1_CLOCK/(x)) |
#define | UART1_BAUD_TO_BRG_WITH_BRGH_1(x) (UART1_CLOCK/(4U*(x))-1U) |
#define | UART1_BAUD_TO_BRG_WITH_BRGH_0(x) (UART1_CLOCK/(16U*(x))-1U) |
#define | UART1_BRG_TO_BAUD_WITH_FRACTIONAL(x) (UART1_CLOCK/(x)) |
#define | UART1_BRG_TO_BAUD_WITH_BRGH_1(x) (UART1_CLOCK/(4U*((x)+1U))) |
#define | UART1_BRG_TO_BAUD_WITH_BRGH_0(x) (UART1_CLOCK/(16U*((x)+1U))) |
#define | UART1_MIN_ACHIEVABLE_BAUD_WITH_FRACTIONAL 95U |
#define | UART1_MIN_ACHIEVABLE_BAUD_WITH_BRGH_1 24U |
Functions | |
void | UART1_Initialize (void) |
Initializes the UART driver. | |
void | UART1_Deinitialize (void) |
Deinitializes the UART to POR values. | |
uint8_t | UART1_Read (void) |
Reads a byte of data from the UART1. | |
void | UART1_Write (uint8_t txData) |
Writes a byte of data to the UART1. | |
bool | UART1_IsRxReady (void) |
Returns a boolean value if data is available to read. | |
bool | UART1_IsTxReady (void) |
Returns a boolean value if data can be written. | |
bool | UART1_IsTxDone (void) |
Indicates if all bytes have been transferred. | |
void | UART1_TransmitEnable (void) |
Enables UART1 transmit. | |
void | UART1_TransmitDisable (void) |
Disables UART1 transmit. | |
void | UART1_AutoBaudSet (bool enable) |
Enables or disables UART1 Auto-Baud detection. | |
bool | UART1_AutoBaudQuery (void) |
Returns the status of Auto-Baud detection. | |
bool | UART1_AutoBaudEventEnableGet (void) |
Returns enable state of the Auto-Baud feature. | |
size_t | UART1_ErrorGet (void) |
Returns the error status of UART1. | |
void | UART1_BRGCountSet (uint32_t brgValue) |
Sets the BRG value of UART1. | |
uint32_t | UART1_BRGCountGet (void) |
Gets the BRG value of UART1. | |
void | UART1_BaudRateSet (uint32_t baudRate) |
Sets the calculated Baud-Rate of UART1. | |
uint32_t | UART1_BaudRateGet (void) |
Gets the actual Baud-Rate of UART1. | |
Variables | ||
const struct UART_INTERFACE | UART1_Drv | |
Structure object of type UART_INTERFACE with the custom name given by the user in the Melody Driver User interface. The default name e.g. UART1 can be changed by the user in the UART user interface. This allows defining a structure with application specific name using the 'Custom Name' field. Application specific name allows the API Portability. | ||
union { | ||
struct { | ||
uint16_t frammingError:1 | ||
uint16_t parityError:1 | ||
uint16_t overrunError:1 | ||
uint16_t txCollisionError:1 | ||
uint16_t autoBaudOverflow:1 | ||
uint16_t reserved:11 | ||
} | ||
size_t status | ||
} | uartError | |
UART1 Generated Driver Source File
Definition in file uart1.c.
#define UART1_BAUD_TO_BRG_WITH_BRGH_0 | ( | x | ) | (UART1_CLOCK/(16U*(x))-1U) |
#define UART1_BAUD_TO_BRG_WITH_BRGH_1 | ( | x | ) | (UART1_CLOCK/(4U*(x))-1U) |
#define UART1_BAUD_TO_BRG_WITH_FRACTIONAL | ( | x | ) | (UART1_CLOCK/(x)) |
#define UART1_BRG_TO_BAUD_WITH_BRGH_0 | ( | x | ) | (UART1_CLOCK/(16U*((x)+1U))) |
#define UART1_BRG_TO_BAUD_WITH_BRGH_1 | ( | x | ) | (UART1_CLOCK/(4U*((x)+1U))) |
#define UART1_BRG_TO_BAUD_WITH_FRACTIONAL | ( | x | ) | (UART1_CLOCK/(x)) |
union { ... } uartError |