/Zephyr-latest/tests/bsim/bluetooth/audio/src/ |
D | vcp_vol_ctlr_test.c | 49 static void vcs_state_cb(struct bt_vcp_vol_ctlr *vol_ctlr, int err, in vcs_state_cb() argument 52 if (err != 0) { in vcs_state_cb() 53 FAIL("VCP state cb err (%d)", err); in vcs_state_cb() 63 static void vcs_flags_cb(struct bt_vcp_vol_ctlr *vol_ctlr, int err, in vcs_flags_cb() argument 66 if (err != 0) { in vcs_flags_cb() 67 FAIL("VCP flags cb err (%d)", err); in vcs_flags_cb() 76 static void vocs_state_cb(struct bt_vocs *inst, int err, int16_t offset) in vocs_state_cb() argument 78 if (err != 0) { in vocs_state_cb() 79 FAIL("VOCS state cb err (%d)", err); in vocs_state_cb() 88 static void vocs_location_cb(struct bt_vocs *inst, int err, uint32_t location) in vocs_location_cb() argument [all …]
|
D | tbs_test.c | 96 static void connected(struct bt_conn *conn, uint8_t err) in connected() argument 102 if (err != 0) { in connected() 103 FAIL("Failed to connect to %s (%u)\n", addr, err); in connected() 120 int err; in test_provider_name() local 123 err = bt_tbs_set_bearer_provider_name(0, "BabblesimTBS"); in test_provider_name() 124 if (err != BT_TBS_RESULT_CODE_SUCCESS) { in test_provider_name() 125 FAIL("Could not set bearer provider name: %d\n", err); in test_provider_name() 126 return err; in test_provider_name() 131 return err; in test_provider_name() 136 int err; in test_set_signal_strength() local [all …]
|
D | vcp_vol_rend_test.c | 58 static void vcs_state_cb(struct bt_conn *conn, int err, uint8_t volume, uint8_t mute) in vcs_state_cb() argument 60 if (err != 0) { in vcs_state_cb() 61 FAIL("VCP state cb err (%d)", err); in vcs_state_cb() 70 static void vcs_flags_cb(struct bt_conn *conn, int err, uint8_t flags) in vcs_flags_cb() argument 72 if (err != 0) { in vcs_flags_cb() 73 FAIL("VCP flags cb err (%d)", err); in vcs_flags_cb() 81 static void vocs_state_cb(struct bt_vocs *inst, int err, int16_t offset) in vocs_state_cb() argument 83 if (err != 0) { in vocs_state_cb() 84 FAIL("VOCS state cb err (%d)", err); in vocs_state_cb() 92 static void vocs_location_cb(struct bt_vocs *inst, int err, uint32_t location) in vocs_location_cb() argument [all …]
|
D | pbp_public_broadcast_source_test.c | 67 int err; in started_cb() local 74 err = bap_stream_tx_register(stream); in started_cb() 75 if (err != 0) { in started_cb() 76 FAIL("Failed to register stream %p for TX: %d\n", stream, err); in started_cb() 85 int err; in stopped_cb() local 89 err = bap_stream_tx_unregister(stream); in stopped_cb() 90 if (err != 0) { in stopped_cb() 91 FAIL("Failed to unregister stream %p for TX: %d\n", stream, err); in stopped_cb() 109 int err; in setup_extended_adv_data() local 111 err = bt_rand(&broadcast_id, BT_AUDIO_BROADCAST_ID_SIZE); in setup_extended_adv_data() [all …]
|
D | micp_mic_ctlr_test.c | 44 static void aics_state_cb(struct bt_aics *inst, int err, int8_t gain, in aics_state_cb() argument 47 if (err != 0) { in aics_state_cb() 48 FAIL("AICS state cb err (%d)", err); in aics_state_cb() 59 static void aics_gain_setting_cb(struct bt_aics *inst, int err, uint8_t units, in aics_gain_setting_cb() argument 62 if (err != 0) { in aics_gain_setting_cb() 63 FAIL("AICS gain setting cb err (%d)", err); in aics_gain_setting_cb() 74 static void aics_input_type_cb(struct bt_aics *inst, int err, in aics_input_type_cb() argument 77 if (err != 0) { in aics_input_type_cb() 78 FAIL("AICS input type cb err (%d)", err); in aics_input_type_cb() 87 static void aics_status_cb(struct bt_aics *inst, int err, bool active) in aics_status_cb() argument [all …]
|
D | mcc_test.c | 84 static void mcc_discover_mcs_cb(struct bt_conn *conn, int err) in mcc_discover_mcs_cb() argument 86 if (err) { in mcc_discover_mcs_cb() 87 FAIL("Discovery of MCS failed (%d)\n", err); in mcc_discover_mcs_cb() 94 static void mcc_read_player_name_cb(struct bt_conn *conn, int err, const char *name) in mcc_read_player_name_cb() argument 96 if (err) { in mcc_read_player_name_cb() 97 FAIL("Player Name read failed (%d)\n", err); in mcc_read_player_name_cb() 104 static void mcc_read_icon_obj_id_cb(struct bt_conn *conn, int err, uint64_t id) in mcc_read_icon_obj_id_cb() argument 106 if (err) { in mcc_read_icon_obj_id_cb() 107 FAIL("Icon Object ID read failed (%d)", err); in mcc_read_icon_obj_id_cb() 115 static void mcc_read_icon_url_cb(struct bt_conn *conn, int err, const char *url) in mcc_read_icon_url_cb() argument [all …]
|
/Zephyr-latest/tests/bluetooth/audio/ascs/src/ |
D | test_ase_register.c | 53 int err; in ZTEST() local 55 err = bt_bap_unicast_server_register_cb(&mock_bap_unicast_server_cb); in ZTEST() 56 zassert_equal(err, -ENOTSUP, "Unexpected err response %d", err); in ZTEST() 61 int err; in ZTEST() local 63 err = bt_bap_unicast_server_register(NULL); in ZTEST() 64 zassert_equal(err, -EINVAL, "Unexpected err response %d", err); in ZTEST() 69 int err; in ZTEST() local 76 err = bt_bap_unicast_server_register(¶m); in ZTEST() 77 zassert_equal(err, 0, "Unexpected err response %d", err); in ZTEST() 80 err = bt_bap_unicast_server_register(¶m); in ZTEST() [all …]
|
/Zephyr-latest/samples/bluetooth/cap_initiator/src/ |
D | cap_initiator_broadcast.c | 35 int err; in broadcast_stream_started_cb() local 40 err = cap_initiator_tx_register_stream(cap_stream); in broadcast_stream_started_cb() 41 if (err != 0) { in broadcast_stream_started_cb() 42 LOG_ERR("Failed to register %p for TX: %d", stream, err); in broadcast_stream_started_cb() 49 int err; in broadcast_stream_stopped_cb() local 53 err = cap_initiator_tx_unregister_stream(cap_stream); in broadcast_stream_stopped_cb() 54 if (err != 0) { in broadcast_stream_stopped_cb() 55 LOG_ERR("Failed to unregister %p for TX: %d", stream, err); in broadcast_stream_stopped_cb() 72 int err; in setup_extended_adv() local 75 err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN, NULL, adv); in setup_extended_adv() [all …]
|
D | cap_initiator_unicast.c | 82 int err; in is_tx_stream() local 84 err = bt_bap_ep_get_info(stream->ep, &ep_info); in is_tx_stream() 85 if (err != 0) { in is_tx_stream() 86 LOG_ERR("Failed to get ep info: %d", err); in is_tx_stream() 128 int err; in unicast_stream_started_cb() local 130 err = cap_initiator_tx_register_stream(cap_stream); in unicast_stream_started_cb() 131 if (err != 0) { in unicast_stream_started_cb() 132 LOG_ERR("Failed to register %p for TX: %d", stream, err); in unicast_stream_started_cb() 154 int err; in unicast_stream_stopped_cb() local 156 err = cap_initiator_tx_unregister_stream(cap_stream); in unicast_stream_stopped_cb() [all …]
|
/Zephyr-latest/tests/bluetooth/audio/bap_broadcast_source/src/ |
D | test_callback_register.c | 38 int err; in ZTEST() local 40 err = bt_bap_broadcast_source_register_cb(&mock_bap_broadcast_source_cb); in ZTEST() 41 zassert_equal(0, err, "Unexpected return value %d", err); in ZTEST() 47 int err; in ZTEST() local 49 err = bt_bap_broadcast_source_register_cb(NULL); in ZTEST() 50 zassert_equal(err, -EINVAL, "Unexpected return value %d", err); in ZTEST() 56 int err; in ZTEST() local 58 err = bt_bap_broadcast_source_register_cb(&mock_bap_broadcast_source_cb); in ZTEST() 59 zassert_equal(err, 0, "Unexpected return value %d", err); in ZTEST() 61 err = bt_bap_broadcast_source_register_cb(&mock_bap_broadcast_source_cb); in ZTEST() [all …]
|
/Zephyr-latest/samples/bluetooth/cap_acceptor/src/ |
D | main.c | 71 static void connected_cb(struct bt_conn *conn, uint8_t err) in connected_cb() argument 105 int err; in advertise() local 107 err = bt_le_ext_adv_create(BT_LE_EXT_ADV_CONN, NULL, &adv); in advertise() 108 if (err) { in advertise() 109 LOG_ERR("Failed to create advertising set: %d", err); in advertise() 111 return err; in advertise() 114 err = bt_le_ext_adv_set_data(adv, ad, ARRAY_SIZE(ad), NULL, 0); in advertise() 115 if (err) { in advertise() 116 LOG_ERR("Failed to set advertising data: %d", err); in advertise() 118 return err; in advertise() [all …]
|
/Zephyr-latest/tests/bluetooth/audio/cap_initiator/src/ |
D | main.c | 88 int err; in ZTEST_F() local 90 err = bt_cap_initiator_register_cb(&mock_cap_initiator_cb); in ZTEST_F() 91 zassert_equal(0, err, "Unexpected return value %d", err); in ZTEST_F() 96 int err; in ZTEST_F() local 98 err = bt_cap_initiator_register_cb(NULL); in ZTEST_F() 99 zassert_equal(-EINVAL, err, "Unexpected return value %d", err); in ZTEST_F() 104 int err; in ZTEST_F() local 106 err = bt_cap_initiator_register_cb(&mock_cap_initiator_cb); in ZTEST_F() 107 zassert_equal(0, err, "Unexpected return value %d", err); in ZTEST_F() 109 err = bt_cap_initiator_register_cb(&mock_cap_initiator_cb); in ZTEST_F() [all …]
|
/Zephyr-latest/tests/bluetooth/audio/cap_commander/src/ |
D | main.c | 83 int err; in ZTEST_F() local 85 err = bt_cap_commander_register_cb(&mock_cap_commander_cb); in ZTEST_F() 86 zassert_equal(0, err, "Unexpected return value %d", err); in ZTEST_F() 91 int err; in ZTEST_F() local 93 err = bt_cap_commander_register_cb(NULL); in ZTEST_F() 94 zassert_equal(-EINVAL, err, "Unexpected return value %d", err); in ZTEST_F() 99 int err; in ZTEST_F() local 101 err = bt_cap_commander_register_cb(&mock_cap_commander_cb); in ZTEST_F() 102 zassert_equal(0, err, "Unexpected return value %d", err); in ZTEST_F() 104 err = bt_cap_commander_register_cb(&mock_cap_commander_cb); in ZTEST_F() [all …]
|
/Zephyr-latest/samples/bluetooth/tmap_central/src/ |
D | main.c | 49 void tmap_discovery_complete(enum bt_tmap_role role, struct bt_conn *conn, int err) in tmap_discovery_complete() argument 55 if (err) { in tmap_discovery_complete() 56 printk("TMAS discovery failed! (err %d)\n", err); in tmap_discovery_complete() 71 int err; in init() local 73 err = bt_enable(NULL); in init() 74 if (err != 0) { in init() 75 printk("Bluetooth enable failed (err %d)\n", err); in init() 76 return err; in init() 85 static void connected(struct bt_conn *conn, uint8_t err) in connected() argument 91 if (err != 0) { in connected() [all …]
|
D | vcp_vol_ctlr.c | 21 static void vcs_discover_cb(struct bt_vcp_vol_ctlr *vol_ctlr, int err, in vcs_discover_cb() argument 24 if (err != 0) { in vcs_discover_cb() 25 printk("VCP: Service could not be discovered (%d)\n", err); in vcs_discover_cb() 30 static void vcs_write_cb(struct bt_vcp_vol_ctlr *vol_ctlr, int err) in vcs_write_cb() argument 32 if (err != 0) { in vcs_write_cb() 33 printk("VCP: Write failed (%d)\n", err); in vcs_write_cb() 38 static void vcs_state_cb(struct bt_vcp_vol_ctlr *vol_ctlr, int err, in vcs_state_cb() argument 41 if (err != 0) { in vcs_state_cb() 42 printk("VCP: state cb err (%d)", err); in vcs_state_cb() 49 static void vcs_flags_cb(struct bt_vcp_vol_ctlr *vol_ctlr, int err, in vcs_flags_cb() argument [all …]
|
/Zephyr-latest/tests/subsys/usb/device_next/src/ |
D | main.c | 45 int err; in ZTEST() local 48 err = usbh_req_get_cfg(udev, &cfg); in ZTEST() 53 zassert_equal(err, -EPIPE, "Transfer status is not a protocol error"); in ZTEST() 57 zassert_equal(err, 0, "Transfer status is an error"); in ZTEST() 62 zassert_equal(err, 0, "Transfer status is an error"); in ZTEST() 74 int err; in ZTEST() local 77 err = usbh_req_set_alt(udev, TEST_DEFAULT_INTERFACE, in ZTEST() 85 zassert_equal(err, -EPIPE, "Transfer status is not a protocol error"); in ZTEST() 97 int err; in usb_test_enable() local 99 err = usbh_init(&uhs_ctx); in usb_test_enable() [all …]
|
/Zephyr-latest/subsys/bluetooth/audio/shell/ |
D | media_controller.c | 46 static void local_player_instance_cb(struct media_player *plr, int err) in local_player_instance_cb() argument 48 if (err) { in local_player_instance_cb() 49 shell_error(ctx_shell, "Local player instance failed (%d)", err); in local_player_instance_cb() 62 static void discover_player_cb(struct media_player *plr, int err) in discover_player_cb() argument 64 if (err) { in discover_player_cb() 65 shell_error(ctx_shell, "Discover player failed (%d)", err); in discover_player_cb() 77 static void player_name_cb(struct media_player *plr, int err, const char *name) in player_name_cb() argument 79 if (err) { in player_name_cb() 80 shell_error(ctx_shell, "Player: %p, Player name failed (%d)", plr, err); in player_name_cb() 87 static void icon_id_cb(struct media_player *plr, int err, uint64_t id) in icon_id_cb() argument [all …]
|
/Zephyr-latest/samples/bluetooth/tmap_peripheral/src/ |
D | main.c | 81 void tmap_discovery_complete(enum bt_tmap_role peer_role, struct bt_conn *conn, int err) in tmap_discovery_complete() argument 87 if (err) { in tmap_discovery_complete() 88 printk("TMAS discovery failed! (err %d)\n", err); in tmap_discovery_complete() 102 static void connected(struct bt_conn *conn, uint8_t err) in connected() argument 108 if (err != 0) { in connected() 109 printk("Failed to connect to %s %u %s\n", addr, err, bt_hci_err_to_str(err)); in connected() 139 enum bt_security_err err) in security_changed() argument 141 if (err == 0) { in security_changed() 142 printk("Security changed: %u\n", err); in security_changed() 145 printk("Failed to set security level: %s(%u)", bt_security_err_to_str(err), err); in security_changed() [all …]
|
/Zephyr-latest/tests/drivers/can/api/src/ |
D | canfd.c | 97 int err; in send_test_frame() local 99 err = can_send(dev, frame, TEST_SEND_TIMEOUT, NULL, NULL); in send_test_frame() 100 zassert_not_equal(err, -EBUSY, "arbitration lost in loopback mode"); in send_test_frame() 101 zassert_equal(err, 0, "failed to send frame (err %d)", err); in send_test_frame() 117 int err; in send_test_frame_nowait() local 119 err = can_send(dev, frame, TEST_SEND_TIMEOUT, callback, (void *)frame); in send_test_frame_nowait() 120 zassert_not_equal(err, -EBUSY, "arbitration lost in loopback mode"); in send_test_frame_nowait() 121 zassert_equal(err, 0, "failed to send frame (err %d)", err); in send_test_frame_nowait() 183 int err; in send_receive() local 188 err = k_msgq_get(&can_msgq, &frame_buffer, TEST_RECEIVE_TIMEOUT); in send_receive() [all …]
|
D | classic.c | 227 int err; in send_test_frame() local 229 err = can_send(dev, frame, TEST_SEND_TIMEOUT, NULL, NULL); in send_test_frame() 230 zassert_not_equal(err, -EBUSY, "arbitration lost in loopback mode"); in send_test_frame() 231 zassert_equal(err, 0, "failed to send frame (err %d)", err); in send_test_frame() 247 int err; in send_test_frame_nowait() local 249 err = can_send(dev, frame, TEST_SEND_TIMEOUT, callback, (void *)frame); in send_test_frame_nowait() 250 zassert_not_equal(err, -EBUSY, "arbitration lost in loopback mode"); in send_test_frame_nowait() 251 zassert_equal(err, 0, "failed to send frame (err %d)", err); in send_test_frame_nowait() 314 int err; in send_receive() local 321 err = k_msgq_get(&can_msgq, &frame_buffer, TEST_RECEIVE_TIMEOUT); in send_receive() [all …]
|
/Zephyr-latest/drivers/stepper/ |
D | stepper_shell.c | 178 int err = 0; in cmd_stepper_enable() local 179 bool enable = shell_strtobool(argv[ARG_IDX_PARAM], 10, &err); in cmd_stepper_enable() 181 if (err < 0) { in cmd_stepper_enable() 182 return err; in cmd_stepper_enable() 185 err = parse_device_arg(sh, argv, &dev); in cmd_stepper_enable() 186 if (err < 0) { in cmd_stepper_enable() 187 return err; in cmd_stepper_enable() 190 err = stepper_enable(dev, enable); in cmd_stepper_enable() 191 if (err) { in cmd_stepper_enable() 192 shell_error(sh, "Error: %d", err); in cmd_stepper_enable() [all …]
|
/Zephyr-latest/samples/bluetooth/bap_unicast_client/src/ |
D | main.c | 123 int err; in check_audio_support_and_connect() local 156 err = bt_le_scan_stop(); in check_audio_support_and_connect() 157 if (err != 0) { in check_audio_support_and_connect() 158 printk("Failed to stop scan: %d\n", err); in check_audio_support_and_connect() 165 err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, in check_audio_support_and_connect() 168 if (err != 0) { in check_audio_support_and_connect() 169 printk("Create conn to failed (%u)\n", err); in check_audio_support_and_connect() 206 int err; in start_scan() local 209 err = bt_le_scan_start(BT_LE_SCAN_PASSIVE, device_found); in start_scan() 210 if (err != 0) { in start_scan() [all …]
|
/Zephyr-latest/samples/bluetooth/tmap_bms/src/ |
D | cap_initiator.c | 136 int err; in setup_extended_adv() local 139 err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN, NULL, adv); in setup_extended_adv() 140 if (err != 0) { in setup_extended_adv() 141 printk("Unable to create extended advertising set: %d\n", err); in setup_extended_adv() 142 return err; in setup_extended_adv() 146 err = bt_le_ext_adv_set_data(*adv, ad, ARRAY_SIZE(ad), NULL, 0); in setup_extended_adv() 147 if (err) { in setup_extended_adv() 148 printk("Failed to set advertising data (err %d)\n", err); in setup_extended_adv() 153 err = bt_le_per_adv_set_param(*adv, BT_LE_PER_ADV_DEFAULT); in setup_extended_adv() 154 if (err) { in setup_extended_adv() [all …]
|
D | main.c | 20 int err; in init() local 22 err = bt_enable(NULL); in init() 23 if (err != 0) { in init() 24 printk("Bluetooth enable failed (err %d)\n", err); in init() 25 return err; in init() 35 int err; in main() local 37 err = init(); in main() 38 if (err != 0) { in main() 39 return err; in main() 44 err = bt_tmap_register(BT_TMAP_ROLE_BMS); in main() [all …]
|
/Zephyr-latest/samples/bluetooth/pbp_public_broadcast_source/src/ |
D | main.c | 149 int err; in setup_extended_adv() local 152 err = bt_le_ext_adv_create(BT_LE_EXT_ADV_NCONN, NULL, adv); in setup_extended_adv() 153 if (err != 0) { in setup_extended_adv() 154 printk("Unable to create extended advertising set: %d\n", err); in setup_extended_adv() 156 return err; in setup_extended_adv() 160 err = bt_le_ext_adv_set_data(*adv, ad, ARRAY_SIZE(ad), NULL, 0); in setup_extended_adv() 161 if (err) { in setup_extended_adv() 162 printk("Failed to set advertising data (err %d)\n", err); in setup_extended_adv() 168 err = bt_le_per_adv_set_param(*adv, BT_LE_PER_ADV_DEFAULT); in setup_extended_adv() 169 if (err) { in setup_extended_adv() [all …]
|