mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-30 20:47:22 +00:00
Merge pull request #770 from andrzej-kaczmarek/adv-chain
nimble/ll: Add support for advertising and scan response data fragmentation X-Original-Commit: 1f0049a351154c937472395d15b5cfbe27c9d64b
This commit is contained in:
@@ -240,8 +240,9 @@ struct ble_dev_addr
|
||||
#define BLE_LL_ACC_ADDR_LEN (4)
|
||||
#define BLE_LL_CRC_LEN (3)
|
||||
#define BLE_LL_PDU_HDR_LEN (2)
|
||||
#define BLE_LL_MAX_PAYLOAD_LEN (255)
|
||||
#define BLE_LL_MIN_PDU_LEN (BLE_LL_PDU_HDR_LEN)
|
||||
#define BLE_LL_MAX_PDU_LEN (257)
|
||||
#define BLE_LL_MAX_PDU_LEN ((BLE_LL_PDU_HDR_LEN) + (BLE_LL_MAX_PAYLOAD_LEN))
|
||||
#define BLE_LL_CRCINIT_ADV (0x555555)
|
||||
|
||||
/* Access address for advertising channels */
|
||||
|
||||
@@ -152,10 +152,12 @@ int ble_ll_sched_master_new(struct ble_ll_conn_sm *connsm,
|
||||
int ble_ll_sched_slave_new(struct ble_ll_conn_sm *connsm);
|
||||
|
||||
struct ble_ll_adv_sm;
|
||||
typedef void ble_ll_sched_adv_new_cb(struct ble_ll_adv_sm *advsm, uint32_t sch_start);
|
||||
typedef void ble_ll_sched_adv_new_cb(struct ble_ll_adv_sm *advsm,
|
||||
uint32_t sch_start, void *arg);
|
||||
|
||||
/* Schedule a new advertising event */
|
||||
int ble_ll_sched_adv_new(struct ble_ll_sched_item *sch, ble_ll_sched_adv_new_cb cb);
|
||||
int ble_ll_sched_adv_new(struct ble_ll_sched_item *sch,
|
||||
ble_ll_sched_adv_new_cb cb, void *arg);
|
||||
|
||||
/* Reschedule an advertising event */
|
||||
int ble_ll_sched_adv_reschedule(struct ble_ll_sched_item *sch, uint32_t *start,
|
||||
|
||||
+577
-342
File diff suppressed because it is too large
Load Diff
@@ -825,7 +825,8 @@ ble_ll_sched_slave_new(struct ble_ll_conn_sm *connsm)
|
||||
}
|
||||
|
||||
int
|
||||
ble_ll_sched_adv_new(struct ble_ll_sched_item *sch, ble_ll_sched_adv_new_cb cb)
|
||||
ble_ll_sched_adv_new(struct ble_ll_sched_item *sch, ble_ll_sched_adv_new_cb cb,
|
||||
void *arg)
|
||||
{
|
||||
int rc;
|
||||
os_sr_t sr;
|
||||
@@ -877,7 +878,7 @@ ble_ll_sched_adv_new(struct ble_ll_sched_item *sch, ble_ll_sched_adv_new_cb cb)
|
||||
}
|
||||
|
||||
if (cb) {
|
||||
cb((struct ble_ll_adv_sm *)orig->cb_arg, adv_start);
|
||||
cb((struct ble_ll_adv_sm *)orig->cb_arg, adv_start, arg);
|
||||
}
|
||||
|
||||
#ifdef BLE_XCVR_RFCLK
|
||||
|
||||
Reference in New Issue
Block a user