Serial header file.
More...
Go to the source code of this file.
Defines |
#define | BAUDRATE 19200 |
Functions |
void | usart_init (void) |
| Init USART.
|
int | pc_putc (char data) |
| Send one byte to PC.
|
char | pc_getc (void) |
| Get one byte from PC.
|
void | pc_puts (char *s) |
| Send RAM string to PC.
|
void | pc_puts_P (const char *s) |
| Send flash string to PC.
|
void | putnum_ud (uint16_t n) |
| Send unsigned int number in ASCII to PC.
|
void | print_div (void) |
| Print divider on terminal.
|
uint16_t | pc_read16 (void) |
| Get unisgned int from PC.
|
Detailed Description
Serial header file.
Definition in file serial.h.
Define Documentation
Function Documentation
Get one byte from PC.
- Returns:
- Received byte
Definition at line 74 of file serial.c.
Send one byte to PC.
- Parameters:
-
Definition at line 38 of file serial.c.
Send RAM string to PC.
- Parameters:
-
Definition at line 52 of file serial.c.
void pc_puts_P |
( |
const char * |
s | ) |
|
Send flash string to PC.
- Parameters:
-
Definition at line 63 of file serial.c.
uint16_t pc_read16 |
( |
void |
| ) |
|
Get unisgned int from PC.
- Returns:
- Received number
Definition at line 120 of file serial.c.
Print divider on terminal.
Definition at line 110 of file serial.c.
void putnum_ud |
( |
uint16_t |
n | ) |
|
Send unsigned int number in ASCII to PC.
- Parameters:
-
Definition at line 87 of file serial.c.
Init USART.
Initialize USART for communication with PC.
Definition at line 21 of file serial.c.