mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-22 07:21:06 +00:00
example/led_counter: log to packet log
This commit is contained in:
parent
c6dda3a559
commit
e4cf526a15
@ -47,11 +47,8 @@
|
||||
|
||||
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "btstack_run_loop.h"
|
||||
#include "btstack_defines.h"
|
||||
#include "btstack.h"
|
||||
#include "hal_led.h"
|
||||
|
||||
#define HEARTBEAT_PERIOD_MS 1000
|
||||
@ -72,9 +69,11 @@ static void heartbeat_handler(btstack_timer_source_t *ts){
|
||||
UNUSED(ts);
|
||||
|
||||
// increment counter
|
||||
char lineBuffer[30];
|
||||
snprintf(lineBuffer, sizeof(lineBuffer), "BTstack counter %04u\n\r", ++counter);
|
||||
puts(lineBuffer);
|
||||
counter++;
|
||||
|
||||
// print and log
|
||||
log_info("BTstack Counter %u", counter);
|
||||
printf("BTstack counter %04u\n\r", counter);
|
||||
|
||||
// toggle LED
|
||||
hal_led_toggle();
|
||||
|
Loading…
x
Reference in New Issue
Block a user