diff --git a/lib/blisp.c b/lib/blisp.c index a80bfa4..f3d94c6 100644 --- a/lib/blisp.c +++ b/lib/blisp.c @@ -1,9 +1,14 @@ #include +#include #include #include #include #include -#include + +#ifdef __linux__ +#include +#include +#endif #define DEBUG @@ -69,6 +74,16 @@ int32_t blisp_device_open(struct blisp_device* device, const char* port_name) // } else { device->current_baud_rate = 500000; // } + +#if 0 + int fd; + sp_get_port_handle(serial_port, &fd); + struct serial_struct serial; + ioctl(fd, TIOCGSERIAL, &serial); +// serial.flags &= ~(ASYNC_LOW_LATENCY); + serial.flags |= ASYNC_LOW_LATENCY; + ioctl(fd, TIOCSSERIAL, &serial); +#endif ret = sp_set_baudrate(serial_port, device->current_baud_rate); if (ret != SP_OK) { return -1; // TODO: Handle this