C:/usr/src/avr/plotter/usrat.h File Reference
Go to the source code of this file.
|
Defines |
#define | RX_BUFFER_SIZE 64 |
| USART RX buffer length.
|
Functions |
void | usart_init (uint16_t baudrate) |
| Initialize USART, perform fdevopen with uart_putchar.
|
int | uart_putchar (char data) |
| putchar() for USART.
|
int | uart_getchar () |
| getchar() for USART. Wait for data if not available.
|
uint8_t | uart_available (void) |
| Check data availability in USART buffer.
|
uint8_t | uart_getc () |
| Nonblocking, nonchecking getchar for USART. Use with care.
|
Detailed Description
Definition in file usrat.h.
Define Documentation
#define RX_BUFFER_SIZE 64 |
USART RX buffer length.
Definition at line 5 of file usrat.h.
Function Documentation
uint8_t uart_available |
( |
void |
|
) |
|
Check data availability in USART buffer.
- Returns:
- 1 if buffer is not empty.
Definition at line 61 of file usrat.c.
Nonblocking, nonchecking getchar for USART. Use with care.
Definition at line 66 of file usrat.c.
getchar() for USART. Wait for data if not available.
- Returns:
- value read.
- See also:
- uart_available()
Definition at line 53 of file usrat.c.
int uart_putchar |
( |
char |
data |
) |
|
putchar() for USART.
- Parameters:
-
Definition at line 37 of file usrat.c.
void usart_init |
( |
uint16_t |
baudval |
) |
|
Initialize USART, perform fdevopen with uart_putchar.
- Parameters:
-
| baudval | (F_CPU/(16*baudrate))-1 |
- See also:
- uart_putchar()
Definition at line 13 of file usrat.c.