diff --git a/port/arduino/Makefile b/port/arduino/Makefile index de3b7fcb2..88a9ff7ac 100644 --- a/port/arduino/Makefile +++ b/port/arduino/Makefile @@ -20,7 +20,7 @@ EM9301_C_FILES = btstack_chipset_em9301.c PATHS = $(addprefix ${BTSTACK_ROOT}/src/, ${SRC_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}/chipset/em9301/, ${EM9301_C_FILES}) PATHS += $(addprefix ${DIR}/, ${PORT_FILES}) diff --git a/port/arduino/examples/ANCS/ANCS.ino b/port/arduino/examples/ANCS/ANCS.ino index f299902c6..2598de9bd 100644 --- a/port/arduino/examples/ANCS/ANCS.ino +++ b/port/arduino/examples/ANCS/ANCS.ino @@ -2,9 +2,9 @@ #include #include "ble/att_server.h" #include "ble/gatt_client.h" -#include "ancs_client.h" -#include "btstack_event.h" +#include "ble/gatt-service/ancs_client.h" #include "ble/sm.h" +#include "btstack_event.h" #include /* @@ -75,7 +75,7 @@ void loop(void){ void ancs_callback(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){ const char * attribute_name; 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: Serial.println("ANCS Client: Connected"); break;