/* Called to respond to a LL control PDU connection parameter request or response. */
uint8_t ble_ll_ctrl_conn_param_reply(struct ble_ll_conn_sm *connsm, uint8_t *rsp, struct ble_ll_conn_params *req)
/* Called to respond to a LL control PDU connection parameter request or response. */
uint8_t ble_ll_ctrl_conn_param_reply(struct ble_ll_conn_sm *connsm, uint8_t *rsp, struct ble_ll_conn_params *req)
{
    uint8_t rsp_opcode;
    if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) {
        ble_ll_ctrl_conn_param_pdu_make(connsm, rsp + 1, req);
        rsp_opcode = BLE_LL_CTRL_CONN_PARM_RSP;
    } else {
        ble_ll_ctrl_conn_upd_make(connsm, rsp + 1, req);
        rsp_opcode = BLE_LL_CTRL_CONN_UPDATE_IND;
    }
    return rsp_opcode;
}