add unified compile target
[avr_work.git] / common / spi_io.h
blobf71b3704550ace2169eebbbb7b38f489d9a62029
1 #ifndef _SPI_IO_H_
2 #define _SPI_IO_H_
4 #include <stdio.h>
5 #include <stdint.h>
7 #include "spi_io_conf.h"
9 void spi_io_init(void);
11 // state variables.
12 extern volatile uint8_t spi_io_rx_nl; // new line counter
14 // non-standard (fast) io
15 void spi_putchar(uint8_t ch);
16 void spi_puts(const char * string);
17 void spi_o_puts(const char * string); // overwriting puts
18 void spi_puth(uint8_t hex); // put hex (uppercase, no prefix added)
19 void spi_puth2(uint16_t hex); // ^^, 2 bytes.
20 int spi_getchar(void);
22 // standard io
23 //#define SPI_IO_STANDARD // 106B flash / 16B ram
24 #ifdef SPI_IO_STANDARD
25 //static int spi_getc(FILE * stream);
26 //static int spi_putc(char c, FILE * stream);
27 extern FILE * spi_io;
28 #endif
30 #endif