fix compile for EMBEDDED

This commit is contained in:
matthias.ringwald 2011-07-25 21:16:34 +00:00
parent c785ef68cf
commit e1d412164f
3 changed files with 4 additions and 5 deletions

View File

@ -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

View File

@ -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;

View File

@ -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