diff --git a/serial_io.cpp b/serial_io.cpp index 89effa0..34e57a6 100644 --- a/serial_io.cpp +++ b/serial_io.cpp @@ -87,7 +87,7 @@ int serialport_set_config(int fd, int baud) return 0; } -int serialport_init(const char* device, int baud, bool block = false) +int serialport_init(const char* device, int baud, bool block) { int fd; fd = open(device, O_RDWR | O_NOCTTY | (block ? 0 : O_NONBLOCK)); diff --git a/serial_io.h b/serial_io.h index 1daa375..844e74e 100644 --- a/serial_io.h +++ b/serial_io.h @@ -22,7 +22,7 @@ void printRates(); int serialport_set_config(int fd, int baud); -int serialport_init(const char* device, int baud = BAUDRATE); +int serialport_init(const char* device, int baud = BAUDRATE, bool block = false); #endif // SERIAL_H