Home
last modified time | relevance | path

Searched refs:role (Results 1 – 25 of 243) sorted by relevance

12345678910

/Zephyr-latest/subsys/bluetooth/mesh/
Dproxy_msg.c61 struct bt_mesh_proxy_role *role; in proxy_sar_timeout() local
66 role = CONTAINER_OF(dwork, struct bt_mesh_proxy_role, sar_timer); in proxy_sar_timeout()
68 while (!k_fifo_is_empty(&role->pending)) { in proxy_sar_timeout()
69 struct bt_mesh_adv *adv = k_fifo_get(&role->pending, K_NO_WAIT); in proxy_sar_timeout()
76 if (role->conn) { in proxy_sar_timeout()
77 bt_conn_disconnect(role->conn, in proxy_sar_timeout()
86 struct bt_mesh_proxy_role *role = &roles[bt_conn_index(conn)]; in bt_mesh_proxy_msg_recv() local
88 if (net_buf_simple_tailroom(&role->buf) < len - 1) { in bt_mesh_proxy_msg_recv()
95 if (role->buf.len) { in bt_mesh_proxy_msg_recv()
100 role->msg_type = PDU_TYPE(data); in bt_mesh_proxy_msg_recv()
[all …]
Dproxy_cli.c36 struct bt_mesh_proxy_role *role; member
51 if (!servers[i].role) { in find_proxy_srv()
70 if (!servers[i].role || in find_proxy_srv_by_conn()
71 servers[i].role->conn != conn) { in find_proxy_srv_by_conn()
93 if (bt_mesh_proxy_relay_send(server->role->conn, adv)) { in bt_mesh_proxy_cli_relay()
103 static void proxy_msg_recv(struct bt_mesh_proxy_role *role) in proxy_msg_recv() argument
105 switch (role->msg_type) { in proxy_msg_recv()
108 bt_mesh_net_recv(&role->buf, 0, BT_MESH_NET_IF_PROXY); in proxy_msg_recv()
112 bt_mesh_beacon_recv(&role->buf); in proxy_msg_recv()
119 LOG_WRN("Unhandled Message Type 0x%02x", role->msg_type); in proxy_msg_recv()
[all …]
Dpb_gatt_cli.c40 static void pb_gatt_msg_recv(struct bt_mesh_proxy_role *role) in pb_gatt_msg_recv() argument
42 switch (role->msg_type) { in pb_gatt_msg_recv()
45 bt_mesh_pb_gatt_recv(role->conn, &role->buf); in pb_gatt_msg_recv()
48 LOG_WRN("Unhandled Message Type 0x%02x", role->msg_type); in pb_gatt_msg_recv()
Dprov.c276 bt_mesh_prov_link.role->input_complete(); in bt_mesh_input_number()
296 bt_mesh_prov_link.role->input_complete(); in bt_mesh_input_string()
331 if (type >= ARRAY_SIZE(bt_mesh_prov_link.role->op)) { in prov_recv()
333 bt_mesh_prov_link.role->error(PROV_ERR_NVAL_PDU); in prov_recv()
338 !bt_mesh_prov_link.role->op[type]) { in prov_recv()
340 bt_mesh_prov_link.role->error(PROV_ERR_UNEXP_PDU); in prov_recv()
353 bt_mesh_prov_link.role->error(PROV_ERR_NVAL_FMT); in prov_recv()
357 bt_mesh_prov_link.role->op[type](&buf->data[1]); in prov_recv()
370 if (bt_mesh_prov_link.role->link_opened) { in prov_link_opened()
371 bt_mesh_prov_link.role->link_opened(); in prov_link_opened()
[all …]
/Zephyr-latest/samples/bluetooth/iso_broadcast_benchmark/src/
Dmain.c26 char role; in device_role_select() local
32 role = tolower(console_getchar()); in device_role_select()
34 printk("%c\n", role); in device_role_select()
36 if (role == 'r') { in device_role_select()
39 } else if (role == 'b') { in device_role_select()
42 } else if (role == 'q') { in device_role_select()
45 } else if (role == '\n') { in device_role_select()
49 printk("Invalid role: %c\n", role); in device_role_select()
56 enum benchmark_role role; in main() local
76 role = device_role_select(); in main()
[all …]
/Zephyr-latest/subsys/bluetooth/audio/
Dgmap_server.c135 static bool valid_gmap_role(enum bt_gmap_role role) in valid_gmap_role() argument
137 if (role == 0 || (role & BT_GMAP_ROLE_MASK) != role) { in valid_gmap_role()
138 LOG_DBG("Invalid role %d", role); in valid_gmap_role()
141 if ((role & BT_GMAP_ROLE_UGG) != 0 && !IS_ENABLED(CONFIG_BT_GMAP_UGG_SUPPORTED)) { in valid_gmap_role()
147 if ((role & BT_GMAP_ROLE_UGT) != 0 && !IS_ENABLED(CONFIG_BT_GMAP_UGT_SUPPORTED)) { in valid_gmap_role()
153 if ((role & BT_GMAP_ROLE_BGS) != 0 && !IS_ENABLED(CONFIG_BT_GMAP_BGS_SUPPORTED)) { in valid_gmap_role()
159 if ((role & BT_GMAP_ROLE_BGR) != 0 && !IS_ENABLED(CONFIG_BT_GMAP_BGR_SUPPORTED)) { in valid_gmap_role()
168 static bool valid_gmap_features(enum bt_gmap_role role, struct bt_gmap_feat features) in valid_gmap_features() argument
172 if ((role & BT_GMAP_ROLE_UGG) != 0) { in valid_gmap_features()
206 if ((role & BT_GMAP_ROLE_UGT) != 0) { in valid_gmap_features()
[all …]
Dtmap.c143 uint16_t role; in read_role() local
145 role = sys_cpu_to_le16(tmap_role); in read_role()
146 LOG_DBG("TMAP: role 0x%04X", role); in read_role()
149 &role, sizeof(role)); in read_role()
163 static bool valid_tmap_role(enum bt_tmap_role role) in valid_tmap_role() argument
165 if (role == 0 || (role & TMAP_ALL_ROLES) != role) { in valid_tmap_role()
166 LOG_DBG("Invalid role %d", role); in valid_tmap_role()
169 if ((role & BT_TMAP_ROLE_CG) != 0 && !IS_ENABLED(CONFIG_BT_TMAP_CG_SUPPORTED)) { in valid_tmap_role()
175 if ((role & BT_TMAP_ROLE_CT) != 0 && !IS_ENABLED(CONFIG_BT_TMAP_CT_SUPPORTED)) { in valid_tmap_role()
181 if ((role & BT_TMAP_ROLE_UMS) != 0 && !IS_ENABLED(CONFIG_BT_TMAP_UMS_SUPPORTED)) { in valid_tmap_role()
[all …]
Dbap_stream.c589 return info.role; in conn_get_role()
597 uint8_t role; in bt_bap_stream_config() local
615 role = conn_get_role(conn); in bt_bap_stream_config()
616 if (role != BT_HCI_ROLE_CENTRAL) { in bt_bap_stream_config()
617 LOG_DBG("Invalid conn role: %u, shall be central", role); in bt_bap_stream_config()
647 uint8_t role; in bt_bap_stream_qos() local
667 role = conn_get_role(conn); in bt_bap_stream_qos()
668 if (role != BT_HCI_ROLE_CENTRAL) { in bt_bap_stream_qos()
669 LOG_DBG("Invalid conn role: %u, shall be central", role); in bt_bap_stream_qos()
684 uint8_t role; in bt_bap_stream_enable() local
[all …]
/Zephyr-latest/subsys/bluetooth/host/classic/
Drfcomm_internal.h30 bt_rfcomm_role_t role; member
167 #define BT_RFCOMM_UIH_CR(role) ((role) == BT_RFCOMM_ROLE_INITIATOR) argument
177 #define BT_RFCOMM_CMD_CR(role) ((role) == BT_RFCOMM_ROLE_INITIATOR) argument
178 #define BT_RFCOMM_RESP_CR(role) ((role) == BT_RFCOMM_ROLE_ACCEPTOR) argument
187 #define BT_RFCOMM_DLCI(role, channel) ((((channel) & 0x1f) << 1) | \ argument
188 ((role) == BT_RFCOMM_ROLE_ACCEPTOR))
/Zephyr-latest/subsys/ipc/ipc_service/lib/
Dipc_static_vrings.c33 if (p_vdev->role != VIRTIO_DEV_DRIVER) { in ipc_virtio_set_status()
57 if (p_vdev->role == VIRTIO_DEV_DEVICE) { in ipc_virtio_get_status()
73 static int vq_setup(struct ipc_static_vrings *vr, unsigned int role) in vq_setup() argument
97 vr->vdev.role = role; in vq_setup()
106 static int vq_teardown(struct ipc_static_vrings *vr, unsigned int role) in vq_teardown() argument
119 int ipc_static_vrings_init(struct ipc_static_vrings *vr, unsigned int role) in ipc_static_vrings_init() argument
138 return vq_setup(vr, role); in ipc_static_vrings_init()
141 int ipc_static_vrings_deinit(struct ipc_static_vrings *vr, unsigned int role) in ipc_static_vrings_deinit() argument
145 err = vq_teardown(vr, role); in ipc_static_vrings_deinit()
Dipc_rpmsg.c49 int ipc_rpmsg_register_ept(struct ipc_rpmsg_instance *instance, unsigned int role, in ipc_rpmsg_register_ept() argument
60 if (role == RPMSG_REMOTE) { in ipc_rpmsg_register_ept()
73 unsigned int role, in ipc_rpmsg_init() argument
90 if (role == RPMSG_HOST) { in ipc_rpmsg_init()
107 unsigned int role) in ipc_rpmsg_deinit() argument
115 if (role == RPMSG_HOST) { in ipc_rpmsg_deinit()
/Zephyr-latest/subsys/bluetooth/audio/shell/
Dtmap.c26 const enum bt_tmap_role role = (BT_TMAP_CG_SUPPORTED ? BT_TMAP_ROLE_CG : 0U) | in cmd_tmap_init() local
34 shell_info(sh, "Registering TMAS with role: 0x%04X", role); in cmd_tmap_init()
36 err = bt_tmap_register(role); in cmd_tmap_init()
46 static void tmap_discover_cb(enum bt_tmap_role role, struct bt_conn *conn, int err) in tmap_discover_cb() argument
53 shell_print(ctx_shell, "tmap discovered for conn %p: role 0x%04x", conn, role); in tmap_discover_cb()
/Zephyr-latest/drivers/pwm/
Dpwm_mcux_ctimer.c29 enum pwm_ctimer_channel_role role; member
78 if (data->channel_states[new_pulse_channel].role != PWM_CTIMER_CHANNEL_ROLE_PULSE) { in mcux_ctimer_pwm_is_period_valid()
115 while (data->channel_states[*ret_period_channel].role != PWM_CTIMER_CHANNEL_ROLE_NONE) { in mcux_ctimer_pwm_select_period_channel()
131 if (data->channel_states[pulse_channel].role != PWM_CTIMER_CHANNEL_ROLE_PULSE) { in mcux_ctimer_pwm_update_state()
135 data->channel_states[pulse_channel].role = PWM_CTIMER_CHANNEL_ROLE_PULSE; in mcux_ctimer_pwm_update_state()
140 data->channel_states[period_channel].role = PWM_CTIMER_CHANNEL_ROLE_PERIOD; in mcux_ctimer_pwm_update_state()
252 [kCTIMER_Match_0] = {.role = PWM_CTIMER_CHANNEL_ROLE_NONE, \
254 [kCTIMER_Match_1] = {.role = PWM_CTIMER_CHANNEL_ROLE_NONE, \
256 [kCTIMER_Match_2] = {.role = PWM_CTIMER_CHANNEL_ROLE_NONE, \
258 [kCTIMER_Match_3] = {.role = PWM_CTIMER_CHANNEL_ROLE_NONE, \
/Zephyr-latest/include/zephyr/drivers/usb/
Dusb_bc12.h134 int (*set_role)(const struct device *dev, enum bc12_role role);
150 __syscall int bc12_set_role(const struct device *dev, enum bc12_role role);
152 static inline int z_impl_bc12_set_role(const struct device *dev, enum bc12_role role) in z_impl_bc12_set_role() argument
156 return api->set_role(dev, role); in z_impl_bc12_set_role()
/Zephyr-latest/tests/bluetooth/tester/src/audio/
Dbtp_tmap.c27 static void tmap_discover_cb(enum bt_tmap_role role, struct bt_conn *conn, int err) in tmap_discover_cb() argument
37 ev.role = role; in tmap_discover_cb()
84 const enum bt_tmap_role role = (BT_TMAP_CG_SUPPORTED ? BT_TMAP_ROLE_CG : 0U) | in tester_init_tmap() local
92 err = bt_tmap_register(role); in tester_init_tmap()
/Zephyr-latest/include/zephyr/ipc/
Dipc_rpmsg.h109 unsigned int role,
128 unsigned int role);
142 int ipc_rpmsg_register_ept(struct ipc_rpmsg_instance *instance, unsigned int role,
/Zephyr-latest/tests/bluetooth/controller/ctrl_terminate/src/
Dmain.c54 static void test_terminate_rem(uint8_t role) in test_terminate_rem() argument
61 test_set_role(&conn, role); in test_terminate_rem()
99 static void test_terminate_loc(uint8_t role) in test_terminate_loc() argument
109 test_set_role(&conn, role); in test_terminate_loc()
/Zephyr-latest/include/zephyr/bluetooth/audio/
Dgmap.h178 void (*discover)(struct bt_conn *conn, int err, enum bt_gmap_role role,
220 int bt_gmap_register(enum bt_gmap_role role, struct bt_gmap_feat features);
240 int bt_gmap_set_role(enum bt_gmap_role role, struct bt_gmap_feat features);
Dtmap.h125 void (*discovery_complete)(enum bt_tmap_role role, struct bt_conn *conn, int err);
135 int bt_tmap_register(enum bt_tmap_role role);
154 void bt_tmap_set_role(enum bt_tmap_role role);
/Zephyr-latest/tests/bluetooth/controller/ctrl_cis_terminate/src/
Dmain.c52 static void test_cis_terminate_rem(uint8_t role) in test_cis_terminate_rem() argument
57 test_set_role(&conn, role); in test_cis_terminate_rem()
88 void test_cis_terminate_loc(uint8_t role) in test_cis_terminate_loc() argument
102 test_set_role(&conn, role); in test_cis_terminate_loc()
/Zephyr-latest/samples/bluetooth/iso_connected_benchmark/
DREADME.rst26 * A remote board running the same sample as the reversed role that supports
48 connected board in the central role.
50 peripheral role.
65 Choose device role - type c (central role) or p (peripheral role), or q to quit: p
66 Peripheral role
90 role. Once connected, the central will output overall data (since boot),
97 Choose device role - type c (central role) or p (peripheral role), or q to quit: c
98 Central role
/Zephyr-latest/drivers/usb/bc12/
Dbc12_handlers.c10 static inline int z_vrfy_bc12_set_role(const struct device *dev, enum bc12_role role) in z_vrfy_bc12_set_role() argument
14 return z_impl_bc12_set_role(dev, role); in z_vrfy_bc12_set_role()
/Zephyr-latest/samples/bluetooth/hci_vs_scan_req/
DREADME.rst13 This is quite important in applications in which the broadcaster role is added
14 to the central role, where the RAM saving can be bigger.
15 This sample implements only the broadcaster role; the peripheral role with
/Zephyr-latest/samples/bluetooth/iso_broadcast_benchmark/
DREADME.rst27 * A remote board running the same sample as the reversed role that supports
49 connected board in the receiver role.
51 broadcaster role.
63 Choose device role - type r (receiver role) or b (broadcaster role), or q to quit: r
64 Receiver role
97 Choose device role - type r (receiver role) or b (broadcaster role), or q to quit: b
98 Broadcaster role
/Zephyr-latest/samples/bluetooth/channel_sounding/include/
Dcs_test_params.h13 static struct bt_le_cs_test_param test_params_get(enum bt_conn_le_cs_role role) in test_params_get() argument
17 params.role = role; in test_params_get()

12345678910