Skip to content

Commit

Permalink
Serial fix suggested by Mecanix
Browse files Browse the repository at this point in the history
  • Loading branch information
eandersson committed Nov 8, 2024
1 parent 08367a6 commit c5563bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/asic/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,16 @@ void SERIAL_set_baud(int baud)

int SERIAL_send(uint8_t *data, int len, bool debug)
{
int written = uart_write_bytes(UART_NUM_1, (const char *)data, len);
uart_wait_tx_done(UART_NUM_1, portMAX_DELAY);
if (debug)
{
printf("tx: ");
prettyHex((unsigned char *)data, len);
printf("\n");
}

return uart_write_bytes(UART_NUM_1, (const char *)data, len);
return written;
}

/// @brief waits for a serial response from the device
Expand Down

0 comments on commit c5563bd

Please sign in to comment.