Bluetooth: ISO: Rename bt_iso_cig_create_param
Renames the struct from bt_iso_cig_create_param to bt_iso_cig_param as the same struct can, without modification, be used to update the CIG as well (function to support that will come in a later commit). Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
3f345132e0
commit
19c032ed78
5 changed files with 9 additions and 8 deletions
|
@ -199,7 +199,7 @@ struct bt_iso_recv_info {
|
||||||
/** Opaque type representing an Connected Isochronous Group (CIG). */
|
/** Opaque type representing an Connected Isochronous Group (CIG). */
|
||||||
struct bt_iso_cig;
|
struct bt_iso_cig;
|
||||||
|
|
||||||
struct bt_iso_cig_create_param {
|
struct bt_iso_cig_param {
|
||||||
/** @brief Array of pointers to CIS channels */
|
/** @brief Array of pointers to CIS channels */
|
||||||
struct bt_iso_chan **cis_channels;
|
struct bt_iso_chan **cis_channels;
|
||||||
|
|
||||||
|
@ -515,7 +515,7 @@ int bt_iso_server_register(struct bt_iso_server *server);
|
||||||
*
|
*
|
||||||
* @return 0 in case of success or negative value in case of error.
|
* @return 0 in case of success or negative value in case of error.
|
||||||
*/
|
*/
|
||||||
int bt_iso_cig_create(const struct bt_iso_cig_create_param *param,
|
int bt_iso_cig_create(const struct bt_iso_cig_param *param,
|
||||||
struct bt_iso_cig **out_cig);
|
struct bt_iso_cig **out_cig);
|
||||||
|
|
||||||
/** @brief Terminates a CIG as a central
|
/** @brief Terminates a CIG as a central
|
||||||
|
|
|
@ -217,7 +217,7 @@ void main(void)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct bt_iso_chan *channels[1];
|
struct bt_iso_chan *channels[1];
|
||||||
struct bt_iso_cig_create_param param;
|
struct bt_iso_cig_param param;
|
||||||
struct bt_iso_cig *cig;
|
struct bt_iso_cig *cig;
|
||||||
|
|
||||||
err = bt_enable(NULL);
|
err = bt_enable(NULL);
|
||||||
|
|
|
@ -86,7 +86,7 @@ static struct bt_iso_chan_qos iso_qos = {
|
||||||
.rx = &iso_rx_qos,
|
.rx = &iso_rx_qos,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct bt_iso_cig_create_param cig_create_param = {
|
static struct bt_iso_cig_param cig_create_param = {
|
||||||
.interval = DEFAULT_CIS_INTERVAL_US, /* in microseconds */
|
.interval = DEFAULT_CIS_INTERVAL_US, /* in microseconds */
|
||||||
.latency = DEFAULT_CIS_LATENCY_MS, /* milliseconds */
|
.latency = DEFAULT_CIS_LATENCY_MS, /* milliseconds */
|
||||||
.sca = BT_GAP_SCA_UNKNOWN,
|
.sca = BT_GAP_SCA_UNKNOWN,
|
||||||
|
|
|
@ -993,7 +993,7 @@ struct bt_conn *bt_conn_add_iso(struct bt_conn *acl)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct net_buf *hci_le_set_cig_params(const struct bt_iso_cig *cig,
|
static struct net_buf *hci_le_set_cig_params(const struct bt_iso_cig *cig,
|
||||||
const struct bt_iso_cig_create_param *param)
|
const struct bt_iso_cig_param *param)
|
||||||
{
|
{
|
||||||
struct bt_hci_cp_le_set_cig_params *req;
|
struct bt_hci_cp_le_set_cig_params *req;
|
||||||
struct bt_hci_cis_params *cis_param;
|
struct bt_hci_cis_params *cis_param;
|
||||||
|
@ -1088,7 +1088,8 @@ static struct bt_iso_cig *get_free_cig(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cig_init_cis(struct bt_iso_cig *cig, const struct bt_iso_cig_create_param *param)
|
static int cig_init_cis(struct bt_iso_cig *cig,
|
||||||
|
const struct bt_iso_cig_param *param)
|
||||||
{
|
{
|
||||||
for (uint8_t i = 0; i < param->num_cis; i++) {
|
for (uint8_t i = 0; i < param->num_cis; i++) {
|
||||||
struct bt_iso_chan *cis = param->cis_channels[i];
|
struct bt_iso_chan *cis = param->cis_channels[i];
|
||||||
|
@ -1127,7 +1128,7 @@ static void cleanup_cig(struct bt_iso_cig *cig)
|
||||||
memset(cig, 0, sizeof(*cig));
|
memset(cig, 0, sizeof(*cig));
|
||||||
}
|
}
|
||||||
|
|
||||||
int bt_iso_cig_create(const struct bt_iso_cig_create_param *param,
|
int bt_iso_cig_create(const struct bt_iso_cig_param *param,
|
||||||
struct bt_iso_cig **out_cig)
|
struct bt_iso_cig **out_cig)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
|
@ -136,7 +136,7 @@ static int cmd_listen(const struct shell *sh, size_t argc, char *argv[])
|
||||||
static int cmd_cig_create(const struct shell *sh, size_t argc, char *argv[])
|
static int cmd_cig_create(const struct shell *sh, size_t argc, char *argv[])
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
struct bt_iso_cig_create_param param;
|
struct bt_iso_cig_param param;
|
||||||
struct bt_iso_chan *chans[CIS_ISO_CHAN_COUNT];
|
struct bt_iso_chan *chans[CIS_ISO_CHAN_COUNT];
|
||||||
|
|
||||||
if (cig != NULL) {
|
if (cig != NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue