mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-30 15:32:41 +00:00
stm32-f4discovery-cc256x: print local bd addr on start
This commit is contained in:
parent
c6cc79be9c
commit
06abcc1ed2
@ -266,11 +266,13 @@ int _fstat(int file){
|
|||||||
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
|
||||||
UNUSED(size);
|
UNUSED(size);
|
||||||
UNUSED(channel);
|
UNUSED(channel);
|
||||||
|
bd_addr_t local_addr;
|
||||||
if (packet_type != HCI_EVENT_PACKET) return;
|
if (packet_type != HCI_EVENT_PACKET) return;
|
||||||
switch(hci_event_packet_get_type(packet)){
|
switch(hci_event_packet_get_type(packet)){
|
||||||
case BTSTACK_EVENT_STATE:
|
case BTSTACK_EVENT_STATE:
|
||||||
if (btstack_event_state_get_state(packet) != HCI_STATE_WORKING) return;
|
if (btstack_event_state_get_state(packet) != HCI_STATE_WORKING) return;
|
||||||
printf("BTstack up and running.\n");
|
gap_local_bd_addr(local_addr);
|
||||||
|
printf("BTstack up and running on %s.\n", bd_addr_to_str(local_addr));
|
||||||
break;
|
break;
|
||||||
case HCI_EVENT_COMMAND_COMPLETE:
|
case HCI_EVENT_COMMAND_COMPLETE:
|
||||||
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){
|
if (HCI_EVENT_IS_COMMAND_COMPLETE(packet, hci_read_local_version_information)){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user