diff options
Diffstat (limited to 'include/drivers')
-rw-r--r-- | include/drivers/uart.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/drivers/uart.h b/include/drivers/uart.h new file mode 100644 index 0000000..b83732f --- /dev/null +++ b/include/drivers/uart.h @@ -0,0 +1,15 @@ +#ifndef DRIVERS_UART_H +#define DRIVERS_UART_H + +#define PRINTS_DBG(X) uart_char('[');uart_string(__FILE__);uart_char(':');uart_10(__LINE__);uart_string("] ");uart_string(X);uart_char('\n'); +#define PRINTX_DBG(X) uart_char('[');uart_string(__FILE__);uart_char(':');uart_10(__LINE__);uart_string("] ");uart_hex((unsigned long)X);uart_char('\n'); +#define PRINTI_DBG(X) uart_char('[');uart_string(__FILE__);uart_char(':');uart_10(__LINE__);uart_string("] ");uart_10((unsigned long)X);uart_char('\n'); + +extern void uart_char(unsigned char c); +extern void uart_string(char* message); +extern void uart_hex(unsigned long data); + +void uart_10(unsigned long); +void uart_hexn(unsigned long); + +#endif |