mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 03:35:20 +00:00
let led blink
This commit is contained in:
parent
a2c09c83bb
commit
69deacbacd
@ -11,9 +11,12 @@
|
||||
|
||||
#include "btstack_memory.h"
|
||||
|
||||
#include <btstack/hal_led.h>
|
||||
#include <btstack/run_loop.h>
|
||||
#include "btstack-config.h"
|
||||
|
||||
int btstack_main(void);
|
||||
|
||||
#define HEARTBEAT_PERIOD_MS 1000
|
||||
|
||||
static int counter = 0;
|
||||
@ -31,7 +34,7 @@ static void heartbeat_handler(timer_source_t *ts){
|
||||
printf(lineBuffer);
|
||||
|
||||
// toggle LED
|
||||
// LED_PORT_OUT = LED_PORT_OUT ^ LED_2;
|
||||
hal_led_toggle();
|
||||
|
||||
// re-register timer
|
||||
register_timer(ts, HEARTBEAT_PERIOD_MS);
|
||||
|
@ -65,7 +65,12 @@ void hal_cpu_enable_irqs_and_sleep(void){
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
// hal_led.h implementation
|
||||
#include <btstack/hal_led.h>
|
||||
|
||||
void hal_led_toggle(void){
|
||||
gpio_toggle(GPIOA, GPIO_LED2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use USART_CONSOLE as a console.
|
||||
|
Loading…
x
Reference in New Issue
Block a user