Add termios support to libserialport and set_baudrate error handling

This fixes issues with flashing with FT232H
This commit is contained in:
Marek Kraus
2022-11-22 13:55:38 +01:00
parent 807c21bbef
commit dd2801d6e9
2 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -69,7 +69,10 @@ int32_t blisp_device_open(struct blisp_device* device, const char* port_name)
// } else {
device->current_baud_rate = 500000;
// }
sp_set_baudrate(serial_port, device->current_baud_rate);
ret = sp_set_baudrate(serial_port, device->current_baud_rate);
if (ret != SP_OK) {
return -1; // TODO: Handle this
}
device->serial_port = serial_port;
return 0;