0.6.3 Changes since last version
[digitaldcpower] / uart.h
diff --git a/uart.h b/uart.h
index bd69475..b64b2d3 100644 (file)
--- a/uart.h
+++ b/uart.h
@@ -2,18 +2,25 @@
 /*************************************************************************
  Title:   C include file for uart
  Target:    atmega8
+ Copyright: GPL, Guido Socher
 ***************************************************************************/
 #ifndef UART_H
 #define UART_H
 #include <avr/pgmspace.h>
 
 extern void uart_init(void);
-extern void uart_sendchar(char c);
-extern void uart_sendstr(char *s);
-extern void uart_sendstr_p(const prog_char *progmem_s);
+extern void uart_poll_getchar_isr(void); // call this periodically from interrupt, has a buffer bigger than one char
+extern unsigned char uart_getchar_isr_noblock(char *returnval); // get a char from buffer if available
+extern void uart_sendchar(char c); // blocking, no buffer
+extern void uart_sendstr(char *s); // blocking, no buffer
+extern void uart_sendstr_p(const prog_char *progmem_s); // blocking, no buffer
+/*
+// you can either use the above _isr functions or one of the
+// following two but you can not mix them.
 extern char uart_getchar(void);
 extern unsigned char uart_getchar_noblock(char *returnval);
 extern void uart_flushRXbuf(void);
+*/
 
 /*
 ** macros for automatically storing string constant in program memory