mirror of
https://github.com/pine64/blisp.git
synced 2024-12-22 14:30:28 +00:00
Don't wait too much on handshake response
This commit is contained in:
parent
48ecd90f71
commit
cae1bf0202
@ -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') {
|
||||||
|
Loading…
Reference in New Issue
Block a user