2018-12-12 14:38:32 +01:00
|
|
|
/*
|
|
|
|
* serial.h
|
2018-12-12 20:07:49 +01:00
|
|
|
* --------
|
|
|
|
*
|
2018-12-12 14:38:32 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
int prepare_UART(char *port, int bauds);
|
|
|
|
|
2019-05-14 15:33:00 +02:00
|
|
|
int getbyte(int fd); /* really brotched func */
|
|
|
|
int putbyte(int fd, unsigned char byte);
|
2018-12-12 20:07:49 +01:00
|
|
|
|
2019-05-18 18:01:05 +02:00
|
|
|
|
|
|
|
|
2018-12-12 20:07:49 +01:00
|
|
|
/* timeout is exprimed in milliseconds. */
|
|
|
|
int getbyte_to (int fd, int to_ms);
|
|
|
|
|
2018-12-14 18:52:06 +01:00
|
|
|
int getline_to(int fd, char *where, int szm, int to_ms);
|
|
|
|
|
2019-05-18 18:01:05 +02:00
|
|
|
|
|
|
|
|
2018-12-29 17:07:23 +01:00
|
|
|
/* auxiliary and test functions */
|
|
|
|
|
|
|
|
int parseXvalue(char *asciidatas, char id);
|
2019-04-03 16:25:38 +02:00
|
|
|
int values2temperature(int raw[4], float array[4]);
|
2019-01-12 17:13:30 +01:00
|
|
|
|
2019-04-03 16:25:38 +02:00
|
|
|
int parse4_Ivalues(char *line, char cflag, int array[4]);
|
|
|
|
int parse4_Fvalues(char *line, char cflag, float array[4]);
|
2018-12-29 17:07:23 +01:00
|
|
|
|
2018-12-12 20:07:49 +01:00
|
|
|
|