Lines Matching refs:index

758 static int hfp_ag_update_indicator(struct bt_hfp_ag *ag, enum bt_hfp_ag_indicator index,  in hfp_ag_update_indicator()  argument
765 old_value = ag->indicator_value[index]; in hfp_ag_update_indicator()
767 LOG_ERR("Duplicate value setting, indicator %d, old %d -> new %d", index, old_value, in hfp_ag_update_indicator()
773 ag->indicator_value[index] = value; in hfp_ag_update_indicator()
776 LOG_DBG("indicator %d, old %d -> new %d", index, old_value, value); in hfp_ag_update_indicator()
778 err = hfp_ag_send_data(ag, cb, user_data, "\r\n+CIEV:%d,%d\r\n", (uint8_t)index + 1, value); in hfp_ag_update_indicator()
781 ag->indicator_value[index] = old_value; in hfp_ag_update_indicator()
783 LOG_ERR("Fail to update indicator %d, current %d", index, old_value); in hfp_ag_update_indicator()
942 int index = 0; in bt_hfp_ag_bia_handler() local
958 indicator |= BIT(index); in bt_hfp_ag_bia_handler()
960 indicator &= ~BIT(index); in bt_hfp_ag_bia_handler()
965 index++; in bt_hfp_ag_bia_handler()
1511 for (uint32_t index = 0; index < ARRAY_SIZE(cmd_handlers); index++) { in hfp_ag_recv() local
1512 if (strlen(cmd_handlers[index].cmd) > len) { in hfp_ag_recv()
1515 if (strncmp((char *)data, cmd_handlers[index].cmd, in hfp_ag_recv()
1516 strlen(cmd_handlers[index].cmd)) != 0) { in hfp_ag_recv()
1519 if (NULL != cmd_handlers[index].handler) { in hfp_ag_recv()
1520 (void)net_buf_pull(buf, strlen(cmd_handlers[index].cmd)); in hfp_ag_recv()
1521 err = cmd_handlers[index].handler(ag, buf); in hfp_ag_recv()
2255 int bt_hfp_ag_set_indicator(struct bt_hfp_ag *ag, enum bt_hfp_ag_indicator index, uint8_t value) in bt_hfp_ag_set_indicator() argument
2272 switch (index) { in bt_hfp_ag_set_indicator()
2280 if ((ag_ind[(uint8_t)index].min > value) || (ag_ind[(uint8_t)index].max < value)) { in bt_hfp_ag_set_indicator()
2294 err = hfp_ag_update_indicator(ag, index, value, NULL, NULL); in bt_hfp_ag_set_indicator()