| /subsys/modbus/ |
| A D | modbus_server.c | 37 ctx->mbs_msg_ctr = 0; in modbus_reset_stats() 39 ctx->mbs_except_ctr = 0; in modbus_reset_stats() 41 ctx->mbs_noresp_ctr = 0; in modbus_reset_stats() 46 ctx->mbs_msg_ctr++; in update_msg_ctr() 51 ctx->mbs_crc_err_ctr++; in update_crcerr_ctr() 56 ctx->mbs_except_ctr++; in update_excep_ctr() 66 ctx->mbs_noresp_ctr++; in update_noresp_ctr() 87 update_excep_ctr(ctx); in mbs_exception_rsp() 942 rval = p->cb(iface, &ctx->rx_adu, &ctx->tx_adu, &p->excep_code, in mbs_try_user_fc() 985 ctx->tx_adu.trans_id = ctx->rx_adu.trans_id; in modbus_server_handler() [all …]
|
| A D | modbus_client.c | 302 if (ctx == NULL) { in modbus_read_coils() 327 if (ctx == NULL) { in modbus_read_dinputs() 352 if (ctx == NULL) { in modbus_read_holding_regs() 379 if (ctx == NULL) { in modbus_read_holding_regs_fp() 406 if (ctx == NULL) { in modbus_read_input_regs() 431 if (ctx == NULL) { in modbus_write_coil() 461 if (ctx == NULL) { in modbus_write_holding_reg() 486 if (ctx == NULL) { in modbus_request_diagnostic() 514 if (ctx == NULL) { in modbus_write_coils() 558 if (ctx == NULL) { in modbus_write_holding_regs() [all …]
|
| A D | modbus_core.c | 74 switch (ctx->mode) { in modbus_rx_handler() 79 ctx->rx_adu_err = modbus_serial_rx_adu(ctx); in modbus_rx_handler() 84 ctx->rx_adu_err = modbus_raw_rx_adu(ctx); in modbus_rx_handler() 142 modbus_tx_adu(ctx); in modbus_tx_wait_rx_adu() 144 if (k_sem_take(&ctx->client_wait_sem, K_USEC(ctx->rxwait_to)) != 0) { in modbus_tx_wait_rx_adu() 168 return ctx; in modbus_get_context() 213 return ctx; in modbus_init_iface() 242 if (ctx == NULL) { in modbus_init_server() 290 if (ctx != NULL) { in modbus_init_server() 362 ctx->unit_id = 0; in modbus_init_client() [all …]
|
| A D | modbus_serial.c | 162 ctx->rx_adu.length++; in modbus_ascii_rx_adu() 279 memcpy(ctx->rx_adu.data, data_ptr, ctx->rx_adu.length); in modbus_rtu_rx_adu() 305 memcpy(data_ptr, ctx->tx_adu.data, ctx->tx_adu.length); in rtu_tx_adu() 307 ctx->tx_adu.crc = crc16_ansi(&cfg->uart_buf[0], ctx->tx_adu.length + 2); in rtu_tx_adu() 410 if (ctx == NULL) { in uart_cb_handler() 418 cb_handler_rx(ctx); in uart_cb_handler() 422 cb_handler_tx(ctx); in uart_cb_handler() 434 if (ctx == NULL) { in rtu_tmr_handler() 537 switch (ctx->mode) { in modbus_serial_rx_adu() 561 switch (ctx->mode) { in modbus_serial_tx_adu() [all …]
|
| /subsys/bluetooth/controller/ll_sw/ |
| A D | ull_llcp_conn_upd.c | 168 conn, ctx->data.cu.interval_max, ctx->data.cu.latency, ctx->data.cu.timeout); in cu_update_conn_parameters() 171 ctx->data.cu.win_offset_us, ctx->data.cu.interval_max, in cu_update_conn_parameters() 172 ctx->data.cu.latency, ctx->data.cu.timeout, in cu_update_conn_parameters() 238 if (ctx->data.cu.offsets[0] <= ctx->data.cu.interval_max) { in cu_prepare_update_ind() 239 ctx->data.cu.win_offset_us = ctx->data.cu.offsets[0] * CONN_INT_UNIT_US; in cu_prepare_update_ind() 297 tx = ctx->node_ref.tx; in lp_cu_tx() 360 cu_ntf(conn, ctx); in lp_cu_ntf_complete() 445 ctx->node_ref.tx = llcp_tx_alloc(conn, ctx); in lp_cu_send_conn_update_ind() 475 switch (ctx->proc) { in lp_cu_st_idle() 922 ctx->node_ref.tx = llcp_tx_alloc(conn, ctx); in rp_cu_send_conn_update_ind() [all …]
|
| A D | ull_llcp_common.c | 167 switch (ctx->proc) { in lp_comm_tx() 404 switch (ctx->proc) { in lp_comm_ntf() 452 switch (ctx->proc) { in lp_comm_complete() 607 ctx->state = ctx->node_ref.tx_ack ? in lp_comm_tx_proxy() 616 switch (ctx->proc) { 764 switch (ctx->proc) { 870 switch (ctx->proc) { 904 switch (ctx->state) { 954 llcp_cis_stop_by_id(ctx->data.cis_term.cig_id, ctx->data.cis_term.cis_id, 1053 switch (ctx->proc) { [all …]
|
| A D | ull_llcp_cc.c | 67 ntf = ctx->node_ref.rx; in cc_ntf_established() 69 ctx->node_ref.rx = NULL; in cc_ntf_established() 203 tx = ctx->node_ref.tx; in llcp_rp_cc_tx_reject() 205 ctx->node_ref.tx = NULL; in llcp_rp_cc_tx_reject() 222 ntf = ctx->node_ref.rx; in rp_cc_ntf_create() 265 ctx->node_ref.tx = llcp_tx_alloc(conn, ctx); in rp_cc_send_reject_ind() 420 ctx->data.cis_create.error = rp_cc_validate_req(conn, ctx, pdu); in rp_cc_state_wait_rx_cis_req() 628 switch (ctx->state) { in rp_cc_execute_fsm() 917 switch (ctx->proc) { in lp_cc_st_idle() 1144 switch (ctx->state) { in lp_cc_execute_fsm() [all …]
|
| A D | ull_llcp_past.c | 125 struct proc_ctx *ctx; in rp_past_resolve_cb() local 131 ctx = llcp_rr_peek(conn); in rp_past_resolve_cb() 132 if (!ctx) { in rp_past_resolve_cb() 213 rp_past_complete(conn, ctx); in rp_past_st_wait_rx() 261 rp_past_complete(conn, ctx); in rp_past_st_wait_rx() 298 rp_past_complete(conn, ctx); in rp_past_st_wait_next_evt() 309 switch (ctx->state) { in rp_past_execute_fsm() 415 ctx->node_ref.tx_ack = tx; in lp_past_tx() 458 lp_past_tx(conn, ctx); in lp_past_st_wait_offset_calc() 500 lp_past_tx(conn, ctx); in lp_past_state_wait_evt_done() [all …]
|
| A D | ull_llcp_phy.c | 147 ctx->data.pu.tx = pu_select_phy(ctx->data.pu.tx); in pu_prep_update_ind() 148 ctx->data.pu.rx = pu_select_phy(ctx->data.pu.rx); in pu_prep_update_ind() 151 ctx->data.pu.c_to_p_phy = ctx->data.pu.tx; in pu_prep_update_ind() 156 ctx->data.pu.p_to_c_phy = ctx->data.pu.rx; in pu_prep_update_ind() 536 ctx->node_ref.tx = llcp_tx_alloc(conn, ctx); in lp_pu_send_phy_req() 551 ctx->node_ref.tx = llcp_tx_alloc(conn, ctx); in lp_pu_send_phy_update_ind() 697 ctx->data.pu.ntf_pu = ctx->data.pu.host_initiated; in lp_pu_st_wait_tx_ack_phy_update_ind() 741 ctx->data.pu.ntf_pu = ctx->data.pu.host_initiated; in lp_pu_st_wait_rx_phy_update_ind() 748 ctx->data.pu.error = ctx->reject_ext_ind.error_code; in lp_pu_st_wait_rx_phy_update_ind() 1019 ctx->node_ref.tx = llcp_tx_alloc(conn, ctx); in rp_pu_send_phy_update_ind() [all …]
|
| A D | ull_llcp_enc.c | 229 ntf = ctx->node_ref.rx; in lp_enc_ntf() 230 ctx->node_ref.rx = NULL; in lp_enc_ntf() 256 lp_enc_ntf(conn, ctx); in lp_enc_complete() 414 ctx->rx_greedy = 1U; in lp_enc_st_wait_rx_enc_rsp() 463 ctx->rx_greedy = 0U; in lp_enc_st_wait_rx_start_enc_req() 501 ctx->rx_greedy = 0U; in lp_enc_st_wait_rx_start_enc_rsp() 604 switch (ctx->state) { in lp_enc_execute_fsm() 756 ntf = ctx->node_ref.rx; in rp_enc_ntf_ltk() 781 ntf = ctx->node_ref.rx; in rp_enc_ntf() 807 rp_enc_ntf(conn, ctx); in rp_enc_complete() [all …]
|
| A D | ull_llcp.c | 115 mem_release(ctx, &ctx->owner->free); in llcp_proc_ctx_release() 1302 if (ctx && ctx->proc == PROC_CIS_CREATE) { 1317 if (ctx && ctx->proc == PROC_CIS_CREATE) { 1329 if (ctx && ctx->proc == PROC_CIS_CREATE) { 1341 if (ctx && ctx->proc == PROC_CIS_CREATE) { 1362 if (ctx && ctx->proc == PROC_CIS_CREATE) { 1376 if (ctx && ctx->proc == PROC_CIS_CREATE) { 1869 if (ctx && ctx->node_ref.tx_ack == tx) { 1875 if (ctx && ctx->node_ref.tx_ack == tx) { 1915 if (ctx && pdu_is_expected(pdu, ctx)) { [all …]
|
| A D | ull_llcp_chmu.c | 91 tx = llcp_tx_alloc(conn, ctx); in lp_chmu_tx() 99 ctx->tx_opcode = pdu->llctrl.opcode; in lp_chmu_tx() 109 ctx->state = LP_CHMU_STATE_IDLE; in lp_chmu_complete() 116 !llcp_tx_alloc_peek(conn, ctx)) { in lp_chmu_send_channel_map_update_ind() 124 lp_chmu_tx(conn, ctx); in lp_chmu_send_channel_map_update_ind() 170 switch (ctx->state) { in lp_chmu_execute_fsm() 197 ctx->state = LP_CHMU_STATE_IDLE; in llcp_lp_chmu_rx() 221 ctx->state = RP_CHMU_STATE_IDLE; in rp_chmu_complete() 249 ctx->state = RP_CHMU_STATE_IDLE; in rp_chmu_st_wait_rx_channel_map_update_ind() 284 switch (ctx->state) { in rp_chmu_execute_fsm() [all …]
|
| A D | ull_llcp_local.c | 78 if (ctx->done) { in llcp_lr_check_done() 152 struct proc_ctx *ctx; in lr_dequeue() local 160 return ctx; in lr_dequeue() 168 struct proc_ctx *ctx; in llcp_lr_peek() local 176 return ctx; in llcp_lr_peek() 197 return ctx; in llcp_lr_peek_proc() 236 while (ctx) { in llcp_lr_flush_procedures() 262 switch (ctx->proc) { in llcp_lr_rx() 343 switch (ctx->proc) { in llcp_lr_tx_ack() 496 ctx->done = 1U; in lr_act_complete() [all …]
|
| /subsys/storage/stream/ |
| A D | stream_flash.c | 100 if (ctx->bytes_written + size > ctx->available) { in stream_flash_erase_to_append() 113 rc = flash_get_page_info_by_offs(ctx->fdev, ctx->offset + ctx->erased_up_to, &page); in stream_flash_erase_to_append() 140 if (off < ctx->offset || (off - ctx->offset) >= ctx->available) { in stream_flash_erase_page() 146 if ((off - ctx->offset) < ctx->erased_up_to) { in stream_flash_erase_page() 236 ctx->buf[i] = ~ctx->buf[i]; in flash_sync() 239 rc = flash_read(ctx->fdev, write_addr, ctx->buf, in flash_sync() 246 rc = ctx->callback(ctx->buf, ctx->buf_bytes, write_addr); in flash_sync() 255 ctx->bytes_written += ctx->buf_bytes; in flash_sync() 272 if (ctx->bytes_written + ctx->buf_bytes + len > ctx->available) { in stream_flash_buffered_write() 281 ctx->buf_bytes = ctx->buf_len; in stream_flash_buffered_write() [all …]
|
| /subsys/usb/device_next/class/ |
| A D | usbd_msc.c | 240 if (ctx->cbw.bCBWLUN >= ctx->registered_luns) { in is_cbw_meaningful() 255 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_process_read() 281 while (ctx->scsi_bytes - ctx->scsi_offset > 0) { in msc_process_read() 282 len = MIN(ctx->scsi_bytes - ctx->scsi_offset, in msc_process_read() 295 if (ctx->scsi_bytes == ctx->scsi_offset) { in msc_process_read() 314 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_process_cbw() 398 struct scsi_ctx *lun = &ctx->luns[ctx->cbw.bCBWLUN]; in msc_process_write() 405 memcpy(&ctx->scsi_buf[ctx->scsi_bytes], buf, tmp); in msc_process_write() 439 memmove(ctx->scsi_buf, &ctx->scsi_buf[tmp], ctx->scsi_bytes - tmp); in msc_process_write() 477 ctx->csw.dCSWTag = ctx->cbw.dCBWTag; in msc_handle_bulk_out() [all …]
|
| A D | usbd_msc_scsi.c | 362 ctx->asc = asc; in illegal_request() 371 ctx->asc = asc; in not_ready() 380 ctx->asc = asc; in medium_error() 394 scsi_reset(ctx); in scsi_init() 740 ctx->lba = lba; in SCSI_CMD_HANDLER() 741 ctx->remaining_data = ctx->sector_size * transfer_length; in SCSI_CMD_HANDLER() 752 remaining_sectors = ctx->remaining_data / ctx->sector_size; in store_write_10() 795 ctx->remaining_data = ctx->sector_size * transfer_length; in SCSI_CMD_HANDLER() 907 if ((ctx->remaining_data > 0) && ctx->read_cb) { in scsi_read_data() 908 retrieved = ctx->read_cb(ctx, buf); in scsi_read_data() [all …]
|
| /subsys/net/lib/websocket/ |
| A D | websocket.c | 124 return ctx; in websocket_get() 149 return ctx; in websocket_find() 186 if (ctx->http_cb && ctx->http_cb->on_header_field) { in on_header_field() 224 if (ctx->http_cb && ctx->http_cb->on_header_value) { in on_header_value() 357 if (!(ctx->all_received && ctx->sec_accept_ok)) { in websocket_connect() 359 ctx->all_received, ctx->sec_accept_ok); in websocket_connect() 817 ctx->parser_remaining = ctx->message_len; in websocket_parse() 838 ctx->parser_remaining = ctx->message_len; in websocket_parse() 852 ctx->parser_remaining = ctx->message_len; in websocket_parse() 867 ctx->masked ? ctx->masking_value : 0, ctx->message_type, in websocket_parse() [all …]
|
| /subsys/net/l2/ieee802154/ |
| A D | ieee802154_mgmt.c | 44 if (!ctx->scan_ctx) { in ieee802154_handle_beacon() 53 ctx->scan_ctx->lqi = lqi; in ieee802154_handle_beacon() 88 ctx->scan_ctx = NULL; in ieee802154_cancel_scan() 119 if (ctx->scan_ctx) { in ieee802154_scan() 143 ctx->scan_ctx = scan; in ieee802154_scan() 196 if (!ctx->scan_ctx) { in ieee802154_scan() 215 if (ctx->scan_ctx) { in ieee802154_scan() 216 ctx->scan_ctx = NULL; in ieee802154_scan() 238 net_if_set_link_addr(iface, ctx->linkaddr.addr, ctx->linkaddr.len, ctx->linkaddr.type); in update_net_if_link_addr() 293 memset(ctx->coord_ext_addr, 0, sizeof(ctx->coord_ext_addr)); in remove_association() [all …]
|
| /subsys/net/l2/ppp/ |
| A D | link.c | 27 proto->lower_up(ctx); in lcp_up() 39 proto->open(ctx); in do_network() 56 ctx->network_protos_open++; in do_network() 57 proto->open(ctx); in do_network() 82 ppp_link_authenticated(ctx); in do_auth() 89 proto->open(ctx); in do_auth() 103 do_auth(ctx); in ppp_link_established() 105 lcp_up(ctx); in ppp_link_established() 112 do_network(ctx); in ppp_link_authenticated() 119 if (ctx->phase == PPP_DEAD) { in ppp_link_terminated() [all …]
|
| A D | ppp_l2.c | 225 ppp_lcp->lower_up(ctx); in ppp_open_async() 226 ppp_lcp->open(ctx); in ppp_open_async() 331 ctx->is_enabled = state; in ppp_enable() 384 struct ppp_context *ctx; in net_ppp_ping() local 395 ctx->shell.echo_reply.user_data = ctx; in net_ppp_ping() 396 ctx->shell.echo_reply.user_data_len = sizeof(ctx); in net_ppp_ping() 437 return ctx; in net_ppp_context_get() 495 ppp_open_async(ctx); in net_ppp_mgmt_evt_handler() 515 memset(ctx, 0, sizeof(*ctx)); in net_ppp_init() 518 ctx->iface = iface; in net_ppp_init() [all …]
|
| A D | ipcp.c | 42 return ipcp_add_address(ctx, pkt, &ctx->ipcp.my_options.address); in ipcp_add_ip_address() 94 return ipcp_add_address(ctx, pkt, &ctx->ipcp.my_options.dns1_address); in ipcp_add_dns1() 99 return ipcp_add_address(ctx, pkt, &ctx->ipcp.my_options.dns2_address); in ipcp_add_dns2() 270 (void)ipcp_add_address(ctx, ret_pkt, &ctx->ipcp.peer_options.dns1_address); in ipcp_server_nak_dns1_address() 283 (void)ipcp_add_address(ctx, ret_pkt, &ctx->ipcp.peer_options.dns2_address); in ipcp_server_nak_dns2_address() 439 if (ctx->is_ipcp_up) { in ipcp_up() 458 ctx->is_ipcp_up = true; in ipcp_up() 472 ctx->iface, &ctx->ipcp.my_options.address); in ipcp_down() 512 &ctx->ipcp.fsm); in ipcp_init() 514 memset(&ctx->ipcp.fsm, 0, sizeof(ctx->ipcp.fsm)); in ipcp_init() [all …]
|
| A D | network.c | 21 if (ctx->network_protos_up == 0) { in ppp_network_up() 25 ctx->network_protos_up++; in ppp_network_up() 33 ctx->network_protos_up--; in ppp_network_down() 35 if (ctx->network_protos_up <= 0) { in ppp_network_down() 36 ctx->network_protos_up = 0; in ppp_network_down() 46 ctx->network_protos_up--; in ppp_network_done() 60 proto->lower_down(ctx); in ppp_network_all_down() 64 ctx->network_protos_open--; in ppp_network_all_down() 65 proto->close(ctx, "LCP down"); in ppp_network_all_down() 71 ctx->network_protos_open); in ppp_network_all_down() [all …]
|
| /subsys/net/l2/virtual/ |
| A D | virtual.c | 212 ctx = net_if_l2_data(ctx->iface); in virtual_enable() 284 if (ctx->iface) { in net_virtual_interface_attach() 295 &ctx->node); in net_virtual_interface_attach() 312 &ctx->node); in net_virtual_interface_attach() 328 random_linkaddr(ctx->lladdr.addr, sizeof(ctx->lladdr.addr)); in net_virtual_interface_attach() 330 ctx->lladdr.len = sizeof(ctx->lladdr.addr); in net_virtual_interface_attach() 334 ctx->lladdr.len, ctx->lladdr.type); in net_virtual_interface_attach() 397 return ctx->iface; in net_virtual_get_iface() 414 strncpy(buf, ctx->name, MIN(len, sizeof(ctx->name))); in net_virtual_get_name() 434 strncpy(ctx->name, name, ARRAY_SIZE(ctx->name) - 1); in net_virtual_set_name() [all …]
|
| /subsys/shell/ |
| A D | shell_ops.c | 58 return (((sh->ctx->cmd_buff_pos * sh->ctx->cfg.flags.echo) + in z_shell_cursor_in_empty_line() 197 sh->ctx->cmd_buff[sh->ctx->cmd_buff_len] = '\0'; in z_shell_op_word_remove() 227 if (sh->ctx->cmd_buff_pos < sh->ctx->cmd_buff_len) { in z_shell_op_right_arrow() 274 &sh->ctx->cmd_buff[sh->ctx->cmd_buff_pos]); in reprint_from_cursor() 277 sh->ctx->cmd_buff_pos = sh->ctx->cmd_buff_len; in reprint_from_cursor() 300 sh->ctx->cmd_buff[sh->ctx->cmd_buff_len] = '\0'; in data_insert() 312 sh->ctx->cmd_buff[sh->ctx->cmd_buff_pos++] = data; in char_replace() 330 (sh->ctx->cmd_buff_len != sh->ctx->cmd_buff_pos)) { in z_shell_op_char_insert() 351 char *str = &sh->ctx->cmd_buff[sh->ctx->cmd_buff_pos]; in z_shell_op_char_delete() 364 sh->ctx->cmd_buff_len = sh->ctx->cmd_buff_pos; in z_shell_op_delete_from_cursor() [all …]
|
| /subsys/net/lib/ocpp/ |
| A D | core.c | 71 rmsg.ctx = ctx; in ocpp_boot_notification() 115 rmsg.ctx = ctx; in ocpp_get_configuration() 174 rmsg.ctx = ctx; in ocpp_change_configuration() 200 ctx = sh->ctx; in ocpp_authorize() 217 rmsg.ctx = ctx; in ocpp_authorize() 248 rmsg.ctx = ctx; in ocpp_heartbeat() 281 ctx = sh->ctx; in ocpp_start_transaction() 299 rmsg.ctx = ctx; in ocpp_start_transaction() 347 ctx = sh->ctx; in ocpp_stop_transaction() 373 rmsg.ctx = ctx; in ocpp_stop_transaction() [all …]
|