static void gap_data_ind(uint16_t l2cap_cid, BT_HDR* p_msg);
static void gap_congestion_ind(uint16_t lcid, bool is_congested);
static void gap_tx_complete_ind(uint16_t l2cap_cid, uint16_t sdu_sent);
-static void gap_credits_received_cb(uint16_t l2cap_cid,
- uint16_t credits_received,
- uint16_t credit_count);
-
static tGAP_CCB* gap_find_ccb_by_cid(uint16_t cid);
static tGAP_CCB* gap_find_ccb_by_handle(uint16_t handle);
static tGAP_CCB* gap_allocate_ccb(void);
conn.reg_info.pL2CA_DataInd_Cb = gap_data_ind;
conn.reg_info.pL2CA_CongestionStatus_Cb = gap_congestion_ind;
conn.reg_info.pL2CA_TxComplete_Cb = gap_tx_complete_ind;
- conn.reg_info.pL2CA_CreditsReceived_Cb = gap_credits_received_cb;
+ conn.reg_info.pL2CA_CreditsReceived_Cb = NULL;
}
/*******************************************************************************
}
}
-void gap_credits_received_cb(uint16_t l2cap_cid, uint16_t credits_received,
- uint16_t credit_count) {
- tGAP_CCB* p_ccb = gap_find_ccb_by_cid(l2cap_cid);
- if (!p_ccb) return;
-
- tGAP_CB_DATA data{.coc_credits = {.credits_received = credits_received,
- .credit_count = credit_count}};
- p_ccb->p_callback(p_ccb->gap_handle, GAP_EVT_LE_COC_CREDITS, &data);
-}
-
/*******************************************************************************
*
* Function gap_connect_ind
#define GAP_EVT_CONN_CONGESTED 0x0103
#define GAP_EVT_CONN_UNCONGESTED 0x0104
#define GAP_EVT_TX_EMPTY 0x0105
-#define GAP_EVT_LE_COC_CREDITS 0x0106
/* Values for 'chan_mode_mask' field */
/* GAP_ConnOpen() - optional channels to negotiate */