porting: Enable periodic advertising on linux port

Make sure that linux port is build with all features enabled.
This commit is contained in:
Szymon Janc
2019-09-06 14:09:26 +02:00
committed by Łukasz Rymanowski
parent 377842d8b4
commit 80160ccdbe
3 changed files with 28 additions and 5 deletions
@@ -236,23 +236,27 @@
/*** net/nimble */
#ifndef MYNEWT_VAL_BLE_EXT_ADV
#define MYNEWT_VAL_BLE_EXT_ADV (0)
#define MYNEWT_VAL_BLE_EXT_ADV (1)
#endif
#ifndef MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE
#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (31)
#define MYNEWT_VAL_BLE_EXT_ADV_MAX_SIZE (1650)
#endif
#ifndef MYNEWT_VAL_BLE_MAX_CONNECTIONS
#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (1)
#define MYNEWT_VAL_BLE_MAX_CONNECTIONS (5)
#endif
#ifndef MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS
#define MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS (0)
#define MYNEWT_VAL_BLE_MAX_PERIODIC_SYNCS (5)
#endif
#ifndef MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES
#define MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES (0)
#define MYNEWT_VAL_BLE_MULTI_ADV_INSTANCES (5)
#endif
#ifndef MYNEWT_VAL_BLE_PERIODIC_ADV
#define MYNEWT_VAL_BLE_PERIODIC_ADV (1)
#endif
#ifndef MYNEWT_VAL_BLE_ROLE_BROADCASTER
+13
View File
@@ -141,4 +141,17 @@ ble_npl_event_run(struct ble_npl_event *ev)
ev->ev_cb(ev);
}
void
ble_npl_eventq_remove(struct ble_npl_eventq *evq, struct ble_npl_event *ev)
{
wqueue_t *q = static_cast<wqueue_t *>(evq->q);
if (!ev->ev_queued) {
return;
}
ev->ev_queued = 0;
q->remove(ev);
}
}
+6
View File
@@ -74,6 +74,12 @@ public:
return item;
}
void remove(T item) {
pthread_mutex_lock(&m_mutex);
m_queue.remove(item);
pthread_mutex_unlock(&m_mutex);
}
int size() {
pthread_mutex_lock(&m_mutex);
int size = m_queue.size();