/Zephyr-latest/samples/net/sockets/http_client/src/ |
D | main.c | 91 static int payload_cb(int sock, struct http_request *req, void *user_data) in payload_cb() argument 193 struct http_request req; in run_queries() local 195 memset(&req, 0, sizeof(req)); in run_queries() 197 req.method = HTTP_GET; in run_queries() 198 req.url = "/"; in run_queries() 199 req.host = SERVER_ADDR4; in run_queries() 200 req.protocol = "HTTP/1.1"; in run_queries() 201 req.response = response_cb; in run_queries() 202 req.recv_buf = recv_buf_ipv4; in run_queries() 203 req.recv_buf_len = sizeof(recv_buf_ipv4); in run_queries() [all …]
|
/Zephyr-latest/subsys/net/lib/http/ |
D | http_client.c | 177 struct http_request *req = CONTAINER_OF(parser, in on_url() local 182 if (req->internal.response.http_cb && in on_url() 183 req->internal.response.http_cb->on_url) { in on_url() 184 req->internal.response.http_cb->on_url(parser, at, length); in on_url() 192 struct http_request *req = CONTAINER_OF(parser, in on_status() local 197 len = MIN(length, sizeof(req->internal.response.http_status) - 1); in on_status() 198 memcpy(req->internal.response.http_status, at, len); in on_status() 199 req->internal.response.http_status[len] = 0; in on_status() 200 req->internal.response.http_status_code = in on_status() 204 req->internal.response.http_status); in on_status() [all …]
|
/Zephyr-latest/subsys/rtio/ |
D | rtio_workq.c | 25 struct rtio_work_req *req = CONTAINER_OF(work, in rtio_work_handler() local 28 struct rtio_iodev_sqe *iodev_sqe = req->iodev_sqe; in rtio_work_handler() 30 req->handler(iodev_sqe); in rtio_work_handler() 32 k_mem_slab_free(&rtio_work_items_slab, req); in rtio_work_handler() 37 struct rtio_work_req *req; in rtio_work_req_alloc() local 40 err = k_mem_slab_alloc(&rtio_work_items_slab, (void **)&req, K_NO_WAIT); in rtio_work_req_alloc() 48 req->work.thread = NULL; in rtio_work_req_alloc() 49 (void)k_sem_init(&req->work.done_sem, 1, 1); in rtio_work_req_alloc() 51 return req; in rtio_work_req_alloc() 54 void rtio_work_req_submit(struct rtio_work_req *req, in rtio_work_req_submit() argument [all …]
|
/Zephyr-latest/subsys/pm/policy/ |
D | policy_latency.c | 29 struct pm_policy_latency_request *req; in update_max_latency() local 31 SYS_SLIST_FOR_EACH_CONTAINER(&latency_reqs, req, node) { in update_max_latency() 33 ((int32_t)req->value_us < new_max_latency_us)) { in update_max_latency() 34 new_max_latency_us = (int32_t)req->value_us; in update_max_latency() 55 void pm_policy_latency_request_add(struct pm_policy_latency_request *req, in pm_policy_latency_request_add() argument 58 req->value_us = value_us; in pm_policy_latency_request_add() 62 sys_slist_append(&latency_reqs, &req->node); in pm_policy_latency_request_add() 68 void pm_policy_latency_request_update(struct pm_policy_latency_request *req, in pm_policy_latency_request_update() argument 73 req->value_us = value_us; in pm_policy_latency_request_update() 79 void pm_policy_latency_request_remove(struct pm_policy_latency_request *req) in pm_policy_latency_request_remove() argument [all …]
|
/Zephyr-latest/tests/posix/common/src/ |
D | nanosleep.c | 38 struct timespec req = {}; in common_errors() local 56 req = (struct timespec){.tv_sec = -1, .tv_nsec = 0}; in common_errors() 57 zassert_equal(select_nanosleep(selection, clock_id, flags, &req, NULL), -1); in common_errors() 61 req = (struct timespec){.tv_sec = 0, .tv_nsec = -1}; in common_errors() 62 zassert_equal(select_nanosleep(selection, clock_id, flags, &req, NULL), -1); in common_errors() 66 req = (struct timespec){.tv_sec = -1, .tv_nsec = -1}; in common_errors() 67 zassert_equal(select_nanosleep(selection, clock_id, flags, &req, NULL), -1); in common_errors() 72 req = (struct timespec){.tv_sec = 0, .tv_nsec = 1000000000}; in common_errors() 73 zassert_equal(select_nanosleep(selection, clock_id, flags, &req, NULL), -1); in common_errors() 82 req = (struct timespec){.tv_sec = 1, .tv_nsec = 1}; in common_errors() [all …]
|
/Zephyr-latest/samples/net/cloud/tagoio_http_post/src/ |
D | sockets.c | 103 struct http_request req; in tagoio_http_push() local 106 memset(&req, 0, sizeof(req)); in tagoio_http_push() 108 req.method = HTTP_POST; in tagoio_http_push() 109 req.host = TAGOIO_SERVER; in tagoio_http_push() 110 req.port = HTTP_PORT; in tagoio_http_push() 111 req.url = TAGOIO_URL; in tagoio_http_push() 112 req.header_fields = tagoio_http_headers; in tagoio_http_push() 113 req.protocol = "HTTP/1.1"; in tagoio_http_push() 114 req.response = resp_cb; in tagoio_http_push() 115 req.payload = ctx->payload; in tagoio_http_push() [all …]
|
/Zephyr-latest/subsys/bluetooth/host/classic/ |
D | avdtp.c | 49 #define DISCOVER_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_discover_params, req) 50 #define GET_CAP_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_get_capabilities_params, req) 51 #define SET_CONF_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_set_configuration_params, req) 52 #define CTRL_REQ(_req) CONTAINER_OF(_req, struct bt_avdtp_ctrl_params, req) 113 session->req = NULL; in bt_avdtp_clear_req() 135 if (session->req != NULL) { in bt_avdtp_media_l2cap_connected() 136 struct bt_avdtp_req *req = session->req; in bt_avdtp_media_l2cap_connected() local 138 req->status = 0; in bt_avdtp_media_l2cap_connected() 140 if (req->func != NULL) { in bt_avdtp_media_l2cap_connected() 141 req->func(req); in bt_avdtp_media_l2cap_connected() [all …]
|
/Zephyr-latest/drivers/spi/ |
D | spi_max32.c | 56 mxc_spi_req_t req; member 80 static void spi_max32_callback(mxc_spi_req_t *req, int error); 166 static void spi_max32_setup(mxc_spi_regs_t *spi, mxc_spi_req_t *req) in spi_max32_setup() argument 168 req->rxCnt = 0; in spi_max32_setup() 169 req->txCnt = 0; in spi_max32_setup() 172 MXC_SPI_SetSlave(spi, req->ssIdx); in spi_max32_setup() 175 if (req->rxData && req->rxLen) { in spi_max32_setup() 177 req->rxLen << MXC_F_SPI_CTRL1_RX_NUM_CHAR_POS); in spi_max32_setup() 184 if (req->txLen) { in spi_max32_setup() 186 req->txLen << MXC_F_SPI_CTRL1_TX_NUM_CHAR_POS); in spi_max32_setup() [all …]
|
/Zephyr-latest/include/zephyr/pm/ |
D | policy.h | 285 void pm_policy_latency_request_add(struct pm_policy_latency_request *req, 294 void pm_policy_latency_request_update(struct pm_policy_latency_request *req, 302 void pm_policy_latency_request_remove(struct pm_policy_latency_request *req); 310 void pm_policy_latency_changed_subscribe(struct pm_policy_latency_subscription *req, 318 void pm_policy_latency_changed_unsubscribe(struct pm_policy_latency_subscription *req); 321 struct pm_policy_latency_request *req, uint32_t value_us) in pm_policy_latency_request_add() argument 323 ARG_UNUSED(req); in pm_policy_latency_request_add() 328 struct pm_policy_latency_request *req, uint32_t value_us) in pm_policy_latency_request_update() argument 330 ARG_UNUSED(req); in pm_policy_latency_request_update() 335 struct pm_policy_latency_request *req) in pm_policy_latency_request_remove() argument [all …]
|
/Zephyr-latest/tests/boards/nrf/mram_latency/src/ |
D | main.c | 34 struct test_req *req = CONTAINER_OF(cli, struct test_req, cli); in basic_cb() local 36 req->res = res; in basic_cb() 37 req->state = state; in basic_cb() 38 k_sem_give(&req->sem); in basic_cb() 104 struct test_req *req = k_timer_user_data_get(timer); in timeout() local 108 sys_notify_init_callback(&req->cli.notify, basic_cb); in timeout() 110 rv = mram_no_latency_request(&req->cli); in timeout() 116 struct test_req req; in ZTEST() local 121 k_sem_init(&req.sem, 0, 1); in ZTEST() 123 k_timer_user_data_set(&timer, &req); in ZTEST() [all …]
|
/Zephyr-latest/drivers/i2c/ |
D | i2c_max32_rtio.c | 46 mxc_i2c_req_t req; member 112 mxc_i2c_req_t *req = &data->req; in max32_msg_start() local 115 req->i2c = i2c; in max32_msg_start() 116 req->addr = i2c_addr; in max32_msg_start() 128 req->rx_buf = (unsigned char *)buf; in max32_msg_start() 129 req->rx_len = buf_len; in max32_msg_start() 130 req->tx_buf = NULL; in max32_msg_start() 131 req->tx_len = 0; in max32_msg_start() 134 req->tx_buf = (unsigned char *)buf; in max32_msg_start() 135 req->tx_len = buf_len; in max32_msg_start() [all …]
|
D | i2c_max32.c | 54 mxc_i2c_req_t req; member 208 mxc_i2c_req_t *req = &data->req; in i2c_max32_transfer_sync() local 222 while (req->tx_len > data->written) { in i2c_max32_transfer_sync() 225 data->written += MXC_I2C_WriteTXFIFO(i2c, &req->tx_buf[data->written], in i2c_max32_transfer_sync() 226 req->tx_len - data->written); in i2c_max32_transfer_sync() 236 Wrap_MXC_I2C_SetRxCount(i2c, req->rx_len); in i2c_max32_transfer_sync() 237 while (req->rx_len > readb) { in i2c_max32_transfer_sync() 240 readb += MXC_I2C_ReadRXFIFO(i2c, &req->rx_buf[readb], req->rx_len - readb); in i2c_max32_transfer_sync() 249 if ((int_fl0 & ADI_MAX32_I2C_INT_FL0_DONE) && (req->rx_len > readb) && in i2c_max32_transfer_sync() 251 Wrap_MXC_I2C_SetRxCount(i2c, req->rx_len - readb); in i2c_max32_transfer_sync() [all …]
|
/Zephyr-latest/doc/connectivity/networking/api/ |
D | coap_client.rst | 28 struct coap_client_request req = { 0 }; 32 req.method = COAP_METHOD_GET; 33 req.confirmable = true; 34 req.path = "test"; 35 req.fmt = COAP_CONTENT_FORMAT_TEXT_PLAIN; 36 req.cb = response_cb; 37 req.payload = NULL; 38 req.len = 0; 43 ret = coap_client_req(&client, sock, &address, &req, -1); 90 struct coap_client_request req = { 0 }; [all …]
|
D | http_client.rst | 31 struct http_request req = { 0 }; 34 req.method = HTTP_GET; 35 req.url = "/"; 36 req.host = "localhost"; 37 req.protocol = "HTTP/1.1"; 38 req.response = response_cb; 39 req.recv_buf = recv_buf; 40 req.recv_buf_len = sizeof(recv_buf); 45 ret = http_client_req(sock, &req, 5000, NULL);
|
/Zephyr-latest/samples/net/sockets/websocket_client/src/ |
D | main.c | 136 static int connect_cb(int sock, struct http_request *req, void *user_data) in connect_cb() argument 344 struct websocket_request req; in main() local 346 memset(&req, 0, sizeof(req)); in main() 348 req.host = SERVER_ADDR4; in main() 349 req.url = "/"; in main() 350 req.optional_headers = extra_headers; in main() 351 req.cb = connect_cb; in main() 352 req.tmp_buf = temp_recv_buf_ipv4; in main() 353 req.tmp_buf_len = sizeof(temp_recv_buf_ipv4); in main() 355 websock4 = websocket_connect(sock4, &req, timeout, "IPv4"); in main() [all …]
|
/Zephyr-latest/subsys/bluetooth/controller/ll_sw/ |
D | ull_peripheral_iso.c | 173 struct pdu_data_llctrl_cis_req *req, in ull_peripheral_iso_acquire() argument 182 cig = ll_conn_iso_group_get_by_id(req->cig_id); in ull_peripheral_iso_acquire() 193 cig->iso_interval = sys_le16_to_cpu(req->iso_interval); in ull_peripheral_iso_acquire() 197 cig->cig_id = req->cig_id; in ull_peripheral_iso_acquire() 225 if (cis && cis->group && cis->cis_id == req->cis_id) { in ull_peripheral_iso_acquire() 245 cig->c_sdu_interval = sys_get_le24(req->c_sdu_interval) & 0x0FFFFF; in ull_peripheral_iso_acquire() 246 cig->p_sdu_interval = sys_get_le24(req->p_sdu_interval) & 0x0FFFFF; in ull_peripheral_iso_acquire() 248 cis->cis_id = req->cis_id; in ull_peripheral_iso_acquire() 249 cis->framed = (req->c_max_sdu_packed[1] & BIT(7)) >> 7; in ull_peripheral_iso_acquire() 254 cis->c_max_sdu = (uint16_t)(req->c_max_sdu_packed[1] & 0x0F) << 8 | in ull_peripheral_iso_acquire() [all …]
|
/Zephyr-latest/soc/nordic/common/ |
D | mram_latency.c | 103 struct sync_latency_req *req = CONTAINER_OF(cli, struct sync_latency_req, cli); in sync_req_cb() local 105 req->res = res; in sync_req_cb() 106 k_sem_give(&req->sem); in sync_req_cb() 111 struct sync_latency_req req; in mram_no_latency_sync_request() local 118 k_sem_init(&req.sem, 0, 1); in mram_no_latency_sync_request() 119 sys_notify_init_callback(&req.cli.notify, sync_req_cb); in mram_no_latency_sync_request() 120 rv = onoff_request(&mram_latency_mgr, &req.cli); in mram_no_latency_sync_request() 125 rv = k_sem_take(&req.sem, K_MSEC(CONFIG_MRAM_LATENCY_SYNC_TIMEOUT)); in mram_no_latency_sync_request() 130 return req.res; in mram_no_latency_sync_request()
|
/Zephyr-latest/samples/subsys/pm/latency/src/ |
D | main.c | 29 struct pm_policy_latency_request req; in main() local 50 pm_policy_latency_request_add(&req, 30000); in main() 74 pm_policy_latency_request_update(&req, 10000); in main() 86 pm_policy_latency_request_update(&req, 30000); in main() 102 pm_policy_latency_request_remove(&req); in main()
|
/Zephyr-latest/subsys/mgmt/mcumgr/grp/img_mgmt/src/ |
D | zephyr_img_mgmt.c | 551 int img_mgmt_upload_inspect(const struct img_mgmt_upload_req *req, in img_mgmt_upload_inspect() argument 560 if (req->off == SIZE_MAX) { in img_mgmt_upload_inspect() 566 if (req->off == 0) { in img_mgmt_upload_inspect() 583 if (req->img_data.len < sizeof(struct image_header)) { in img_mgmt_upload_inspect() 589 if (req->size == SIZE_MAX) { in img_mgmt_upload_inspect() 595 action->size = req->size; in img_mgmt_upload_inspect() 597 hdr = (struct image_header *)req->img_data.value; in img_mgmt_upload_inspect() 603 if (req->data_sha.len > IMG_MGMT_DATA_SHA_LEN) { in img_mgmt_upload_inspect() 613 if ((req->data_sha.len > 0) && (g_img_mgmt_state.area_id != -1)) { in img_mgmt_upload_inspect() 614 if ((g_img_mgmt_state.data_sha_len == req->data_sha.len) && in img_mgmt_upload_inspect() [all …]
|
/Zephyr-latest/drivers/lora/ |
D | sx126x.c | 151 uint8_t req[] = { in SX126xReadRegisters() local 159 sx126x_spi_transceive(req, NULL, sizeof(req), NULL, buffer, size); in SX126xReadRegisters() 170 uint8_t req[] = { in SX126xWriteRegisters() local 179 sx126x_spi_transceive(req, NULL, sizeof(req), buffer, NULL, size); in SX126xWriteRegisters() 202 uint8_t req[] = { in SX126xWriteCommand() local 208 sx126x_spi_transceive(req, NULL, sizeof(req), buffer, NULL, size); in SX126xWriteCommand() 213 uint8_t req[] = { in SX126xReadBuffer() local 221 sx126x_spi_transceive(req, NULL, sizeof(req), NULL, buffer, size); in SX126xReadBuffer() 226 uint8_t req[] = { in SX126xWriteBuffer() local 233 sx126x_spi_transceive(req, NULL, sizeof(req), buffer, NULL, size); in SX126xWriteBuffer() [all …]
|
/Zephyr-latest/subsys/bluetooth/mesh/ |
D | dfu_cli.c | 42 enum req { enum 137 static int req_setup(struct bt_mesh_dfu_cli *cli, enum req type, uint16_t addr, in req_setup() 140 if (cli->req.type != REQ_NONE) { in req_setup() 144 cli->req.addr = addr; in req_setup() 145 cli->req.params = params; in req_setup() 146 cli->req.type = type; in req_setup() 155 err = k_sem_take(&cli->req.sem, timeout); in req_wait() 156 cli->req.type = REQ_NONE; in req_wait() 253 cli->req.img_cb = NULL; in blob_end() 343 cli->req.img_cnt = 0xff; in send_info_get() [all …]
|
/Zephyr-latest/tests/subsys/sip_svc/src/ |
D | main.c | 59 struct sip_svc_request req = {0}; in sip_svc_send_sync_request() local 72 req.header = SIP_SVC_PROTO_HEADER(SIP_SVC_PROTO_CMD_SYNC, 0); in sip_svc_send_sync_request() 73 req.a0 = SMC_FUNC_ID_GET_SVC_VERSION; in sip_svc_send_sync_request() 74 req.priv_data = (void *)&priv; in sip_svc_send_sync_request() 77 trans_id = sip_svc_send(ctrl, token, &req, get_sync_callback); in sip_svc_send_sync_request() 130 struct sip_svc_request req = {0}; in sip_svc_send_async_request() local 152 req.header = SIP_SVC_PROTO_HEADER(SIP_SVC_PROTO_CMD_ASYNC, 0); in sip_svc_send_async_request() 153 req.a0 = SMC_FUNC_ID_MAILBOX_SEND_COMMAND; in sip_svc_send_async_request() 154 req.a2 = (uint64_t)cmd_addr; in sip_svc_send_async_request() 155 req.a3 = (uint64_t)cmd_size; in sip_svc_send_async_request() [all …]
|
/Zephyr-latest/subsys/bluetooth/host/ |
D | att.c | 107 struct bt_att_req *req; member 528 static int chan_req_send(struct bt_att_chan *chan, struct bt_att_req *req) in chan_req_send() argument 533 if (bt_att_mtu(chan) < net_buf_frags_len(req->buf)) { in chan_req_send() 537 LOG_DBG("chan %p req %p len %zu", chan, req, net_buf_frags_len(req->buf)); in chan_req_send() 539 chan->req = req; in chan_req_send() 542 buf = req->buf; in chan_req_send() 543 req->buf = NULL; in chan_req_send() 552 req->buf = buf; in chan_req_send() 553 chan->req = NULL; in chan_req_send() 555 bt_gatt_req_set_mtu(req, bt_att_mtu(chan)); in chan_req_send() [all …]
|
/Zephyr-latest/tests/net/lib/http_header_fields/src/ |
D | main.c | 644 int test_invalid_header_content(int req, const char *str) in test_invalid_header_content() argument 651 http_parser_init(&parser, req ? HTTP_REQUEST : HTTP_RESPONSE); in test_invalid_header_content() 652 buf = req ? "GET / HTTP/1.1\r\n" : "HTTP/1.1 200 OK\r\n"; in test_invalid_header_content() 673 int test_invalid_header_field_content_error(int req) in test_invalid_header_field_content_error() argument 677 rc = test_invalid_header_content(req, "Foo: F\01ailure"); in test_invalid_header_field_content_error() 682 rc = test_invalid_header_content(req, "Foo: B\02ar"); in test_invalid_header_field_content_error() 689 int test_invalid_header_field(int req, const char *str) in test_invalid_header_field() argument 696 http_parser_init(&parser, req ? HTTP_REQUEST : HTTP_RESPONSE); in test_invalid_header_field() 697 buf = req ? "GET / HTTP/1.1\r\n" : "HTTP/1.1 200 OK\r\n"; in test_invalid_header_field() 717 int test_invalid_header_field_token_error(int req) in test_invalid_header_field_token_error() argument [all …]
|
/Zephyr-latest/drivers/clock_control/ |
D | clock_control_nrf2_common.c | 210 struct sync_req *req = CONTAINER_OF(cli, struct sync_req, cli); in sync_cb() local 212 req->res = res; in sync_cb() 213 k_sem_give(&req->sem); in sync_cb() 220 struct sync_req req = { in nrf_clock_control_request_sync() local 221 .sem = Z_SEM_INITIALIZER(req.sem, 0, 1) in nrf_clock_control_request_sync() 229 sys_notify_init_callback(&req.cli.notify, sync_cb); in nrf_clock_control_request_sync() 231 err = nrf_clock_control_request(dev, spec, &req.cli); in nrf_clock_control_request_sync() 236 err = k_sem_take(&req.sem, timeout); in nrf_clock_control_request_sync() 238 nrf_clock_control_cancel_or_release(dev, spec, &req.cli); in nrf_clock_control_request_sync() 242 return req.res; in nrf_clock_control_request_sync()
|