Skip to content

Commit 490380a

Browse files
committed
remove debugging uart code
1 parent 0e30dd8 commit 490380a

File tree

1 file changed

+0
-35
lines changed
  • devices/ble_hci/common-hal/_bleio

1 file changed

+0
-35
lines changed

devices/ble_hci/common-hal/_bleio/hci.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@
3636
// Set to 1 for extensive HCI packet logging.
3737
#define HCI_DEBUG 0
3838

39-
//FIX **********8
40-
busio_uart_obj_t debug_out;
41-
bool debug_out_in_use;
42-
43-
4439
// HCI H4 protocol packet types: first byte in the packet.
4540
#define H4_CMD 0x01
4641
#define H4_ACL 0x02
@@ -165,11 +160,6 @@ STATIC void process_acl_data_pkt(uint8_t pkt_len, uint8_t pkt_data[]) {
165160
// Process number of completed packets. Reduce number of pending packets by reported
166161
// number of completed.
167162
STATIC void process_num_comp_pkts(uint16_t handle, uint16_t num_pkts) {
168-
const uint8_t ff = 0xff;
169-
int err;
170-
common_hal_busio_uart_write(&debug_out, (uint8_t *) &pending_pkt, 1, &err);
171-
common_hal_busio_uart_write(&debug_out, (uint8_t *) &ff, 1, &err);
172-
common_hal_busio_uart_write(&debug_out, (uint8_t *) &ff, 1, &err);
173163
if (num_pkts && pending_pkt > num_pkts) {
174164
pending_pkt -= num_pkts;
175165
} else {
@@ -292,30 +282,14 @@ STATIC void process_evt_pkt(size_t pkt_len, uint8_t pkt_data[])
292282
}
293283
}
294284

295-
//FIX
296-
busio_uart_obj_t debug_out;
297-
bool debug_out_in_use;
298-
299285
void bleio_hci_reset(void) {
300286
rx_idx = 0;
301287
pending_pkt = 0;
302288
hci_poll_in_progress = false;
303-
debug_out_in_use = false;
304289
bleio_att_reset();
305290
}
306291

307292
hci_result_t hci_poll_for_incoming_pkt(void) {
308-
if (!debug_out_in_use) {
309-
debug_out.base.type = &busio_uart_type;
310-
common_hal_busio_uart_construct(&debug_out,
311-
&pin_PB12 /*D7*/, NULL, // no RX
312-
NULL, NULL,
313-
NULL, false,
314-
115200, 8, BUSIO_UART_PARITY_NONE, 1, 0,
315-
512, NULL, false);
316-
debug_out_in_use = true;
317-
}
318-
319293
common_hal_mcu_disable_interrupts();
320294
if (hci_poll_in_progress) {
321295
common_hal_mcu_enable_interrupts();
@@ -394,15 +368,6 @@ hci_result_t hci_poll_for_incoming_pkt(void) {
394368
common_hal_digitalio_digitalinout_set_value(common_hal_bleio_adapter_obj.rts_digitalinout, true);
395369
size_t pkt_len = rx_idx;
396370

397-
//FIX output packet for debugging
398-
int err;
399-
common_hal_busio_uart_write(&debug_out, (uint8_t *) &rx_idx, 1, &err);
400-
common_hal_busio_uart_write(&debug_out, (uint8_t *) &rx_idx, 1, &err);
401-
common_hal_busio_uart_write(&debug_out, (uint8_t *) &rx_idx, 1, &err);
402-
403-
common_hal_busio_uart_write(&debug_out, rx_buffer, rx_idx, &err);
404-
405-
406371
// Reset for next packet.
407372
rx_idx = 0;
408373
packet_is_complete = false;

0 commit comments

Comments
 (0)