UART (USB serial port) functionality. More...
#include <inttypes.h>
#include <stdio.h>
Functions | |
int | uart_send (char ch) |
int | uart_put (char, FILE *) |
void | uart_print (const char *string) |
int | uart_printf (const char *fmt,...) |
int | uart_scanf (const char *fmt,...) |
void | uart_init (uint16_t baudRate) |
The Happyboard has a FT232RL USB serial bridge chip on board, which makes it appear as a serial port on most OS's (Windows/Mac/Linux). Users can print information to the UART and monitor it on a computer using a terminal emulator program such as hyperterminal or minicom.
The Happyboard configures the UART for 19200 baud, 8N1.
void uart_init | ( | uint16_t | baudRate | ) |
Initialize the UART driver.
void uart_print | ( | const char * | string | ) |
Print an unformated string directly to UART.
int uart_printf | ( | const char * | fmt, |
... | |||
) |
Print a formated string to UART.
int uart_put | ( | char | , |
FILE * | |||
) |
putc function used by printf.
int uart_scanf | ( | const char * | fmt, |
... | |||
) |
Parse a formatted string from UART.
int uart_send | ( | char | ch | ) |
Send a character over UART.