Lines Matching refs:hf_at
127 void hf_slc_error(struct at_client *hf_at) in hf_slc_error() argument
129 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in hf_slc_error()
177 int brsf_handle(struct at_client *hf_at) in brsf_handle() argument
179 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in brsf_handle()
183 ret = at_get_number(hf_at, &val); in brsf_handle()
194 int brsf_resp(struct at_client *hf_at, struct net_buf *buf) in brsf_resp() argument
200 err = at_parse_cmd_input(hf_at, buf, "BRSF", brsf_handle, in brsf_resp()
207 hf_slc_error(hf_at); in brsf_resp()
213 static void cind_handle_values(struct at_client *hf_at, uint32_t index, in cind_handle_values() argument
216 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in cind_handle_values()
234 int cind_handle(struct at_client *hf_at) in cind_handle() argument
239 while (at_has_next_list(hf_at)) { in cind_handle()
243 if (at_open_list(hf_at) < 0) { in cind_handle()
248 if (at_list_get_string(hf_at, name, sizeof(name)) < 0) { in cind_handle()
253 if (at_open_list(hf_at) < 0) { in cind_handle()
258 if (at_list_get_range(hf_at, &min, &max) < 0) { in cind_handle()
263 if (at_close_list(hf_at) < 0) { in cind_handle()
268 if (at_close_list(hf_at) < 0) { in cind_handle()
273 cind_handle_values(hf_at, index, name, min, max); in cind_handle()
280 hf_slc_error(hf_at); in cind_handle()
284 int cind_resp(struct at_client *hf_at, struct net_buf *buf) in cind_resp() argument
288 err = at_parse_cmd_input(hf_at, buf, "CIND", cind_handle, in cind_resp()
292 hf_slc_error(hf_at); in cind_resp()
298 void ag_indicator_handle_values(struct at_client *hf_at, uint32_t index, in ag_indicator_handle_values() argument
301 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in ag_indicator_handle_values()
359 int cind_status_handle(struct at_client *hf_at) in cind_status_handle() argument
363 while (at_has_next_list(hf_at)) { in cind_status_handle()
367 ret = at_get_number(hf_at, &value); in cind_status_handle()
373 ag_indicator_handle_values(hf_at, index, value); in cind_status_handle()
381 int cind_status_resp(struct at_client *hf_at, struct net_buf *buf) in cind_status_resp() argument
385 err = at_parse_cmd_input(hf_at, buf, "CIND", cind_status_handle, in cind_status_resp()
389 hf_slc_error(hf_at); in cind_status_resp()
395 int ciev_handle(struct at_client *hf_at) in ciev_handle() argument
400 ret = at_get_number(hf_at, &index); in ciev_handle()
411 ret = at_get_number(hf_at, &value); in ciev_handle()
417 ag_indicator_handle_values(hf_at, (index - 1), value); in ciev_handle()
422 int ring_handle(struct at_client *hf_at) in ring_handle() argument
424 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in ring_handle()
437 int (*func)(struct at_client *hf_at);
443 static const struct unsolicited *hfp_hf_unsol_lookup(struct at_client *hf_at) in hfp_hf_unsol_lookup() argument
448 if (!strncmp(hf_at->buf, handlers[i].cmd, in hfp_hf_unsol_lookup()
457 int unsolicited_cb(struct at_client *hf_at, struct net_buf *buf) in unsolicited_cb() argument
461 handler = hfp_hf_unsol_lookup(hf_at); in unsolicited_cb()
467 if (!at_parse_cmd_input(hf_at, buf, handler->cmd, handler->func, in unsolicited_cb()
475 int cmd_complete(struct at_client *hf_at, enum at_result result, in cmd_complete() argument
478 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in cmd_complete()
508 int cmee_finish(struct at_client *hf_at, enum at_result result, in cmee_finish() argument
519 static void slc_completed(struct at_client *hf_at) in slc_completed() argument
521 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in slc_completed()
533 int cmer_finish(struct at_client *hf_at, enum at_result result, in cmer_finish() argument
538 hf_slc_error(hf_at); in cmer_finish()
542 slc_completed(hf_at); in cmer_finish()
547 int cind_status_finish(struct at_client *hf_at, enum at_result result, in cind_status_finish() argument
550 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in cind_status_finish()
555 hf_slc_error(hf_at); in cind_status_finish()
559 at_register_unsolicited(hf_at, unsolicited_cb); in cind_status_finish()
562 hf_slc_error(hf_at); in cind_status_finish()
569 int cind_finish(struct at_client *hf_at, enum at_result result, in cind_finish() argument
572 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in cind_finish()
577 hf_slc_error(hf_at); in cind_finish()
584 hf_slc_error(hf_at); in cind_finish()
591 int brsf_finish(struct at_client *hf_at, enum at_result result, in brsf_finish() argument
594 struct bt_hfp_hf *hf = CONTAINER_OF(hf_at, struct bt_hfp_hf, at); in brsf_finish()
599 hf_slc_error(hf_at); in brsf_finish()
605 hf_slc_error(hf_at); in brsf_finish()