Don't wait too much on handshake response

This commit is contained in:
Marek Kraus 2022-11-10 21:35:33 +01:00
parent 48ecd90f71
commit cae1bf0202

View File

@ -166,7 +166,7 @@ blisp_device_handshake(struct blisp_device* device, bool in_ef_loader) {
if (ret < 0) { if (ret < 0) {
return -1; return -1;
} }
ret = sp_blocking_read(serial_port, device->rx_buffer, 20, 1000); ret = sp_blocking_read(serial_port, device->rx_buffer, 20, 50);
if (ret >= 2) { if (ret >= 2) {
for (uint8_t j = 0; j < (ret - 1); j++) { for (uint8_t j = 0; j < (ret - 1); j++) {
if (device->rx_buffer[j] == 'O' && device->rx_buffer[j + 1] == 'K') { if (device->rx_buffer[j] == 'O' && device->rx_buffer[j + 1] == 'K') {