mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-18 19:21:54 +00:00
fix compile for EMBEDDED
This commit is contained in:
parent
c785ef68cf
commit
e1d412164f
@ -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
|
||||
|
@ -37,7 +37,6 @@
|
||||
* Created by Matthias Ringwald on 4/29/09.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user