diff --git a/src/hci.h b/src/hci.h index b29465058..e0d114b81 100644 --- a/src/hci.h +++ b/src/hci.h @@ -202,7 +202,7 @@ typedef struct { struct timeval timestamp; #endif #ifdef EMBEDDED - uint32_t timeout; // timeout in system ticks + uint32_t timestamp; // timeout in system ticks #endif // ACL packet recombination diff --git a/src/hci_transport_h4_dma.c b/src/hci_transport_h4_dma.c index 1b85cf7c1..1792b4c10 100644 --- a/src/hci_transport_h4_dma.c +++ b/src/hci_transport_h4_dma.c @@ -37,7 +37,6 @@ * Created by Matthias Ringwald on 4/29/09. */ - #include #include @@ -211,6 +210,7 @@ static void h4_register_packet_handler(void (*handler)(uint8_t packet_type, uint packet_handler = handler; } +#define DUMP #ifdef DUMP static void dump(uint8_t *data, uint16_t len){ @@ -235,14 +235,13 @@ static int h4_process(struct data_source *ds) { if (h4_state != H4_PACKET_RECEIVED) return 0; // log packet - #ifdef DUMP printf("RX: "); dump(hci_packet, read_pos); #endif packet_handler(hci_packet[0], &hci_packet[1], read_pos-1); - + h4_init_sm(); return 0; diff --git a/src/run_loop_embedded.c b/src/run_loop_embedded.c index da84121b2..d5bfd7b62 100644 --- a/src/run_loop_embedded.c +++ b/src/run_loop_embedded.c @@ -150,7 +150,7 @@ uint32_t embedded_get_ticks(void){ } uint32_t embedded_ticks_for_ms(uint32_t time_in_ms){ - return delta_ms / hal_tick_get_tick_period_in_ms() + return time_in_ms / hal_tick_get_tick_period_in_ms(); } // set timer