NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
ble_ll_sync.h
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef H_BLE_LL_SYNC_
21#define H_BLE_LL_SYNC_
22
23#include <stdint.h>
24
25#include "nimble/nimble/include/nimble/ble.h"
26#include "ble_ll_hci.h"
27#include "ble_ll_conn.h"
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33struct ble_ll_scan_addr_data;
34struct ble_ll_sync_sm;
35
36int ble_ll_sync_create(const uint8_t *cmdbuf, uint8_t len);
37int ble_ll_sync_cancel(ble_ll_hci_post_cmd_complete_cb *post_cmd_cb);
38int ble_ll_sync_terminate(const uint8_t *cmdbuf, uint8_t len);
39int ble_ll_sync_list_add(const uint8_t *cmdbuf, uint8_t len);
40int ble_ll_sync_list_remove(const uint8_t *cmdbuf, uint8_t len);
41int ble_ll_sync_list_clear(void);
42int ble_ll_sync_list_size(uint8_t *rspbuf, uint8_t *rsplen);
43int ble_ll_sync_receive_enable(const uint8_t *cmdbuf, uint8_t len);
44int ble_ll_sync_transfer(const uint8_t *cmdbuf, uint8_t len,
45 uint8_t *rspbuf, uint8_t *rsplen);
46
47void ble_ll_sync_periodic_ind(struct ble_ll_conn_sm *connsm,
48 const uint8_t *sync_ind, bool reports_disabled,
49 uint16_t max_skip, uint32_t sync_timeout);
50void ble_ll_sync_transfer_disconnected(struct ble_ll_conn_sm *connsm);
51
52void ble_ll_sync_info_event(struct ble_ll_scan_addr_data *addrd, uint8_t sid,
53 struct ble_mbuf_hdr *rxhdr,
54 const uint8_t *syncinfo);
55
56int ble_ll_sync_rx_isr_start(uint8_t pdu_type, struct ble_mbuf_hdr *rxhdr);
57int ble_ll_sync_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr);
58void ble_ll_sync_rx_pkt_in(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr);
59void ble_ll_sync_wfr_timer_exp(void);
60void ble_ll_sync_halt(void);
61void ble_ll_sync_rmvd_from_sched(struct ble_ll_sync_sm *sm);
62
63uint32_t ble_ll_sync_get_event_end_time(void);
64
65bool ble_ll_sync_enabled(void);
66
67void ble_ll_sync_reset(void);
68void ble_ll_sync_init(void);
69
70#ifdef __cplusplus
71}
72#endif
73
74#endif /* H_BLE_LL_SYNC_ */
Definition os_mbuf.h:86