megaAVR STK600 AVR libc setbaud Example
Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | _ASSERT_ENABLE_ |
#define | TIMEOUT 250 |
Functions | |
int | main (void) |
Example application on how to use the libc setbaud utility. More... | |
static uint8_t | uart_getchar (void) |
Function for getting a char from the UART. More... | |
static void | uart_init (void) |
Initialize the uart with correct baud rate settings. More... | |
static void | uart_putchar (uint8_t data) |
Function for sending a char over the UART. More... | |
#define _ASSERT_ENABLE_ |
#define TIMEOUT 250 |
Referenced by uart_getchar().
|
static |
|
static |
Initialize the uart with correct baud rate settings.
This function will initialize the UART baud rate registers with the correct values using the AVR libc setbaud utility. In addition set the UART to 8-bit, 1 stop and no parity.
Referenced by main().