X-Git-Url: http://git.rot13.org/?p=digitaldcpower;a=blobdiff_plain;f=uart.h;h=3ed2534a250792de9b5ec4fb6797128389cfab2c;hp=b64b2d38ca60f9877ca736552cdd5a7b5615243d;hb=HEAD;hpb=93791a25a42c0d48fa5a62c41d5907fae5829fee diff --git a/uart.h b/uart.h index b64b2d3..3ed2534 100644 --- a/uart.h +++ b/uart.h @@ -6,6 +6,7 @@ ***************************************************************************/ #ifndef UART_H #define UART_H +#include #include extern void uart_init(void); @@ -13,7 +14,8 @@ extern void uart_poll_getchar_isr(void); // call this periodically from interrup 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 +extern void uart_sendstr_p(const char *progmem_s); // blocking, no buffer +// uart_sendstr_p can be used like this: uart_sendstr_p(PSTR("my string")); /* // you can either use the above _isr functions or one of the // following two but you can not mix them. @@ -22,12 +24,5 @@ extern unsigned char uart_getchar_noblock(char *returnval); extern void uart_flushRXbuf(void); */ -/* -** macros for automatically storing string constant in program memory -*/ -#ifndef P -#define P(s) ({static const char c[] __attribute__ ((progmem)) = s;c;}) -#endif -#define uart_sendstr_P(__s) uart_sendstr_p(P(__s)) #endif /* UART_H */