Fixed serial compile issue
This commit is contained in:
@ -87,7 +87,7 @@ int serialport_set_config(int fd, int baud)
|
|||||||
return 0;
|
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;
|
int fd;
|
||||||
fd = open(device, O_RDWR | O_NOCTTY | (block ? 0 : O_NONBLOCK));
|
fd = open(device, O_RDWR | O_NOCTTY | (block ? 0 : O_NONBLOCK));
|
||||||
|
@ -22,7 +22,7 @@ void printRates();
|
|||||||
|
|
||||||
int serialport_set_config(int fd, int baud);
|
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
|
#endif // SERIAL_H
|
||||||
|
Reference in New Issue
Block a user