Home
last modified time | relevance | path

Searched refs:state (Results 1 – 25 of 1195) sorted by relevance

12345678910>>...48

/Zephyr-Core-3.7.0/lib/posix/options/getopt/
Dgetopt.c50 struct getopt_state *state; in getopt_init() local
52 state = getopt_state_get(); in getopt_init()
54 state->opterr = 1; in getopt_init()
55 state->optind = 1; in getopt_init()
56 state->optopt = 0; in getopt_init()
57 state->optreset = 0; in getopt_init()
58 state->optarg = NULL; in getopt_init()
60 state->place = ""; /* EMSG */ in getopt_init()
63 state->nonopt_start = -1; /* first non option argument (for permute) */ in getopt_init()
64 state->nonopt_end = -1; /* first option after non options (for permute) */ in getopt_init()
[all …]
Dgetopt_long.c61 #define PRINT_ERROR ((state->opterr) && (*options != ':'))
169 parse_long_options(struct getopt_state *state, char * const *nargv, in parse_long_options() argument
180 current_argv = state->place; in parse_long_options()
202 state->optind++; in parse_long_options()
252 state->optopt = 0; in parse_long_options()
270 state->optopt = long_options[match].val; in parse_long_options()
272 state->optopt = 0; in parse_long_options()
283 state->optarg = has_equal; in parse_long_options()
288 state->optarg = nargv[state->optind++]; in parse_long_options()
292 && (state->optarg == NULL)) { in parse_long_options()
[all …]
/Zephyr-Core-3.7.0/subsys/net/l2/ethernet/gptp/
Dgptp_md.c120 struct gptp_sync_rcv_state *state; in gptp_set_md_sync_receive() local
128 state = &GPTP_PORT_STATE(port)->sync_rcv; in gptp_set_md_sync_receive()
129 if (!state->rcvd_sync_ptr || !state->rcvd_follow_up_ptr) { in gptp_set_md_sync_receive()
135 sync_hdr = GPTP_HDR(state->rcvd_sync_ptr); in gptp_set_md_sync_receive()
136 fup_hdr = GPTP_HDR(state->rcvd_follow_up_ptr); in gptp_set_md_sync_receive()
137 fup = GPTP_FOLLOW_UP(state->rcvd_follow_up_ptr); in gptp_set_md_sync_receive()
138 sync_ts = &state->rcvd_sync_ptr->timestamp; in gptp_set_md_sync_receive()
183 struct gptp_pdelay_req_state *state; in gptp_md_pdelay_reset() local
188 state = &GPTP_PORT_STATE(port)->pdelay_req; in gptp_md_pdelay_reset()
191 if (state->lost_responses < port_ds->allowed_lost_responses) { in gptp_md_pdelay_reset()
[all …]
Dgptp_mi.c18 static const char * const state2str(enum gptp_port_state state) in state2str() argument
20 switch (state) { in state2str()
44 static const char * const pa_info_state2str(enum gptp_pa_info_states state) in pa_info_state2str() argument
46 switch (state) { in pa_info_state2str()
72 void gptp_change_port_state_debug(int port, enum gptp_port_state state, in gptp_change_port_state_debug() argument
76 void gptp_change_port_state(int port, enum gptp_port_state state) in gptp_change_port_state_debug()
81 if (global_ds->selected_role[port] == state) { in gptp_change_port_state_debug()
88 state2str(state), caller, line); in gptp_change_port_state_debug()
91 global_ds->selected_role[port] = state; in gptp_change_port_state_debug()
98 enum gptp_pa_info_states state, in gptp_change_pa_info_state_debug() argument
[all …]
/Zephyr-Core-3.7.0/subsys/net/lib/lwm2m/
Dlwm2m_senml_cbor_decode.c19 static bool decode_repeated_record_bn(zcbor_state_t *state, struct record_bn *result);
20 static bool decode_repeated_record_bt(zcbor_state_t *state, struct record_bt *result);
21 static bool decode_repeated_record_n(zcbor_state_t *state, struct record_n *result);
22 static bool decode_repeated_record_t(zcbor_state_t *state, struct record_t *result);
23 static bool decode_repeated_record_union(zcbor_state_t *state, struct record_union_r *result);
24 static bool decode_value(zcbor_state_t *state, struct value_r *result);
25 static bool decode_key_value_pair(zcbor_state_t *state, struct key_value_pair *result);
26 static bool decode_repeated_record_key_value_pair_m(zcbor_state_t *state,
28 static bool decode_record(zcbor_state_t *state, struct record *result);
29 static bool decode_lwm2m_senml(zcbor_state_t *state, struct lwm2m_senml *result);
[all …]
Dlwm2m_senml_cbor_encode.c19 static bool encode_repeated_record_bn(zcbor_state_t *state, const struct record_bn *input);
20 static bool encode_repeated_record_bt(zcbor_state_t *state, const struct record_bt *input);
21 static bool encode_repeated_record_n(zcbor_state_t *state, const struct record_n *input);
22 static bool encode_repeated_record_t(zcbor_state_t *state, const struct record_t *input);
23 static bool encode_repeated_record_union(zcbor_state_t *state, const struct record_union_r *input);
24 static bool encode_value(zcbor_state_t *state, const struct value_r *input);
25 static bool encode_key_value_pair(zcbor_state_t *state, const struct key_value_pair *input);
26 static bool encode_repeated_record_key_value_pair_m(zcbor_state_t *state,
28 static bool encode_record(zcbor_state_t *state, const struct record *input);
29 static bool encode_lwm2m_senml(zcbor_state_t *state, const struct lwm2m_senml *input);
[all …]
Dlwm2m_senml_cbor.patch22 static bool decode_repeated_record_bn(zcbor_state_t *state, struct record_bn *result);
23 static bool decode_repeated_record_bt(zcbor_state_t *state, struct record_bt *result);
24 static bool decode_repeated_record_n(zcbor_state_t *state, struct record_n *result);
26 …(*result).record_n_present), (zcbor_decoder_t *)decode_repeated_record_n, state, (&(*result).recor…
27 …(*result).record_t_present), (zcbor_decoder_t *)decode_repeated_record_t, state, (&(*result).recor…
28 …).record_union_present), (zcbor_decoder_t *)decode_repeated_record_union, state, (&(*result).recor…
29state, (&(*result).record_key_value_pair_m), sizeof(struct record_key_value_pair_m))) || (zcbor_li…
30state, (&(*result).record_key_value_pair_m), sizeof(struct record_key_value_pair_m))) || (zcbor_li…
33 zcbor_trace_file(state);
38state) && ((zcbor_multi_decode(1, 99, &(*result).lwm2m_senml_record_m_count, (zcbor_decoder_t *)de…
[all …]
/Zephyr-Core-3.7.0/subsys/random/
Drandom_xoshiro128.c37 static uint32_t state[4]; variable
60 rc = entropy_get_entropy(entropy_driver, (uint8_t *)&state, sizeof(state)); in xoshiro128_init_state()
69 state[0] = k_cycle_get_32(); in xoshiro128_init_state()
70 state[1] = k_cycle_get_32() ^ 0x9b64c2b0; in xoshiro128_init_state()
71 state[2] = k_cycle_get_32() ^ 0x86d3d2d4; in xoshiro128_init_state()
72 state[3] = k_cycle_get_32() ^ 0xa00ae278; in xoshiro128_init_state()
78 const uint32_t result = rotl(state[0] + state[3], 7) + state[0]; in xoshiro128_next()
80 const uint32_t t = state[1] << 9; in xoshiro128_next()
82 state[2] ^= state[0]; in xoshiro128_next()
83 state[3] ^= state[1]; in xoshiro128_next()
[all …]
/Zephyr-Core-3.7.0/tests/subsys/pm/device_power_domains/src/
Dmain.c38 enum pm_device_state state; in ZTEST() local
58 pm_device_state_get(dev, &state); in ZTEST()
59 zassert_equal(PM_DEVICE_STATE_OFF, state, ""); in ZTEST()
76 pm_device_state_get(dev, &state); in ZTEST()
77 zassert_equal(PM_DEVICE_STATE_SUSPENDED, state, ""); in ZTEST()
79 pm_device_state_get(dev, &state); in ZTEST()
80 zassert_equal(PM_DEVICE_STATE_OFF, state, ""); in ZTEST()
89 pm_device_state_get(dev, &state); in ZTEST()
90 zassert_equal(PM_DEVICE_STATE_OFF, state, ""); in ZTEST()
98 pm_device_state_get(dev, &state); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/modules/hal_nordic/nrf_802154/radio/platform/
Dnrf_802154_random_zephyr.c11 static uint32_t state; variable
15 state ^= (state<<13); in next()
16 state ^= (state>>17); in next()
17 return state ^= (state<<5); in next()
28 err = entropy_get_entropy(dev, (uint8_t *)&state, sizeof(state)); in nrf_802154_random_init()
30 } while (state == 0); in nrf_802154_random_init()
/Zephyr-Core-3.7.0/tests/bsim/bluetooth/audio/src/
Dbap_scan_delegator_test.c136 struct sync_state *state = CONTAINER_OF(dwork, struct sync_state, pa_timer); in pa_timer_handler() local
138 state->pa_syncing = false; in pa_timer_handler()
140 if (state->recv_state != NULL) { in pa_timer_handler()
143 if (state->recv_state->pa_sync_state == BT_BAP_PA_STATE_INFO_REQ) { in pa_timer_handler()
149 bt_bap_scan_delegator_set_pa_state(state->recv_state->src_id, in pa_timer_handler()
157 struct sync_state *state, in pa_sync_past() argument
171 state->pa_syncing = true; in pa_sync_past()
172 k_work_init_delayable(&state->pa_timer, pa_timer_handler); in pa_sync_past()
173 (void)k_work_reschedule(&state->pa_timer, in pa_sync_past()
180 static int pa_sync_no_past(struct sync_state *state, in pa_sync_no_past() argument
[all …]
/Zephyr-Core-3.7.0/drivers/counter/
Dcounter_cmos.c36 struct state { struct
90 void read_state(struct state *state) in read_state() argument
95 p = (uint8_t *) state; in read_state()
96 for (i = 0; i < sizeof(*state); ++i) { in read_state()
135 struct state state, state2; in get_value() local
136 uint64_t *pun = (uint64_t *) &state; in get_value()
149 state = state2; in get_value()
159 if ((state.status_b & STATUS_B_24HR) != 0U) { in get_value()
162 pm = ((state.hour & HOUR_PM) == HOUR_PM); in get_value()
163 state.hour &= ~HOUR_PM; in get_value()
[all …]
/Zephyr-Core-3.7.0/tests/subsys/pm/device_runtime_api/src/
Dmain.c38 enum pm_device_state state; in test_api_setup() local
52 (void)pm_device_state_get(test_dev, &state); in test_api_setup()
53 zassert_equal(state, PM_DEVICE_STATE_SUSPENDED); in test_api_setup()
63 enum pm_device_state state; in test_api_teardown() local
76 (void)pm_device_state_get(test_dev, &state); in test_api_teardown()
77 zassert_equal(state, PM_DEVICE_STATE_ACTIVE); in test_api_teardown()
92 enum pm_device_state state; in ZTEST() local
95 (void)pm_device_state_get(test_dev, &state); in ZTEST()
96 zassert_equal(state, PM_DEVICE_STATE_SUSPENDED); in ZTEST()
105 (void)pm_device_state_get(test_dev, &state); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/lib/utils/
Donoff.c116 uint32_t state) in set_state() argument
118 mgr->flags = (state & ONOFF_STATE_MASK) in set_state()
156 uint32_t state, in notify_monitors() argument
164 mon->callback(mgr, mon, state, res); in notify_monitors()
170 uint32_t state, in notify_one() argument
177 cb(mgr, cli, state, res); in notify_one()
183 uint32_t state, in notify_all() argument
193 notify_one(mgr, cli, state, res); in notify_all()
214 uint32_t state = mgr->flags & ONOFF_STATE_MASK; in process_recheck() local
216 if ((state == ONOFF_STATE_OFF) in process_recheck()
[all …]
/Zephyr-Core-3.7.0/subsys/bluetooth/audio/
Dbap_scan_delegator.c74 struct bt_bap_scan_delegator_recv_state state; member
125 const struct bt_bap_scan_delegator_recv_state *state = &recv_state->state; in bt_debug_dump_recv_state() local
126 const bool is_bad_code = state->encrypt_state == BT_BAP_BIG_ENC_STATE_BAD_CODE; in bt_debug_dump_recv_state()
130 recv_state->index, state->src_id, bt_addr_le_str(&state->addr), in bt_debug_dump_recv_state()
131 state->adv_sid, state->broadcast_id, state->pa_sync_state, in bt_debug_dump_recv_state()
132 state->encrypt_state, is_bad_code ? ", bad code" : "", in bt_debug_dump_recv_state()
133 is_bad_code ? bt_hex(state->bad_code, sizeof(state->bad_code)) : "", in bt_debug_dump_recv_state()
134 state->num_subgroups); in bt_debug_dump_recv_state()
136 for (uint8_t i = 0U; i < state->num_subgroups; i++) { in bt_debug_dump_recv_state()
137 const struct bt_bap_bass_subgroup *subgroup = &state->subgroups[i]; in bt_debug_dump_recv_state()
[all …]
Dvcp_vol_rend.c60 struct vcs_state state; member
86 vol_rend.state.volume, vol_rend.state.mute, in read_vol_state()
87 vol_rend.state.change_counter); in read_vol_state()
90 &vol_rend.state, sizeof(vol_rend.state)); in read_vol_state()
141 notify(inst, NOTIFY_STATE, BT_UUID_VCS_STATE, &inst->state, sizeof(inst->state)); in notify_work_handler()
190 if (cp_val->cp.counter != vol_rend.state.change_counter) { in write_vcs_control()
197 if (vol_rend.state.volume > 0) { in write_vcs_control()
198 vol_rend.state.volume = VOLUME_DOWN(vol_rend.state.volume); in write_vcs_control()
205 if (vol_rend.state.volume != UINT8_MAX) { in write_vcs_control()
206 vol_rend.state.volume = VOLUME_UP(vol_rend.state.volume); in write_vcs_control()
[all …]
/Zephyr-Core-3.7.0/subsys/net/lib/shell/
Dgptp.c43 static const char *pdelay_req2str(enum gptp_pdelay_req_states state) in pdelay_req2str() argument
45 switch (state) { in pdelay_req2str()
65 static const char *pdelay_resp2str(enum gptp_pdelay_resp_states state) in pdelay_resp2str() argument
67 switch (state) { in pdelay_resp2str()
81 static const char *sync_rcv2str(enum gptp_sync_rcv_states state) in sync_rcv2str() argument
83 switch (state) { in sync_rcv2str()
95 static const char *sync_send2str(enum gptp_sync_send_states state) in sync_send2str() argument
97 switch (state) { in sync_send2str()
109 static const char *pss_rcv2str(enum gptp_pss_rcv_states state) in pss_rcv2str() argument
111 switch (state) { in pss_rcv2str()
[all …]
/Zephyr-Core-3.7.0/tests/subsys/pm/power_domain/src/
Dmain.c121 enum pm_device_state state; in ZTEST() local
142 pm_device_state_get(domain, &state); in ZTEST()
143 zassert_equal(state, PM_DEVICE_STATE_SUSPENDED); in ZTEST()
145 pm_device_state_get(deva, &state); in ZTEST()
146 zassert_equal(state, PM_DEVICE_STATE_SUSPENDED); in ZTEST()
148 pm_device_state_get(devb, &state); in ZTEST()
149 zassert_equal(state, PM_DEVICE_STATE_SUSPENDED); in ZTEST()
151 pm_device_state_get(devc, &state); in ZTEST()
152 zassert_equal(state, PM_DEVICE_STATE_SUSPENDED); in ZTEST()
158 pm_device_state_get(deva, &state); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/tests/subsys/pm/power_mgmt_multicore/src/
Dmain.c32 void pm_state_set(enum pm_state state, uint8_t substate_id) in pm_state_set() argument
38 zassert_equal(PM_STATE_RUNTIME_IDLE, state); in pm_state_set()
41 zassert_equal(PM_STATE_SUSPEND_TO_IDLE, state); in pm_state_set()
45 zassert_equal(PM_STATE_STANDBY, state); in pm_state_set()
53 void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) in pm_state_exit_post_ops() argument
55 ARG_UNUSED(state); in pm_state_exit_post_ops()
70 info.state = PM_STATE_ACTIVE; in pm_policy_next_state()
72 info.state = PM_STATE_RUNTIME_IDLE; in pm_policy_next_state()
74 info.state = PM_STATE_SUSPEND_TO_IDLE; in pm_policy_next_state()
77 info.state = PM_STATE_SUSPEND_TO_IDLE; in pm_policy_next_state()
[all …]
/Zephyr-Core-3.7.0/soc/silabs/common/
Dsoc_power.c23 void pm_state_set(enum pm_state state, uint8_t substate_id) in pm_state_set() argument
27 LOG_DBG("SoC entering power state %d", state); in pm_state_set()
41 switch (state) { in pm_state_set()
55 LOG_DBG("Unsupported power state %u", state); in pm_state_set()
59 LOG_DBG("SoC leaving power state %d", state); in pm_state_set()
66 void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) in pm_state_exit_post_ops() argument
68 ARG_UNUSED(state); in pm_state_exit_post_ops()
/Zephyr-Core-3.7.0/subsys/bluetooth/audio/shell/
Dbap_scan_delegator.c170 struct sync_state *state = CONTAINER_OF(dwork, struct sync_state, pa_timer); in pa_timer_handler() local
172 state->pa_syncing = false; in pa_timer_handler()
174 if (state->recv_state != NULL) { in pa_timer_handler()
177 if (state->recv_state->pa_sync_state == BT_BAP_PA_STATE_INFO_REQ) { in pa_timer_handler()
183 bt_bap_scan_delegator_set_pa_state(state->recv_state->src_id, in pa_timer_handler()
186 shell_info(ctx_shell, "PA timeout for %p", state->recv_state); in pa_timer_handler()
192 struct sync_state *state, in pa_sync_past() argument
206 state->pa_syncing = true; in pa_sync_past()
207 k_work_init_delayable(&state->pa_timer, pa_timer_handler); in pa_sync_past()
208 (void)k_work_reschedule(&state->pa_timer, in pa_sync_past()
[all …]
/Zephyr-Core-3.7.0/subsys/mgmt/ec_host_cmd/backends/
Dec_host_cmd_backend_uart.c76 enum uart_host_command_state state; member
121 switch (hc_uart->state) { in rx_timeout()
140 LOG_ERR("Request timeout mishandled, state: %d", hc_uart->state); in rx_timeout()
146 hc_uart->state = UART_HOST_CMD_READY_TO_RX; in rx_timeout()
156 if (hc_uart->state == UART_HOST_CMD_READY_TO_RX) { in uart_callback()
158 hc_uart->state = UART_HOST_CMD_RECEIVING; in uart_callback()
160 } else if (hc_uart->state == UART_HOST_CMD_PROCESSING || in uart_callback()
161 hc_uart->state == UART_HOST_CMD_SENDING) { in uart_callback()
164 } else if (hc_uart->state == UART_HOST_CMD_RX_BAD || in uart_callback()
165 hc_uart->state == UART_HOST_CMD_RX_OVERRUN) { in uart_callback()
[all …]
/Zephyr-Core-3.7.0/soc/espressif/esp32c3/
Dpower.c15 void pm_state_set(enum pm_state state, uint8_t substate_id) in pm_state_set() argument
19 switch (state) { in pm_state_set()
24 LOG_DBG("Unsupported power state %u", state); in pm_state_set()
30 void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) in pm_state_exit_post_ops() argument
34 switch (state) { in pm_state_exit_post_ops()
41 LOG_DBG("Unsupported power state %u", state); in pm_state_exit_post_ops()
/Zephyr-Core-3.7.0/tests/subsys/pm/policy_api/src/
Dmain.c12 void pm_state_set(enum pm_state state, uint8_t substate_id) in pm_state_set() argument
15 ARG_UNUSED(state); in pm_state_set()
18 void pm_state_exit_post_ops(enum pm_state state, uint8_t substate_id) in pm_state_exit_post_ops() argument
20 ARG_UNUSED(state); in pm_state_exit_post_ops()
43 zassert_equal(next->state, PM_STATE_RUNTIME_IDLE); in ZTEST()
48 zassert_equal(next->state, PM_STATE_RUNTIME_IDLE); in ZTEST()
51 zassert_equal(next->state, PM_STATE_SUSPEND_TO_RAM); in ZTEST()
56 zassert_equal(next->state, PM_STATE_SUSPEND_TO_RAM); in ZTEST()
66 zassert_equal(next->state, PM_STATE_SUSPEND_TO_RAM); in ZTEST()
71 zassert_equal(next->state, PM_STATE_SUSPEND_TO_RAM); in ZTEST()
[all …]
/Zephyr-Core-3.7.0/subsys/pm/
Dpm.c34 { .state = PM_STATE_ACTIVE }
54 void (*callback)(enum pm_state state); in pm_state_notify()
65 callback(z_cpus_pm_state[_current_cpu->id].state); in pm_state_notify()
90 if ((z_cpus_pm_state[id].state != PM_STATE_RUNTIME_IDLE) && in pm_system_resume()
96 pm_state_exit_post_ops(z_cpus_pm_state[id].state, z_cpus_pm_state[id].substate_id); in pm_system_resume()
110 __ASSERT(info->state < PM_STATE_COUNT, in pm_state_force()
111 "Invalid power state %d!", info->state); in pm_state_force()
128 if (z_cpus_pm_forced_state[id].state != PM_STATE_ACTIVE) { in pm_system_suspend()
130 z_cpus_pm_forced_state[id].state = PM_STATE_ACTIVE; in pm_system_suspend()
138 z_cpus_pm_state[id].state = PM_STATE_ACTIVE; in pm_system_suspend()
[all …]

12345678910>>...48