We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71f55e0 commit e9a0a91Copy full SHA for e9a0a91
bootloader/main.c
@@ -608,14 +608,22 @@ static void serialwriteChar(uint8_t data)
608
609
// send stop bit
610
gpio_set(input_pin);
611
- delayMicroseconds(BITTIME);
+
612
+ /*
613
+ note that we skip the delay by BITTIME for the full stop bit and
614
+ do it in sendString() instead to ensure when sending an ACK
615
+ immediately followed by a setReceive() on a slow MCU that we
616
+ start on the receive as soon as possible.
617
+ */
618
}
619
620
621
static void sendString(uint8_t *data, int len)
622
{
623
for(int i = 0; i < len; i++){
- serialwriteChar(data[i]);
624
+ serialwriteChar(data[i]);
625
+ // for multi-byte writes we add the stop bit delay
626
+ delayMicroseconds(BITTIME);
627
628
629
0 commit comments