#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/signal.h>
#include <avr/pgmspace.h>
#include "otos_cfg.h"
#include "otos_def.h"
#include "types.h"
#include "uart.h"
Go to the source code of this file.
Functions | |
void | otosPrint (uint8_t *string) |
Send a string from RAM over the serial interface. | |
void | otosPrint_P (PGM_P string) |
Send a string from program space over the serial interface. | |
void | otosPutchar (uint8_t c) |
Send a char over the serial interface. | |
uint8_t | otosGetchar (void) |
Read a char from the serial interface. | |
uint8_t | otosUartAvail (void) |
Check if character are available in receive buffer. | |
SIGNAL (SIG_UART_RECV) | |
Serial Receive Interrupt. | |
void | otosUartClear (void) |
Clear the serial receive buffer. | |
uint8_t | otosPeekchar (void) |
Returns the latest char in serial receive buffer if one is available without removing it from the receive buffer. | |
uint8_t | otosReadline (uint8_t *buffer, uint8_t len) |
Read one line. | |
Variables | |
unsigned char | rx_buf [UART_BUF_SIZE] |
unsigned char | buf_read |
unsigned char | buf_write |
volatile unsigned char | buf_len |
Definition in file uart.c.
|
Read a char from the serial interface. If the receive buffer is empty, the function waits until a char is received.
Definition at line 123 of file uart.c. References otosUartAvail(). Referenced by otosReadline(). |
|
Returns the latest char in serial receive buffer if one is available without removing it from the receive buffer.
Definition at line 234 of file uart.c. References otosUartAvail(). |
|
Send a string from RAM over the serial interface.
Definition at line 60 of file uart.c. References otosPutchar(). |
|
Send a string from program space over the serial interface.
Definition at line 75 of file uart.c. References otosPutchar(). |
|
Send a char over the serial interface.
Definition at line 89 of file uart.c. Referenced by otosPrint(), and otosPrint_P(). |
|
Read one line. A line ends on a CR or a CR+LF (depending on definition of macro 'CRLF_IN') or when the maximum number of chars was received.
Definition at line 257 of file uart.c. References otosGetchar(). |
|
Check if character are available in receive buffer.
Definition at line 151 of file uart.c. Referenced by otosGetchar(), and otosPeekchar(). |
|
Clear the serial receive buffer. The receive interrupt is disabled during this function |
|
Serial Receive Interrupt.
|