You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
611 B
C

/**
* @file serial.h
* Provides basic serial IO (through STM debug stuff)
*/
7 years ago
#ifndef SERIAL_H_
#define SERIAL_H_
/**
* Initializes the serial device.
*/
7 years ago
void serial_init(void);
/**
* Puts the given character through serial.
* @param c the character to send
*/
7 years ago
void serial_put(int c);
/**
* Gets a character from serial.
* @return the character
*/
7 years ago
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);
7 years ago
#endif // SERIAL_H_