arduino: fix ancs example build

This commit is contained in:
Matthias Ringwald 2021-05-09 22:35:44 +02:00
parent eb4dccece8
commit 690999b0e5
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ EM9301_C_FILES = btstack_chipset_em9301.c
PATHS = $(addprefix ${BTSTACK_ROOT}/src/, ${SRC_C_FILES}) PATHS = $(addprefix ${BTSTACK_ROOT}/src/, ${SRC_C_FILES})
PATHS += $(addprefix ${BTSTACK_ROOT}/src/ble/, ${BLE_C_FILES}) PATHS += $(addprefix ${BTSTACK_ROOT}/src/ble/, ${BLE_C_FILES})
PATHS += $(addprefix ${BTSTACK_ROOT}/src/ble/gatt-service/, ${BLE_GATT_FILES}) PATHS += $(addprefix ${BTSTACK_ROOT}/src/ble/gatt-service/, ${BLE_GATT_C_FILES})
PATHS += $(addprefix ${BTSTACK_ROOT}/platform/embedded/, ${EMBEDDED_C_FILES}) PATHS += $(addprefix ${BTSTACK_ROOT}/platform/embedded/, ${EMBEDDED_C_FILES})
PATHS += $(addprefix ${BTSTACK_ROOT}/chipset/em9301/, ${EM9301_C_FILES}) PATHS += $(addprefix ${BTSTACK_ROOT}/chipset/em9301/, ${EM9301_C_FILES})
PATHS += $(addprefix ${DIR}/, ${PORT_FILES}) PATHS += $(addprefix ${DIR}/, ${PORT_FILES})

View File

@ -2,9 +2,9 @@
#include <stdio.h> #include <stdio.h>
#include "ble/att_server.h" #include "ble/att_server.h"
#include "ble/gatt_client.h" #include "ble/gatt_client.h"
#include "ancs_client.h" #include "ble/gatt-service/ancs_client.h"
#include "btstack_event.h"
#include "ble/sm.h" #include "ble/sm.h"
#include "btstack_event.h"
#include <SPI.h> #include <SPI.h>
/* /*
@ -75,7 +75,7 @@ void loop(void){
void ancs_callback(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){ void ancs_callback(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){
const char * attribute_name; const char * attribute_name;
if (hci_event_packet_get_type(packet) != HCI_EVENT_ANCS_META) return; if (hci_event_packet_get_type(packet) != HCI_EVENT_ANCS_META) return;
switch (hci_event_ancs_meta_get_subevent_code()]){ switch (hci_event_ancs_meta_get_subevent_code(packet)){
case ANCS_SUBEVENT_CLIENT_CONNECTED: case ANCS_SUBEVENT_CLIENT_CONNECTED:
Serial.println("ANCS Client: Connected"); Serial.println("ANCS Client: Connected");
break; break;