mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
apollo2-em9304: use System Timer (STIMER) for run loop
This commit is contained in:
parent
24b2b71b6f
commit
c5ae0d2317
@ -224,7 +224,7 @@ void hal_cpu_enable_irqs_and_sleep(void){
|
|||||||
// hal_time_ms.h
|
// hal_time_ms.h
|
||||||
#include "hal_time_ms.h"
|
#include "hal_time_ms.h"
|
||||||
uint32_t hal_time_ms(void){
|
uint32_t hal_time_ms(void){
|
||||||
return am_hal_systick_count();
|
return am_hal_stimer_counter_get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -490,6 +490,10 @@ int main(void)
|
|||||||
am_hal_interrupt_enable(AM_HAL_INTERRUPT_IOMASTER5);
|
am_hal_interrupt_enable(AM_HAL_INTERRUPT_IOMASTER5);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Start System Timer (only Apollo 2)
|
||||||
|
am_hal_stimer_config(AM_HAL_STIMER_LFRC_1KHZ);
|
||||||
|
am_hal_stimer_counter_clear();
|
||||||
|
|
||||||
// start with BTstack init - especially configure HCI Transport
|
// start with BTstack init - especially configure HCI Transport
|
||||||
btstack_memory_init();
|
btstack_memory_init();
|
||||||
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
|
btstack_run_loop_init(btstack_run_loop_embedded_get_instance());
|
||||||
|
Loading…
Reference in New Issue
Block a user