diff options
Diffstat (limited to 'include/serial.h')
-rw-r--r-- | include/serial.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/serial.h b/include/serial.h index 9cb9d24..7192e17 100644 --- a/include/serial.h +++ b/include/serial.h @@ -1,10 +1,33 @@ +/** + * @file serial.h + * Provides basic serial IO (through STM debug stuff) + */ + #ifndef SERIAL_H_ #define SERIAL_H_ +/** + * Initializes the serial device. + */ void serial_init(void); + +/** + * Puts the given character through serial. + * @param c the character to send + */ void serial_put(int c); +/** + * Gets a character from serial. + * @return the character + */ char serial_get(void); + +/** + * Gets a string from serial, cut off by a newline. + * @param buf the initialized buffer to fill + * @param max the max amount of bytes to write to the buffer + */ void serial_gets(char *buf, int max); #endif // SERIAL_H_ |