diff --git a/nimble/host/services/ias/src/ble_svc_ias.c b/nimble/host/services/ias/src/ble_svc_ias.c index 74c9778fa..925befb4f 100644 --- a/nimble/host/services/ias/src/ble_svc_ias.c +++ b/nimble/host/services/ias/src/ble_svc_ias.c @@ -44,10 +44,10 @@ static const struct ble_gatt_svc_def ble_svc_ias_defs[] = { { /*** Service: Immediate Alert Service (IAS). */ .type = BLE_GATT_SVC_TYPE_PRIMARY, - .uuid = BLE_UUID16(BLE_SVC_IAS_UUID16), + .uuid = BLE_UUID16_DECLARE(BLE_SVC_IAS_UUID16), .characteristics = (struct ble_gatt_chr_def[]) { { /*** Characteristic: Alert Level. */ - .uuid = BLE_UUID16(BLE_SVC_IAS_CHR_UUID16_ALERT_LEVEL), + .uuid = BLE_UUID16_DECLARE(BLE_SVC_IAS_CHR_UUID16_ALERT_LEVEL), .access_cb = ble_svc_ias_access, .flags = BLE_GATT_CHR_F_WRITE_NO_RSP, }, { diff --git a/nimble/host/src/ble_att.c b/nimble/host/src/ble_att.c index bd7bcc2d6..8261e09e7 100644 --- a/nimble/host/src/ble_att.c +++ b/nimble/host/src/ble_att.c @@ -19,7 +19,6 @@ #include #include -#include "bsp/bsp.h" #include "ble_hs_priv.h" static uint16_t ble_att_preferred_mtu_val; diff --git a/nimble/host/src/ble_att_svr.c b/nimble/host/src/ble_att_svr.c index eab172308..4c2680ff8 100644 --- a/nimble/host/src/ble_att_svr.c +++ b/nimble/host/src/ble_att_svr.c @@ -19,7 +19,6 @@ #include #include -#include "bsp/bsp.h" #include "os/os.h" #include "nimble/ble.h" #include "host/ble_uuid.h" diff --git a/nimble/host/src/ble_hs.c b/nimble/host/src/ble_hs.c index c55cb9253..46c086533 100644 --- a/nimble/host/src/ble_hs.c +++ b/nimble/host/src/ble_hs.c @@ -22,7 +22,6 @@ #include #include "sysinit/sysinit.h" #include "syscfg/syscfg.h" -#include "bsp/bsp.h" #include "stats/stats.h" #include "os/os.h" #include "console/console.h" @@ -125,20 +124,20 @@ ble_hs_evq_set(struct os_eventq *evq) ble_hs_evq = evq; } +#if MYNEWT_VAL(BLE_HS_DEBUG) int ble_hs_locked_by_cur_task(void) { struct os_task *owner; -#if MYNEWT_VAL(BLE_HS_DEBUG) if (!os_started()) { return ble_hs_dbg_mutex_locked; } -#endif owner = ble_hs_mutex.mu_owner; return owner != NULL && owner == os_sched_get_current_task(); } +#endif /** * Indicates whether the host's parent task is currently running. diff --git a/nimble/host/src/ble_hs_hci.c b/nimble/host/src/ble_hs_hci.c index 820e5c306..af07fce5e 100644 --- a/nimble/host/src/ble_hs_hci.c +++ b/nimble/host/src/ble_hs_hci.c @@ -338,7 +338,7 @@ ble_hs_hci_cmd_tx_empty_ack(uint16_t opcode, void *cmd, uint8_t cmd_len) void ble_hs_hci_rx_ack(uint8_t *ack_ev) { - if (ble_hs_hci_sem.sem_tokens != 0) { + if (os_sem_get_count(&ble_hs_hci_sem) > 0) { /* This ack is unexpected; ignore it. */ ble_hci_trans_buf_free(ack_ev); return; diff --git a/nimble/host/src/ble_monitor.c b/nimble/host/src/ble_monitor.c index 93a75e68c..35e619e27 100644 --- a/nimble/host/src/ble_monitor.c +++ b/nimble/host/src/ble_monitor.c @@ -25,6 +25,7 @@ #error "Cannot enable monitor over UART and RTT at the same time!" #endif +#include #include #include #include "os/os.h"