/Zephyr-latest/subsys/bluetooth/mesh/ |
D | proxy_msg.c | 7 * SPDX-License-Identifier: Apache-2.0 38 #define PDU_SAR(data) (data[0] >> 6) argument 61 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() 85 const uint8_t *data = buf; in bt_mesh_proxy_msg_recv() local 86 struct bt_mesh_proxy_role *role = &roles[bt_conn_index(conn)]; in bt_mesh_proxy_msg_recv() local [all …]
|
D | proxy_cli.c | 4 * SPDX-License-Identifier: Apache-2.0 36 struct bt_mesh_proxy_role *role; member 40 [0 ... (CONFIG_BT_MAX_CONN - 1)] = { 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() 89 if (!server->link_opened) { in bt_mesh_proxy_cli_relay() 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() [all …]
|
D | pb_gatt_srv.c | 5 * SPDX-License-Identifier: Apache-2.0 45 const void *data, uint16_t len, 51 static void proxy_msg_recv(struct bt_mesh_proxy_role *role) in proxy_msg_recv() argument 53 switch (role->msg_type) { in proxy_msg_recv() 56 bt_mesh_pb_gatt_recv(role->conn, &role->buf); in proxy_msg_recv() 60 LOG_WRN("Unhandled Message Type 0x%02x", role->msg_type); in proxy_msg_recv() 69 const uint8_t *data = buf; in gatt_recv() local 71 if (cli->conn != conn) { in gatt_recv() 72 LOG_ERR("No PB-GATT Client found"); in gatt_recv() 73 return -ENOTCONN; in gatt_recv() [all …]
|
D | proxy_msg.h | 7 * SPDX-License-Identifier: Apache-2.0 15 #define PDU_TYPE(data) (data[0] & BIT_MASK(6)) argument 31 const void *data, uint16_t len, 34 typedef void (*proxy_recv_cb_t)(struct bt_mesh_proxy_role *role); 61 void bt_mesh_proxy_role_cleanup(struct bt_mesh_proxy_role *role);
|
/Zephyr-latest/samples/subsys/usb_c/sink/ |
D | README.rst | 1 .. zephyr:code-sample:: usb-c-sink 2 :name: Basic USB-C Sink 3 :relevant-api: _usbc_device_api 5 Implement a USB-C Power Delivery application in the form of a USB-C Sink. 10 This example demonstrates how to create a USB-C Power Delivery application and 11 how to generate USB VIF policies in XML format using the USB-C subsystem. The 12 application implements a USB-C Sink device. 14 After the USB-C Sink device is plugged into a Power Delivery charger, it 18 .. _usb-c-sink-sample-requirements: 23 node that's compatible with ``usb-c-connector``. [all …]
|
/Zephyr-latest/drivers/pwm/ |
D | pwm_mcux_ctimer.c | 4 * SPDX-License-Identifier: Apache-2.0 15 #include <zephyr/dt-bindings/clock/mcux_lpc_syscon_clock.h> 29 enum pwm_ctimer_channel_role role; member 53 static bool mcux_ctimer_pwm_is_period_valid(struct pwm_mcux_ctimer_data *data, in mcux_ctimer_pwm_is_period_valid() argument 58 if (data->channel_states[current_period_channel].cycles == new_period_cycles) { in mcux_ctimer_pwm_is_period_valid() 66 if (data->num_active_pulse_chans == 0) { in mcux_ctimer_pwm_is_period_valid() 70 if (data->num_active_pulse_chans > 1) { in mcux_ctimer_pwm_is_period_valid() 78 if (data->channel_states[new_pulse_channel].role != PWM_CTIMER_CHANNEL_ROLE_PULSE) { in mcux_ctimer_pwm_is_period_valid() 92 static int mcux_ctimer_pwm_select_period_channel(struct pwm_mcux_ctimer_data *data, in mcux_ctimer_pwm_select_period_channel() argument 97 if (data->is_period_channel_set) { in mcux_ctimer_pwm_select_period_channel() [all …]
|
/Zephyr-latest/dts/bindings/usb-c/ |
D | usb-c-connector.yaml | 2 # SPDX-License-Identifier: Apache-2.0 5 A USB Type-C connector node represents a physical USB Type-C connector. 6 It should be a child of a USB-C interface controller or a separate node 7 when it is attached to both MUX and USB-C interface controller. 10 …/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/connector/usb-connector.yaml?h=v5.1… 14 USB-C connector attached to a STM32 UCPD typec port controller, which has 18 compatible = "zephyr,usb-c-vbus-adc"; 19 io-channels = <&adc2 8>; 20 output-ohms = <49900>; 21 full-ohms = <(330000 + 49900)>; [all …]
|
/Zephyr-latest/subsys/bluetooth/audio/ |
D | tmap.c | 5 * SPDX-License-Identifier: Apache-2.0 34 /* Hex value if all TMAP role bits are set */ 49 const void *data, uint16_t length) in tmap_char_read() argument 55 if (cb->discovery_complete) { in tmap_char_read() 56 cb->discovery_complete(0, conn, err); in tmap_char_read() 62 /* Check data length */ in tmap_char_read() 64 if (cb->discovery_complete) { in tmap_char_read() 65 cb->discovery_complete(0, conn, BT_ATT_ERR_INVALID_ATTRIBUTE_LEN); in tmap_char_read() 71 /* Extract the TMAP role of the peer and inform application of the value found */ in tmap_char_read() 72 peer_role = sys_get_le16(data); in tmap_char_read() [all …]
|
D | gmap_client.c | 4 * SPDX-License-Identifier: Apache-2.0 48 /* Remote role and features */ 49 enum bt_gmap_role role; member 66 if (gmap_cli->conn != NULL) { in gmap_reset() 67 bt_conn_unref(gmap_cli->conn); in gmap_reset() 77 if (gmap_cli->conn == conn) { in client_by_conn() 89 bt_conn_unref(gmap_cli->conn); in disconnected() 90 gmap_cli->conn = NULL; in disconnected() 100 LOG_DBG("conn %p", (void *)gmap_cli->conn); in discover_complete() 102 atomic_clear_bit(gmap_cli->flags, GMAP_CLIENT_FLAG_BUSY); in discover_complete() [all …]
|
/Zephyr-latest/doc/connectivity/bluetooth/ |
D | bluetooth-le-host.rst | 6 The Bluetooth Host implements all the higher-level protocols and 7 profiles, and most importantly, provides a high-level API for 17 Lowest down in the host stack sits a so-called HCI driver, which is 19 provides a basic API for delivering data from the controller to the 20 host, and vice-versa. 26 * Connection-oriented roles 32 * Connection-less roles 38 Each role comes with its own build-time configuration option: 41 connection-oriented roles central implicitly enables observer role, and 42 peripheral implicitly enables broadcaster role. Usually the first step [all …]
|
/Zephyr-latest/tests/bluetooth/controller/ctrl_unsupported/src/ |
D | main.c | 4 * SPDX-License-Identifier: Apache-2.0 48 static void unsupported_setup(void *data) in unsupported_setup() argument 55 /* +-----+ +-------+ +-----+ 57 * +-----+ +-------+ +-----+ 60 * | |<------------------| 63 * | |------------------>| 71 uint8_t data[LLCTRL_PDU_SIZE] = { 0 }; in lt_tx_pdu_and_rx_unknown_rsp() local 74 encode_pdu(opcode, &pdu, &data); in lt_tx_pdu_and_rx_unknown_rsp() 118 uint8_t data[LLCTRL_PDU_SIZE] = { 0 }; in lt_tx_undef_opcode_and_rx_unknown_rsp() local 123 encode_pdu(LL_UNKNOWN_RSP, &pdu, &data); in lt_tx_undef_opcode_and_rx_unknown_rsp() [all …]
|
/Zephyr-latest/include/zephyr/ipc/ |
D | ipc_rpmsg.h | 4 * SPDX-License-Identifier: Apache-2.0 61 /** Private data to be passed to the endpoint callbacks. */ 94 * @param role Host / Remote role. 95 * @param buffer_size Size of the buffer used to send data between host and remote. 104 * @retval -EINVAL When some parameter is missing. 109 unsigned int role, 122 * @param role Host / Remote role. 124 * @retval -EINVAL When some parameter is missing 128 unsigned int role); 135 * @param role Host / Remote role. [all …]
|
D | ipc_static_vrings.h | 4 * SPDX-License-Identifier: Apache-2.0 42 * @param priv Priv data. 84 /** Private data to be passed to the notify callback. */ 96 * @param role Host / Remote role. 98 * @retval -EINVAL When some parameter is missing. 99 * @retval -ENOMEM When memory is not enough for VQs allocation. 103 int ipc_static_vrings_init(struct ipc_static_vrings *vr, unsigned int role); 110 * @param role Host / Remote role. 115 int ipc_static_vrings_deinit(struct ipc_static_vrings *vr, unsigned int role);
|
/Zephyr-latest/samples/bluetooth/hap_ha/src/ |
D | hap_ha.h | 4 * SPDX-License-Identifier: Apache-2.0 10 * @brief Initialize the BAP Unicast Server role 17 * @brief Initialize the CSIP Set Member role 26 * @param rsi Pointer to place the 6-octet newly generated RSI data. 33 * @brief Initialize the VCP Volume Renderer role 40 * @brief Initialize the MICP Microphone Device role 47 * @brief Initialize the CCP Call Control Client role
|
/Zephyr-latest/subsys/bluetooth/host/classic/ |
D | rfcomm_internal.h | 6 * Copyright (c) 2015-2016 Intel Corporation 8 * SPDX-License-Identifier: Apache-2.0 30 bt_rfcomm_role_t role; member 121 #define BT_RFCOMM_SET_LINE_SETTINGS(data, stop, parity) ((data & 0x3) | \ argument 137 * Length in rfcomm header can be two bytes depending on user data length. 167 #define BT_RFCOMM_UIH_CR(role) ((role) == BT_RFCOMM_ROLE_INITIATOR) argument 171 * Initiator --> Responder 1 172 * Responder --> Initiator 0 174 * Initiator --> Responder 0 175 * Responder --> Initiator 1 [all …]
|
/Zephyr-latest/tests/bluetooth/tester/src/audio/ |
D | btp_tmap.c | 1 /* btp_tmap.c - Bluetooth TMAP Tester */ 6 * SPDX-License-Identifier: Apache-2.0 19 tester_set_bit(rp->data, BTP_TMAP_READ_SUPPORTED_COMMANDS); in read_supported_commands() 20 tester_set_bit(rp->data, BTP_TMAP_DISCOVER); in read_supported_commands() 27 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() 52 conn = bt_conn_lookup_addr_le(BT_ID_DEFAULT, &cp->address); in tmap_discover() 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/samples/bluetooth/central_gatt_write/src/ |
D | gatt_write_common.c | 4 * SPDX-License-Identifier: Apache-2.0 28 delta = k_cycle_get_32() - cycle_stamp; in write_cmd_cb() 36 /* if last data rx-ed was greater than 1 second in the past, in write_cmd_cb() 54 /* Extract the 16-bit data length stored in user_data */ in write_cmd_cb() 108 printk("%s: %s role %u\n", __func__, addr, conn_info.role); in connected() 115 if (conn_info.role == BT_CONN_ROLE_CENTRAL) { in connected() 138 printk("%s: %s role %u, reason %u %s\n", __func__, addr, conn_info.role, in disconnected() 145 if (conn_info.role == BT_CONN_ROLE_CENTRAL) { in disconnected() 153 param->interval_min, param->interval_max, param->latency, in le_param_req() 154 param->timeout); in le_param_req() [all …]
|
/Zephyr-latest/samples/bluetooth/iso_connected_benchmark/ |
D | README.rst | 1 .. zephyr:code-sample:: bluetooth_isochronous_connected_benchmark 3 :relevant-api: bt_iso bluetooth 13 The sample transmits data between the *central* and the *peripheral* 26 * A remote board running the same sample as the reversed role that supports 35 See :zephyr:code-sample-category:`bluetooth` samples for details. 48 connected board in the central role. 50 peripheral role. 54 by uni- or bidirectional). 58 The peripheral will output overall data (since boot), 62 *** Booting Zephyr OS build zephyr-v2.5.0-4098-gdcaaee6db2f5 *** [all …]
|
/Zephyr-latest/samples/bluetooth/channel_sounding/src/ |
D | distance_estimation.c | 4 * SPDX-License-Identifier: Apache-2.0 40 enum bt_conn_le_cs_role role; member 46 *z_out_real = z_a_real * z_b_real - z_a_imag * z_b_imag; in calc_complex_product() 62 y_mean += (y_values[i] - y_mean) / (i + 1); in linear_regression() 63 x_mean += (x_values[i] - x_mean) / (i + 1); in linear_regression() 70 b_est_upper += (x_values[i] - x_mean) * (y_values[i] - y_mean); in linear_regression() 71 b_est_lower += (x_values[i] - x_mean) * (x_values[i] - x_mean); in linear_regression() 82 for (uint16_t i = 0; i < len - 1; i++) { in bubblesort_2() 84 for (uint16_t j = 0; j < len - i - 1; j++) { in bubblesort_2() 102 static float estimate_distance_using_phase_slope(struct iq_sample_and_channel *data, uint8_t len) in estimate_distance_using_phase_slope() argument [all …]
|
/Zephyr-latest/include/zephyr/drivers/usb/ |
D | usb_bc12.h | 4 * SPDX-License-Identifier: Apache-2.0 28 /* FIXME - make these Kconfig options */ 64 /** @brief BC1.2 device role. */ 92 * @param bc12_role Current role of the BC1.2 device. 123 * @param user_data Requester supplied data which is passed along to the callback. 134 int (*set_role)(const struct device *dev, enum bc12_role role); 142 * @brief Set the BC1.2 role. 145 * @param role New role for the BC1.2 device. 148 * @retval -EIO general input/output error. 150 __syscall int bc12_set_role(const struct device *dev, enum bc12_role role); [all …]
|
/Zephyr-latest/samples/net/sockets/echo_server/src/ |
D | udp.c | 1 /* udp.c - UDP specific code for echo server */ 7 * SPDX-License-Identifier: Apache-2.0 29 IS_ENABLED(CONFIG_USERSPACE) ? K_USER : 0, -1); 34 IS_ENABLED(CONFIG_USERSPACE) ? K_USER : 0, -1); 36 static int start_udp_proto(struct data *data, struct sockaddr *bind_addr, in start_udp_proto() argument 43 data->udp.sock = socket(bind_addr->sa_family, SOCK_DGRAM, in start_udp_proto() 46 data->udp.sock = socket(bind_addr->sa_family, SOCK_DGRAM, IPPROTO_UDP); in start_udp_proto() 48 if (data->udp.sock < 0) { in start_udp_proto() 49 NET_ERR("Failed to create UDP socket (%s): %d", data->proto, in start_udp_proto() 51 return -errno; in start_udp_proto() [all …]
|
/Zephyr-latest/subsys/ipc/ipc_service/backends/ |
D | ipc_rpmsg_static_vrings.c | 4 * SPDX-License-Identifier: Apache-2.0 19 #include <zephyr/dt-bindings/ipc_service/static_vrings.h> 53 unsigned int role; member 61 unsigned int role; member 83 rpmsg_ept = &rpmsg_inst->endpoint[i]; in get_ept_slot_with_name() 85 if (strcmp(name, rpmsg_ept->name) == 0) { in get_ept_slot_with_name() 86 return &rpmsg_inst->endpoint[i]; in get_ept_slot_with_name() 103 rpmsg_ept = &rpmsg_inst->endpoint[i]; in check_endpoints_freed() 105 if (rpmsg_ept->bound == true) { in check_endpoints_freed() 115 * - true: when the endpoint was already cached / registered [all …]
|
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/ |
D | test_scanner.c | 4 * SPDX-License-Identifier: Apache-2.0 66 /** Bypassing setting up transmission, and will try to send the raw data that is 69 static void test_tx_send_ad_type_msg(uint8_t type, const uint8_t *data, uint8_t len) in test_tx_send_ad_type_msg() argument 81 ad.data = data; in test_tx_send_ad_type_msg() 88 LOG_HEXDUMP_DBG(ad.data, ad.data_len, "ad.data"); in test_tx_send_ad_type_msg() 110 * First message send message with an ad data type not supported by mesh, and 150 /* Send message with to long data length. */ in test_tx_wrong_packet_length() 153 /* Send message with to short data length. */ in test_tx_wrong_packet_length() 155 ARRAY_SIZE(valid_message)-1); in test_tx_wrong_packet_length() 156 /* Send message with invalid ad type and wrong data length. */ in test_tx_wrong_packet_length() [all …]
|
/Zephyr-latest/subsys/bluetooth/ |
D | Kconfig | 5 # SPDX-License-Identifier: Apache-2.0 9 # Some BT threads use co-op priorities to implement critical sections, 25 bool "HCI-based" 27 HCI-based stack with optional host & controller parts and an 33 Select a custom, non-HCI based stack. If you're not sure what 34 this is, you probably want the HCI-based stack instead. 41 range -256 -1 71 bool "Peripheral Role support" 76 Select this for LE Peripheral role support. 79 bool "Central Role support" [all …]
|
/Zephyr-latest/tests/bluetooth/controller/ctrl_terminate/src/ |
D | main.c | 5 * SPDX-License-Identifier: Apache-2.0 49 static void term_setup(void *data) in term_setup() argument 54 static void test_terminate_rem(uint8_t role) in test_terminate_rem() argument 60 /* Role */ in test_terminate_rem() 61 test_set_role(&conn, role); in test_terminate_rem() 99 static void test_terminate_loc(uint8_t role) in test_terminate_loc() argument 108 /* Role */ in test_terminate_loc() 109 test_set_role(&conn, role); in test_terminate_loc()
|