mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-25 16:43:28 +00:00
stm32-l451-miromico-sx1280: fix disconnect in RGB LED demo
This commit is contained in:
parent
ff6c997ed1
commit
f87ef305b4
@ -67,6 +67,8 @@
|
||||
static btstack_timer_source_t heartbeat;
|
||||
static btstack_packet_callback_registration_t hci_event_callback_registration;
|
||||
|
||||
static bool connected;
|
||||
|
||||
static void heartbeat_handler_led_on(struct btstack_timer_source *ts);
|
||||
static void heartbeat_handler_led_off(struct btstack_timer_source *ts);
|
||||
|
||||
@ -171,11 +173,7 @@ int btstack_main(void)
|
||||
gap_advertisements_set_params(adv_int_min, adv_int_max, adv_type, 0, null_addr, 0x07, 0x00);
|
||||
gap_advertisements_set_data(adv_data_len, (uint8_t*) adv_data);
|
||||
gap_advertisements_enable(1);
|
||||
|
||||
// register for HCI events
|
||||
hci_event_callback_registration.callback = &packet_handler;
|
||||
hci_add_event_handler(&hci_event_callback_registration);
|
||||
|
||||
|
||||
// register for ATT event
|
||||
att_server_register_packet_handler(packet_handler);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user