2018-12-18 05:48:20 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2017-2019 Nordic Semiconductor ASA
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2020-08-11 11:12:34 +05:30
|
|
|
/* Macro to convert time in us to connection interval units */
|
|
|
|
#define RADIO_CONN_EVENTS(x, y) ((uint16_t)(((x) + (y) - 1) / (y)))
|
|
|
|
|
|
|
|
/* Macro to convert time in us to periodic advertising interval units */
|
|
|
|
#define RADIO_SYNC_EVENTS(x, y) ((uint16_t)(((x) + (y) - 1) / (y)))
|
|
|
|
|
2020-09-09 15:57:34 +05:30
|
|
|
static inline uint8_t ull_ref_get(struct ull_hdr *hdr)
|
|
|
|
{
|
|
|
|
return hdr->ref;
|
|
|
|
}
|
|
|
|
|
2020-05-27 11:26:57 -05:00
|
|
|
static inline uint8_t ull_ref_inc(struct ull_hdr *hdr)
|
2018-12-18 05:48:20 +01:00
|
|
|
{
|
|
|
|
return ++hdr->ref;
|
|
|
|
}
|
|
|
|
|
2020-05-27 11:26:57 -05:00
|
|
|
static inline uint8_t ull_ref_dec(struct ull_hdr *hdr)
|
2018-12-13 09:53:04 +01:00
|
|
|
{
|
|
|
|
return hdr->ref--;
|
|
|
|
}
|
|
|
|
|
2018-12-18 05:48:20 +01:00
|
|
|
static inline void ull_hdr_init(struct ull_hdr *hdr)
|
|
|
|
{
|
|
|
|
hdr->disabled_cb = hdr->disabled_param = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
void *ll_rx_link_alloc(void);
|
|
|
|
void ll_rx_link_release(void *link);
|
|
|
|
void *ll_rx_alloc(void);
|
|
|
|
void ll_rx_release(void *node_rx);
|
2020-05-27 11:26:57 -05:00
|
|
|
void *ll_pdu_rx_alloc_peek(uint8_t count);
|
2018-12-18 05:48:20 +01:00
|
|
|
void *ll_pdu_rx_alloc(void);
|
|
|
|
void ll_rx_put(memq_link_t *link, void *rx);
|
|
|
|
void ll_rx_sched(void);
|
2020-05-27 11:26:57 -05:00
|
|
|
void ull_ticker_status_give(uint32_t status, void *param);
|
|
|
|
uint32_t ull_ticker_status_take(uint32_t ret, uint32_t volatile *ret_cb);
|
2018-12-18 05:48:20 +01:00
|
|
|
void *ull_disable_mark(void *param);
|
|
|
|
void *ull_disable_unmark(void *param);
|
|
|
|
void *ull_disable_mark_get(void);
|
2020-11-12 15:11:43 +01:00
|
|
|
int ull_ticker_stop_with_mark(uint8_t ticker_handle, void *param,
|
|
|
|
void *lll_disable);
|
2019-06-05 13:40:36 +02:00
|
|
|
void *ull_update_mark(void *param);
|
|
|
|
void *ull_update_unmark(void *param);
|
|
|
|
void *ull_update_mark_get(void);
|
2018-12-18 05:48:20 +01:00
|
|
|
int ull_disable(void *param);
|
2020-08-11 10:38:23 +05:30
|
|
|
void ull_drift_ticks_get(struct node_rx_event_done *done,
|
|
|
|
uint32_t *ticks_drift_plus,
|
|
|
|
uint32_t *ticks_drift_minus);
|