Skip to content

Commit

Permalink
extmod/nimble/hal/hal_uart: Fix HCI_TRACE format specifiers.
Browse files Browse the repository at this point in the history
Makes this work consistently on unix and stm32 ports.
  • Loading branch information
jimmo authored and dpgeorge committed Feb 17, 2021
1 parent 5cb91af commit 236274f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extmod/nimble/hal/hal_uart.c
Expand Up @@ -66,7 +66,7 @@ void hal_uart_start_tx(uint32_t port) {
}

#if HCI_TRACE
printf("< [% 8d] %02x", mp_hal_ticks_ms(), mp_bluetooth_hci_cmd_buf[0]);
printf("< [% 8d] %02x", (int)mp_hal_ticks_ms(), mp_bluetooth_hci_cmd_buf[0]);
for (size_t i = 1; i < len; ++i) {
printf(":%02x", mp_bluetooth_hci_cmd_buf[i]);
}
Expand All @@ -86,7 +86,7 @@ void mp_bluetooth_nimble_hci_uart_process(bool run_events) {
int chr;
while ((chr = mp_bluetooth_hci_uart_readchar()) >= 0) {
#if HCI_TRACE
printf("> %02x (%d)\n", chr);
printf("> %02x\n", chr);
#endif
hal_uart_rx_cb(hal_uart_rx_arg, chr);

Expand Down

0 comments on commit 236274f

Please sign in to comment.