From e0fb590d8de8d8776f87a358a40abe1b0fa3a612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Thu, 20 Apr 2017 15:49:32 +0200 Subject: [PATCH] Skip the extra 0 "work in progress" byte sent by the KL03 ROM bootloader. --- right/src/buspal/command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/right/src/buspal/command.c b/right/src/buspal/command.c index 1264dd4..6e65478 100644 --- a/right/src/buspal/command.c +++ b/right/src/buspal/command.c @@ -513,6 +513,9 @@ static status_t handle_command_internal(uint8_t *packet, uint32_t packetLength) } else { + uint8_t dst[1]; + peripheral_read(dst, 1); // TODO: Make this more general, so that the extra 0 byte is not expected. + rxSize = ((framing_data_packet_t *)rxBuf)->length; if (peripheral_read(rxBuf + sizeof(framing_data_packet_t), rxSize) != kStatus_Success) {