osmo-sdr/utils/rum-ba/src/serial.h @ master
1 | 4cd82c23 | Christian Daniel | #ifndef INCLUDE_SERIAL_H
|
---|---|---|---|
2 | #define INCLUDE_SERIAL_H
|
||
3 | |||
4 | #include "utils.h"
|
||
5 | |||
6 | HANDLE serialOpen(const char* dev); |
||
7 | void serialClose(HANDLE fd); |
||
8 | int serialSetBaudrate(HANDLE fd, int baudrate); |
||
9 | int serialPutC(HANDLE fd, uint8_t c); |
||
10 | int serialGetC(HANDLE fd, uint8_t* c, int timeout); |
||
11 | |||
12 | int serialPutS(HANDLE fd, const char* str); |
||
13 | int serialGetS(HANDLE fd, char* str, int len, int timeout); |
||
14 | int serialExpect(HANDLE fd, const char* str, int timeout); |
||
15 | |||
16 | #endif // INCLUDE_SERIAL_H
|