mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-02-10 06:40:23 +00:00
esp32: Use time_ms instead of ticks
This commit is contained in:
parent
e4eb95214f
commit
e9421616b0
@ -6,7 +6,7 @@
|
||||
#define __BTSTACK_CONFIG
|
||||
|
||||
// Port related features
|
||||
#define HAVE_EMBEDDED_TICK
|
||||
#define HAVE_EMBEDDED_TIME_MS
|
||||
#define HAVE_MALLOC
|
||||
|
||||
// BTstack features that can be enabled
|
||||
|
@ -11,8 +11,6 @@ BTSTACK_ROOT := ../../..
|
||||
# Examples
|
||||
#include ${BTSTACK_ROOT}/example/Makefile.inc
|
||||
|
||||
#COMPONENT_ADD_LDFLAGS := -l$(COMPONENT_NAME) $(COMPONENT_PATH)/../components/libbtdm_app/libbtdm_app.a $(COMPONENT_PATH)/../components/libcoexist/libcoexist.a $(COMPONENT_PATH)/../components/libphy/libphy.a
|
||||
|
||||
COMPONENT_ADD_INCLUDEDIRS := $(BTSTACK_ROOT)/src/ble $(BTSTACK_ROOT)/src $(BTSTACK_ROOT)/platform/embedded .
|
||||
|
||||
COMPONENT_SRCDIRS := $(BTSTACK_ROOT)/src/ble $(BTSTACK_ROOT)/src/ $(BTSTACK_ROOT)/platform/embedded .
|
||||
|
@ -1,28 +0,0 @@
|
||||
#include "hal_tick.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "freertos/FreeRTOS.h"
|
||||
|
||||
static void dummy_handler(void){};
|
||||
|
||||
static void (*tick_handler)(void) = &dummy_handler;
|
||||
|
||||
void hal_tick_init(void){
|
||||
printf("hal_tick_init\n");
|
||||
}
|
||||
|
||||
void hal_tick_set_handler(void (*handler)(void)){
|
||||
printf("hal_tick_set_handler\n");
|
||||
if (handler == NULL){
|
||||
tick_handler = &dummy_handler;
|
||||
return;
|
||||
}
|
||||
tick_handler = handler;
|
||||
}
|
||||
|
||||
int hal_tick_get_tick_period_in_ms(void){
|
||||
printf("hal_tick_get_tick_period_in_ms\n");
|
||||
return portTICK_PERIOD_MS;
|
||||
}
|
8
port/esp32/main/hal_time_ms.c
Normal file
8
port/esp32/main/hal_time_ms.c
Normal file
@ -0,0 +1,8 @@
|
||||
#include "hal_time_ms.h"
|
||||
|
||||
uint32_t esp_log_timestamp();
|
||||
|
||||
uint32_t hal_time_ms(void) {
|
||||
// super hacky way to get ms
|
||||
return esp_log_timestamp();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user