Bluetooth: controller: Fix implicit declaration warning
Fix implicit declaration warning for peripheral_latency_cancel by moving it to ull_slave file. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
09b8db4088
commit
c87c1a8890
3 changed files with 40 additions and 45 deletions
|
@ -52,12 +52,6 @@ inline void ull_conn_upd_curr_reset(void);
|
||||||
|
|
||||||
static int init_reset(void);
|
static int init_reset(void);
|
||||||
|
|
||||||
#if defined(CONFIG_BT_PERIPHERAL)
|
|
||||||
static void ticker_update_latency_cancel_op_cb(uint32_t ticker_status,
|
|
||||||
void *params);
|
|
||||||
static void peripheral_latency_cancel(struct ll_conn *conn, uint16_t handle);
|
|
||||||
#endif /* CONFIG_BT_PERIPHERAL */
|
|
||||||
|
|
||||||
static void ticker_update_conn_op_cb(uint32_t status, void *param);
|
static void ticker_update_conn_op_cb(uint32_t status, void *param);
|
||||||
static void ticker_stop_conn_op_cb(uint32_t status, void *param);
|
static void ticker_stop_conn_op_cb(uint32_t status, void *param);
|
||||||
static void ticker_start_conn_op_cb(uint32_t status, void *param);
|
static void ticker_start_conn_op_cb(uint32_t status, void *param);
|
||||||
|
@ -276,7 +270,7 @@ int ll_tx_mem_enqueue(uint16_t handle, void *tx)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
||||||
peripheral_latency_cancel(conn, handle);
|
ull_slave_latency_cancel(conn, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_BT_CTLR_THROUGHPUT)
|
#if defined(CONFIG_BT_CTLR_THROUGHPUT)
|
||||||
|
@ -379,7 +373,7 @@ uint8_t ll_conn_update(uint16_t handle, uint8_t cmd, uint8_t status, uint16_t in
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) &&
|
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) &&
|
||||||
conn->lll.role) {
|
conn->lll.role) {
|
||||||
peripheral_latency_cancel(conn, handle);
|
ull_slave_latency_cancel(conn, handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -427,7 +421,7 @@ uint8_t ll_terminate_ind_send(uint16_t handle, uint8_t reason)
|
||||||
conn->llcp_terminate.req++;
|
conn->llcp_terminate.req++;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
||||||
peripheral_latency_cancel(conn, handle);
|
ull_slave_latency_cancel(conn, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -451,7 +445,7 @@ uint8_t ll_feature_req_send(uint16_t handle)
|
||||||
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) &&
|
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) &&
|
||||||
IS_ENABLED(CONFIG_BT_CTLR_SLAVE_FEAT_REQ) &&
|
IS_ENABLED(CONFIG_BT_CTLR_SLAVE_FEAT_REQ) &&
|
||||||
conn->lll.role) {
|
conn->lll.role) {
|
||||||
peripheral_latency_cancel(conn, handle);
|
ull_slave_latency_cancel(conn, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -473,7 +467,7 @@ uint8_t ll_version_ind_send(uint16_t handle)
|
||||||
conn->llcp_version.req++;
|
conn->llcp_version.req++;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
||||||
peripheral_latency_cancel(conn, handle);
|
ull_slave_latency_cancel(conn, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -526,7 +520,7 @@ uint32_t ll_length_req_send(uint16_t handle, uint16_t tx_octets, uint16_t tx_tim
|
||||||
conn->llcp_length.req++;
|
conn->llcp_length.req++;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
||||||
peripheral_latency_cancel(conn, handle);
|
ull_slave_latency_cancel(conn, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -621,7 +615,7 @@ uint8_t ll_phy_req_send(uint16_t handle, uint8_t tx, uint8_t flags, uint8_t rx)
|
||||||
conn->llcp_phy.req++;
|
conn->llcp_phy.req++;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
if (IS_ENABLED(CONFIG_BT_PERIPHERAL) && conn->lll.role) {
|
||||||
peripheral_latency_cancel(conn, handle);
|
ull_slave_latency_cancel(conn, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1630,38 +1624,6 @@ static int init_reset(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_BT_PERIPHERAL)
|
|
||||||
static void ticker_update_latency_cancel_op_cb(uint32_t ticker_status,
|
|
||||||
void *params)
|
|
||||||
{
|
|
||||||
struct ll_conn *conn = params;
|
|
||||||
|
|
||||||
LL_ASSERT(ticker_status == TICKER_STATUS_SUCCESS);
|
|
||||||
|
|
||||||
conn->slave.latency_cancel = 0U;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void peripheral_latency_cancel(struct ll_conn *conn, uint16_t handle)
|
|
||||||
{
|
|
||||||
/* break peripheral latency */
|
|
||||||
if (conn->lll.latency_event && !conn->slave.latency_cancel) {
|
|
||||||
uint32_t ticker_status;
|
|
||||||
|
|
||||||
conn->slave.latency_cancel = 1U;
|
|
||||||
|
|
||||||
ticker_status =
|
|
||||||
ticker_update(TICKER_INSTANCE_ID_CTLR,
|
|
||||||
TICKER_USER_ID_THREAD,
|
|
||||||
(TICKER_ID_CONN_BASE + handle),
|
|
||||||
0, 0, 0, 0, 1, 0,
|
|
||||||
ticker_update_latency_cancel_op_cb,
|
|
||||||
(void *)conn);
|
|
||||||
LL_ASSERT((ticker_status == TICKER_STATUS_SUCCESS) ||
|
|
||||||
(ticker_status == TICKER_STATUS_BUSY));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_BT_PERIPHERAL */
|
|
||||||
|
|
||||||
static void ticker_update_conn_op_cb(uint32_t status, void *param)
|
static void ticker_update_conn_op_cb(uint32_t status, void *param)
|
||||||
{
|
{
|
||||||
/* Slave drift compensation succeeds, or it fails in a race condition
|
/* Slave drift compensation succeeds, or it fails in a race condition
|
||||||
|
|
|
@ -47,6 +47,8 @@
|
||||||
|
|
||||||
static void ticker_op_stop_adv_cb(uint32_t status, void *param);
|
static void ticker_op_stop_adv_cb(uint32_t status, void *param);
|
||||||
static void ticker_op_cb(uint32_t status, void *param);
|
static void ticker_op_cb(uint32_t status, void *param);
|
||||||
|
static void ticker_update_latency_cancel_op_cb(uint32_t ticker_status,
|
||||||
|
void *params);
|
||||||
|
|
||||||
void ull_slave_setup(memq_link_t *link, struct node_rx_hdr *rx,
|
void ull_slave_setup(memq_link_t *link, struct node_rx_hdr *rx,
|
||||||
struct node_rx_ftr *ftr, struct lll_conn *lll)
|
struct node_rx_ftr *ftr, struct lll_conn *lll)
|
||||||
|
@ -369,6 +371,26 @@ void ull_slave_done(struct node_rx_event_done *done, uint32_t *ticks_drift_plus,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ull_slave_latency_cancel(struct ll_conn *conn, uint16_t handle)
|
||||||
|
{
|
||||||
|
/* break peripheral latency */
|
||||||
|
if (conn->lll.latency_event && !conn->slave.latency_cancel) {
|
||||||
|
uint32_t ticker_status;
|
||||||
|
|
||||||
|
conn->slave.latency_cancel = 1U;
|
||||||
|
|
||||||
|
ticker_status =
|
||||||
|
ticker_update(TICKER_INSTANCE_ID_CTLR,
|
||||||
|
TICKER_USER_ID_THREAD,
|
||||||
|
(TICKER_ID_CONN_BASE + handle),
|
||||||
|
0, 0, 0, 0, 1, 0,
|
||||||
|
ticker_update_latency_cancel_op_cb,
|
||||||
|
(void *)conn);
|
||||||
|
LL_ASSERT((ticker_status == TICKER_STATUS_SUCCESS) ||
|
||||||
|
(ticker_status == TICKER_STATUS_BUSY));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ull_slave_ticker_cb(uint32_t ticks_at_expire, uint32_t remainder,
|
void ull_slave_ticker_cb(uint32_t ticks_at_expire, uint32_t remainder,
|
||||||
uint16_t lazy, void *param)
|
uint16_t lazy, void *param)
|
||||||
{
|
{
|
||||||
|
@ -489,3 +511,13 @@ static void ticker_op_cb(uint32_t status, void *param)
|
||||||
|
|
||||||
LL_ASSERT(status == TICKER_STATUS_SUCCESS);
|
LL_ASSERT(status == TICKER_STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ticker_update_latency_cancel_op_cb(uint32_t ticker_status,
|
||||||
|
void *params)
|
||||||
|
{
|
||||||
|
struct ll_conn *conn = params;
|
||||||
|
|
||||||
|
LL_ASSERT(ticker_status == TICKER_STATUS_SUCCESS);
|
||||||
|
|
||||||
|
conn->slave.latency_cancel = 0U;
|
||||||
|
}
|
||||||
|
|
|
@ -8,5 +8,6 @@ void ull_slave_setup(memq_link_t *link, struct node_rx_hdr *rx,
|
||||||
struct node_rx_ftr *ftr, struct lll_conn *lll);
|
struct node_rx_ftr *ftr, struct lll_conn *lll);
|
||||||
void ull_slave_done(struct node_rx_event_done *done, uint32_t *ticks_drift_plus,
|
void ull_slave_done(struct node_rx_event_done *done, uint32_t *ticks_drift_plus,
|
||||||
uint32_t *ticks_drift_minus);
|
uint32_t *ticks_drift_minus);
|
||||||
|
void ull_slave_latency_cancel(struct ll_conn *conn, uint16_t handle);
|
||||||
void ull_slave_ticker_cb(uint32_t ticks_at_expire, uint32_t remainder, uint16_t lazy,
|
void ull_slave_ticker_cb(uint32_t ticks_at_expire, uint32_t remainder, uint16_t lazy,
|
||||||
void *param);
|
void *param);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue