diff --git a/nimble/controller/include/controller/ble_ll_iso.h b/nimble/controller/include/controller/ble_ll_iso.h index 2944b07476..2ccac1ec44 100644 --- a/nimble/controller/include/controller/ble_ll_iso.h +++ b/nimble/controller/include/controller/ble_ll_iso.h @@ -27,18 +27,18 @@ extern "C" { #endif int ble_ll_iso_read_tx_sync(const uint8_t *cmdbuf, uint8_t len); -int ble_ll_iso_set_cig_param(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen); +int ble_ll_isoal_hci_set_cig_param(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen); int ble_ll_iso_set_cig_param_test(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen); -int ble_ll_iso_create_cis(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_isoal_hci_create_cis(const uint8_t *cmdbuf, uint8_t len); int ble_ll_iso_disconnect_cmd(const struct ble_hci_lc_disconnect_cp *cmd); -int ble_ll_iso_remove_cig(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen); -int ble_ll_iso_accept_cis_req(const uint8_t *cmdbuf, uint8_t len); -int ble_ll_iso_reject_cis_req(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_isoal_hci_remove_cig(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen); +int ble_ll_isoal_hci_accept_cis_req(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_isoal_hci_reject_cis_req(const uint8_t *cmdbuf, uint8_t len); int ble_ll_iso_create_big(const uint8_t *cmdbuf, uint8_t len); int ble_ll_iso_create_big_test(const uint8_t *cmdbuf, uint8_t len); int ble_ll_iso_terminate_big(const uint8_t *cmdbuf, uint8_t len); -int ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len); -int ble_ll_iso_big_terminate_sync(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_isoal_hci_big_create_sync(const uint8_t *cmdbuf, uint8_t len); +int ble_ll_isoal_hci_big_terminate_sync(const uint8_t *cmdbuf, uint8_t len); int ble_ll_iso_setup_iso_data_path(const uint8_t *cmdbuf, uint8_t len); int ble_ll_iso_remove_iso_data_path(const uint8_t *cmdbuf, uint8_t len); int ble_ll_iso_transmit_test(const uint8_t *cmdbuf, uint8_t len); diff --git a/nimble/controller/src/ble_ll.c b/nimble/controller/src/ble_ll.c index fd96f7d625..a4d242fee5 100644 --- a/nimble/controller/src/ble_ll.c +++ b/nimble/controller/src/ble_ll.c @@ -1925,7 +1925,7 @@ ble_ll_init(void) features |= BLE_LL_FEAT_SCA_UPDATE; #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) +#if MYNEWT_VAL(BLE_LL_ISO) features |= BLE_LL_FEAT_CIS_CENTRAL; features |= BLE_LL_FEAT_CIS_PERIPH; features |= BLE_LL_FEAT_CIS_HOST; diff --git a/nimble/controller/src/ble_ll_ctrl.c b/nimble/controller/src/ble_ll_ctrl.c index ed03fd10f9..1dd0f67afe 100644 --- a/nimble/controller/src/ble_ll_ctrl.c +++ b/nimble/controller/src/ble_ll_ctrl.c @@ -1296,7 +1296,7 @@ ble_ll_ctrl_rx_subrate_ind(struct ble_ll_conn_sm *connsm, uint8_t *req, } #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) +#if MYNEWT_VAL(BLE_LL_ISO) static uint8_t ble_ll_ctrl_rx_cis_req(struct ble_ll_conn_sm *connsm, uint8_t *dptr, uint8_t *rspdata) @@ -1522,7 +1522,7 @@ ble_ll_ctrl_start_enc_send(struct ble_ll_conn_sm *connsm) return rc; } -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) +#if MYNEWT_VAL(BLE_LL_ISO) static void ble_ll_ctrl_cis_create(struct ble_ll_conn_sm *connsm, uint8_t *dptr) { @@ -2544,7 +2544,7 @@ ble_ll_ctrl_proc_init(struct ble_ll_conn_sm *connsm, int ctrl_proc, void *data) ble_ll_ctrl_sca_req_rsp_make(connsm, ctrdata); break; #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) +#if MYNEWT_VAL(BLE_LL_ISO) case BLE_LL_CTRL_PROC_CIS_CREATE: opcode = BLE_LL_CTRL_CIS_REQ; ble_ll_ctrl_cis_create(connsm, ctrdata); @@ -3013,7 +3013,7 @@ ble_ll_ctrl_rx_pdu(struct ble_ll_conn_sm *connsm, struct os_mbuf *om) break; #endif -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) +#if MYNEWT_VAL(BLE_LL_ISO) case BLE_LL_CTRL_CIS_REQ: rsp_opcode = ble_ll_ctrl_rx_cis_req(connsm, dptr, rspdata); break; diff --git a/nimble/controller/src/ble_ll_hci.c b/nimble/controller/src/ble_ll_hci.c index 719fa6924a..3d3c397bf3 100644 --- a/nimble/controller/src/ble_ll_hci.c +++ b/nimble/controller/src/ble_ll_hci.c @@ -1275,49 +1275,44 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf, rc = ble_ll_iso_big_hci_terminate(cmdbuf, len); break; #endif /* BLE_LL_ISO_BROADCASTER */ -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) +#if MYNEWT_VAL(BLE_LL_ISO) case BLE_HCI_OCF_LE_READ_ISO_TX_SYNC: - rc = ble_ll_iso_read_tx_sync(cmdbuf, len); + rc = ble_ll_isoal_hci_read_tx_sync(cmdbuf, len, rspbuf, rsplen); break; case BLE_HCI_OCF_LE_SET_CIG_PARAMS: - rc = ble_ll_iso_set_cig_param(cmdbuf, len, rspbuf, rsplen); + rc = ble_ll_isoal_hci_set_cig_param(cmdbuf, len, rspbuf, rsplen); break; case BLE_HCI_OCF_LE_CREATE_CIS: - rc = ble_ll_iso_create_cis(cmdbuf, len); + rc = ble_ll_isoal_hci_create_cis(cmdbuf, len); break; case BLE_HCI_OCF_LE_REMOVE_CIG: - rc = ble_ll_iso_remove_cig(cmdbuf, len, rspbuf, rsplen); + rc = ble_ll_isoal_hci_remove_cig(cmdbuf, len, rspbuf, rsplen); break; case BLE_HCI_OCF_LE_ACCEPT_CIS_REQ: - rc = ble_ll_iso_accept_cis_req(cmdbuf, len); + rc = ble_ll_isoal_hci_accept_cis_req(cmdbuf, len); break; case BLE_HCI_OCF_LE_REJECT_CIS_REQ: - rc = ble_ll_iso_reject_cis_req(cmdbuf, len); + rc = ble_ll_isoal_hci_reject_cis_req(cmdbuf, len); break; case BLE_HCI_OCF_LE_BIG_CREATE_SYNC: - rc = ble_ll_iso_big_create_sync(cmdbuf, len); + rc = ble_ll_isoal_hci_big_create_sync(cmdbuf, len); break; case BLE_HCI_OCF_LE_BIG_TERMINATE_SYNC: - rc = ble_ll_iso_big_terminate_sync(cmdbuf,len); + rc = ble_ll_isoal_hci_big_terminate_sync(cmdbuf, len); break; -#endif -#if MYNEWT_VAL(BLE_LL_ISO) case BLE_HCI_OCF_LE_SETUP_ISO_DATA_PATH: rc = ble_ll_isoal_hci_setup_iso_data_path(cmdbuf, len, rspbuf, rsplen); break; case BLE_HCI_OCF_LE_REMOVE_ISO_DATA_PATH: rc = ble_ll_isoal_hci_remove_iso_data_path(cmdbuf, len, rspbuf, rsplen); break; - case BLE_HCI_OCF_LE_READ_ISO_TX_SYNC: - rc = ble_ll_isoal_hci_read_tx_sync(cmdbuf, len, rspbuf, rsplen); - break; case BLE_HCI_OCF_LE_RD_BUF_SIZE_V2: if (len == 0) { rc = ble_ll_hci_le_read_bufsize_v2(rspbuf, rsplen); } break; #endif /* BLE_LL_ISO */ -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO_TEST) +#if MYNEWT_VAL(BLE_LL_ISO_TEST) case BLE_HCI_OCF_LE_SET_CIG_PARAMS_TEST: rc = ble_ll_iso_set_cig_param_test(cmdbuf, len, rspbuf, rsplen); break; @@ -1385,7 +1380,7 @@ ble_ll_hci_disconnect(const uint8_t *cmdbuf, uint8_t len) return BLE_ERR_INV_HCI_CMD_PARMS; } -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) +#if MYNEWT_VAL(BLE_LL_ISO) if (le16toh(cmd->conn_handle) >= BLE_LL_CONN_HANDLE_ISO_OFFSET) { return ble_ll_iso_disconnect_cmd(cmd); } diff --git a/nimble/controller/src/ble_ll_iso.c b/nimble/controller/src/ble_ll_iso.c index a6186fe1a5..e54179bc8f 100644 --- a/nimble/controller/src/ble_ll_iso.c +++ b/nimble/controller/src/ble_ll_iso.c @@ -23,7 +23,7 @@ #include "nimble/hci_common.h" #include "controller/ble_ll_iso.h" -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO) +#if MYNEWT_VAL(BLE_LL_ISO) int ble_ll_iso_read_tx_sync(const uint8_t *cmdbuf, uint8_t len) @@ -32,14 +32,14 @@ ble_ll_iso_read_tx_sync(const uint8_t *cmdbuf, uint8_t len) } int -ble_ll_iso_set_cig_param(const uint8_t *cmdbuf, uint8_t len, - uint8_t *rspbuf, uint8_t *rsplen) +ble_ll_isoal_hci_set_cig_param(const uint8_t *cmdbuf, uint8_t len, + uint8_t *rspbuf, uint8_t *rsplen) { return BLE_ERR_UNSUPPORTED; } int -ble_ll_iso_create_cis(const uint8_t *cmdbuf, uint8_t len) +ble_ll_isoal_hci_create_cis(const uint8_t *cmdbuf, uint8_t len) { return BLE_ERR_UNSUPPORTED; } @@ -51,20 +51,20 @@ ble_ll_iso_disconnect_cmd(const struct ble_hci_lc_disconnect_cp *cmd) } int -ble_ll_iso_remove_cig(const uint8_t *cmdbuf, uint8_t len, - uint8_t *rspbuf, uint8_t *rsplen) +ble_ll_isoal_hci_remove_cig(const uint8_t *cmdbuf, uint8_t len, + uint8_t *rspbuf, uint8_t *rsplen) { return BLE_ERR_UNSUPPORTED; } int -ble_ll_iso_accept_cis_req(const uint8_t *cmdbuf, uint8_t len) +ble_ll_isoal_hci_accept_cis_req(const uint8_t *cmdbuf, uint8_t len) { return BLE_ERR_UNSUPPORTED; } int -ble_ll_iso_reject_cis_req(const uint8_t *cmdbuf, uint8_t len) +ble_ll_isoal_hci_reject_cis_req(const uint8_t *cmdbuf, uint8_t len) { return BLE_ERR_UNSUPPORTED; } @@ -94,18 +94,18 @@ ble_ll_iso_terminate_big(const uint8_t *cmdbuf, uint8_t len) } int -ble_ll_iso_big_create_sync(const uint8_t *cmdbuf, uint8_t len) +ble_ll_isoal_hci_big_create_sync(const uint8_t *cmdbuf, uint8_t len) { return BLE_ERR_UNSUPPORTED; } int -ble_ll_iso_big_terminate_sync(const uint8_t *cmdbuf, uint8_t len) +ble_ll_isoal_hci_big_terminate_sync(const uint8_t *cmdbuf, uint8_t len) { return BLE_ERR_UNSUPPORTED; } -#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO_TEST) +#if MYNEWT_VAL(BLE_LL_ISO) int ble_ll_iso_set_cig_param_test(const uint8_t *cmdbuf, uint8_t len, uint8_t *rspbuf, uint8_t *rsplen) diff --git a/nimble/controller/syscfg.yml b/nimble/controller/syscfg.yml index f02b04dfe4..0894c1604e 100644 --- a/nimble/controller/syscfg.yml +++ b/nimble/controller/syscfg.yml @@ -348,21 +348,6 @@ syscfg.defs: restrictions: - '(BLE_VERSION >= 53) if 1' - BLE_LL_CFG_FEAT_LL_ISO: - description: > - This option is used to enable/disable support for LE Isochronous Channels - as per Bluetooth v5.2 channels - value: MYNEWT_VAL(BLE_ISO) - restrictions: - - '(BLE_VERSION >= 52) if 1' - - BLE_LL_CFG_FEAT_LL_ISO_TEST: - description: > - This option is used to enable/disbale test commands for ISO support - value: MYNEWT_VAL(BLE_ISO_TEST) - restrictions: - - 'BLE_LL_CFG_FEAT_LL_ISO if 1' - BLE_LL_PERIODIC_ADV_SYNC_BIGINFO_REPORTS: description: > This option is used to enable/disable support for @@ -481,6 +466,15 @@ syscfg.defs: - (BLE_VERSION >= 52) if 1 value: 0 state: experimental + + BLE_LL_ISO_TEST: + description: > + This option is used to enable/disbale test commands for ISO support + value: MYNEWT_VAL(BLE_ISO_TEST) + restrictions: + - 'BLE_LL_ISO if 1' + state: experimental + BLE_LL_ISO_BROADCASTER: description: > Enable support for Isochronous Broadcasting state. diff --git a/porting/npl/riot/include/syscfg/syscfg.h b/porting/npl/riot/include/syscfg/syscfg.h index b381d3289c..91bc53234e 100644 --- a/porting/npl/riot/include/syscfg/syscfg.h +++ b/porting/npl/riot/include/syscfg/syscfg.h @@ -996,13 +996,13 @@ #endif /* Value copied from BLE_ISO */ -#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO -#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO (0) +#ifndef MYNEWT_VAL_BLE_LL_ISO +#define MYNEWT_VAL_BLE_LL_ISO (0) #endif /* Value copied from BLE_ISO_TEST */ -#ifndef MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO_TEST -#define MYNEWT_VAL_BLE_LL_CFG_FEAT_LL_ISO_TEST (0) +#ifndef MYNEWT_VAL_BLE_LL_ISO_TEST +#define MYNEWT_VAL_BLE_LL_ISO_TEST (0) #endif /* Value copied from BLE_PERIODIC_ADV */