# HG changeset patch # User Paul Boddie # Date 1539889440 -7200 # Node ID 907787d1358cbdc6022b17ee90f6d1dad4a38f01 # Parent 275ea24bb0b8687921332fe5bf8c877889baa87b Added a debugging function for writing strings. diff -r 275ea24bb0b8 -r 907787d1358c debug.c --- a/debug.c Thu Oct 18 18:36:19 2018 +0200 +++ b/debug.c Thu Oct 18 21:04:00 2018 +0200 @@ -48,3 +48,9 @@ REG(UART_REG(1, UxTXREG)) = c; } + +void uart_write_string(const char *s) +{ + while (*s) + uart_write(*s++); +} diff -r 275ea24bb0b8 -r 907787d1358c debug.h --- a/debug.h Thu Oct 18 18:36:19 2018 +0200 +++ b/debug.h Thu Oct 18 21:04:00 2018 +0200 @@ -5,5 +5,6 @@ void vbits(uint32_t val); void vhex(uint32_t val); void uart_write(char c); +void uart_write_string(const char *s); #endif /* __DEBUG_H__ */