mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-08-02 16:17:54 +00:00
porting: Enable periodic advertising on linux port
Make sure that linux port is build with all features enabled.
This commit is contained in:
committed by
Łukasz Rymanowski
parent
377842d8b4
commit
80160ccdbe
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user