2014-12-02 17:10:06 -07:00
|
|
|
#ifndef SERIAL_H
|
|
|
|
#define SERIAL_H
|
|
|
|
|
|
|
|
#include "device.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <avr/io.h>
|
|
|
|
|
|
|
|
typedef struct Serial {
|
|
|
|
FILE uart0;
|
|
|
|
} Serial;
|
|
|
|
|
|
|
|
void serial_init(Serial *serial);
|
|
|
|
bool serial_available(uint8_t index);
|
2018-04-24 06:38:48 -06:00
|
|
|
int uart0_putchar(char c, FILE *stream);
|
|
|
|
int uart0_getchar(FILE *stream);
|
2014-12-02 17:10:06 -07:00
|
|
|
char uart0_getchar_nowait(void);
|
|
|
|
|
|
|
|
#endif
|