/nrf52832-nimble/packages/NimBLE-latest/apps/blemesh_models_example_2/src/ |
H A D | transition.c | 69 void onoff_tt_values(struct generic_onoff_state *state) in onoff_tt_values() argument 71 state->tt_counter = tt_counter_calculator(&state->tt, &state->cal_tt); in onoff_tt_values() 74 void level_tt_values(struct generic_level_state *state) in level_tt_values() argument 78 tt_counter = tt_counter_calculator(&state->tt, &state->cal_tt); in level_tt_values() 79 state->tt_counter = tt_counter; in level_tt_values() 85 state->tt_delta = ((float) (state->level - state->target_level) / in level_tt_values() 89 void delta_level_tt_values(struct generic_level_state *state) in delta_level_tt_values() argument 93 tt_counter = tt_counter_calculator(&state->tt, &state->cal_tt); in delta_level_tt_values() 94 state->tt_counter_delta = tt_counter; in delta_level_tt_values() 100 state->tt_delta = ((float) state->last_delta / tt_counter); in delta_level_tt_values() [all …]
|
H A D | device_composition.c | 157 struct generic_onoff_state *state = model->user_data; in gen_onoff_get() local 160 net_buf_simple_add_u8(msg, state->onoff); in gen_onoff_get() 162 if (state->is_optional_para_available) { in gen_onoff_get() 163 net_buf_simple_add_u8(msg, state->target_onoff); in gen_onoff_get() 164 net_buf_simple_add_u8(msg, state->tt); in gen_onoff_get() 167 state->is_optional_para_available = 0x00; in gen_onoff_get() 181 struct generic_onoff_state *state = model->user_data; in gen_onoff_setunack() local 191 if (state->last_tid == tid && state->last_tx_addr == ctx->addr && in gen_onoff_setunack() 192 (now - state->last_msg_timestamp <= K_SECONDS(6))) { in gen_onoff_setunack() 196 state->is_optional_para_available = 0x01; in gen_onoff_setunack() [all …]
|
H A D | transition.h | 39 void onoff_tt_values(struct generic_onoff_state *state); 40 void level_tt_values(struct generic_level_state *state); 41 void delta_level_tt_values(struct generic_level_state *state); 42 void move_level_tt_values(struct generic_level_state *state); 43 void light_lightnes_actual_tt_values(struct light_lightness_state *state); 44 void light_lightnes_linear_tt_values(struct light_lightness_state *state); 45 void light_ctl_tt_values(struct light_ctl_state *state); 46 void light_ctl_temp_tt_values(struct light_ctl_state *state); 48 void onoff_handler(struct generic_onoff_state *state); 49 void level_lightness_handler(struct generic_level_state *state); [all …]
|
/nrf52832-nimble/rt-thread/components/dfs/filesystems/jffs2/cyg/compress/src/ |
H A D | inflate.c | 26 * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) 30 * - Add comments on state->bits assertion in inffast.c 95 local void fixedtables OF((struct inflate_state FAR *state)); 106 struct inflate_state FAR *state; local 108 if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; 109 state = (struct inflate_state FAR *)strm->state; 110 strm->total_in = strm->total_out = state->total = 0; 113 state->mode = HEAD; 114 state->last = 0; 115 state->havedict = 0; [all …]
|
H A D | infback.c | 19 local void fixedtables OF((struct inflate_state FAR *state)); 35 struct inflate_state FAR *state; local 49 state = (struct inflate_state FAR *)ZALLOC(strm, 1, 51 if (state == Z_NULL) return Z_MEM_ERROR; 53 strm->state = (struct internal_state FAR *)state; 54 state->dmax = 32768U; 55 state->wbits = windowBits; 56 state->wsize = 1U << windowBits; 57 state->window = window; 58 state->write = 0; [all …]
|
H A D | inffast.c | 42 state->mode == LEN 46 state->bits < 8 48 On return, state->mode is one of: 71 struct inflate_state FAR *state; local 97 /* copy state to local variables */ 98 state = (struct inflate_state FAR *)strm->state; 105 dmax = state->dmax; 107 wsize = state->wsize; 108 whave = state->whave; 109 write = state->write; [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/netif/ppp/ |
H A D | mppe.c | 61 static void mppe_rekey(ppp_mppe_state * state, int initial_key) in mppe_rekey() argument 72 lwip_sha1_update(&sha1_ctx, state->master_key, state->keylen); in mppe_rekey() 74 lwip_sha1_update(&sha1_ctx, state->session_key, state->keylen); in mppe_rekey() 78 MEMCPY(state->session_key, sha1_digest, state->keylen); in mppe_rekey() 81 lwip_arc4_init(&state->arc4); in mppe_rekey() 82 lwip_arc4_setup(&state->arc4, sha1_digest, state->keylen); in mppe_rekey() 83 lwip_arc4_crypt(&state->arc4, state->session_key, state->keylen); in mppe_rekey() 84 lwip_arc4_free(&state->arc4); in mppe_rekey() 86 if (state->keylen == 8) { in mppe_rekey() 88 state->session_key[0] = 0xd1; in mppe_rekey() [all …]
|
H A D | fsm.c | 2 * fsm.c - {Link, IP} Control Protocol Finite State Machine. 76 * Initialize fsm state. 80 f->state = PPP_FSM_INITIAL; in fsm_init() 92 switch( f->state ){ in fsm_lowerup() 94 f->state = PPP_FSM_CLOSED; in fsm_lowerup() 99 f->state = PPP_FSM_STOPPED; in fsm_lowerup() 103 f->state = PPP_FSM_REQSENT; in fsm_lowerup() 108 FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f->state)); in fsm_lowerup() 120 switch( f->state ){ in fsm_lowerdown() 122 f->state = PPP_FSM_INITIAL; in fsm_lowerdown() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/netif/ppp/ |
H A D | mppe.c | 61 static void mppe_rekey(ppp_mppe_state * state, int initial_key) in mppe_rekey() argument 72 lwip_sha1_update(&sha1_ctx, state->master_key, state->keylen); in mppe_rekey() 74 lwip_sha1_update(&sha1_ctx, state->session_key, state->keylen); in mppe_rekey() 78 MEMCPY(state->session_key, sha1_digest, state->keylen); in mppe_rekey() 81 lwip_arc4_init(&state->arc4); in mppe_rekey() 82 lwip_arc4_setup(&state->arc4, sha1_digest, state->keylen); in mppe_rekey() 83 lwip_arc4_crypt(&state->arc4, state->session_key, state->keylen); in mppe_rekey() 84 lwip_arc4_free(&state->arc4); in mppe_rekey() 86 if (state->keylen == 8) { in mppe_rekey() 88 state->session_key[0] = 0xd1; in mppe_rekey() [all …]
|
H A D | fsm.c | 2 * fsm.c - {Link, IP} Control Protocol Finite State Machine. 76 * Initialize fsm state. 80 f->state = PPP_FSM_INITIAL; in fsm_init() 92 switch( f->state ){ in fsm_lowerup() 94 f->state = PPP_FSM_CLOSED; in fsm_lowerup() 99 f->state = PPP_FSM_STOPPED; in fsm_lowerup() 103 f->state = PPP_FSM_REQSENT; in fsm_lowerup() 108 FSMDEBUG(("%s: Up event in state %d!", PROTO_NAME(f), f->state)); in fsm_lowerup() 120 switch( f->state ){ in fsm_lowerdown() 122 f->state = PPP_FSM_INITIAL; in fsm_lowerdown() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/netif/ppp/ |
H A D | fsm.c | 2 * fsm.c - Network Control Protocol Finite State Machine program file. 34 * fsm.c - {Link, IP} Control Protocol Finite State Machine. 101 * Initialize fsm state. 106 f->state = LS_INITIAL; in fsm_init() 123 int oldState = f->state; in fsm_lowerup() 127 switch( f->state ) { in fsm_lowerup() 129 f->state = LS_CLOSED; in fsm_lowerup() 134 f->state = LS_STOPPED; in fsm_lowerup() 138 f->state = LS_REQSENT; in fsm_lowerup() 143 FSMDEBUG(LOG_INFO, ("%s: Up event in state %d (%s)!\n", in fsm_lowerup() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/apps/altcp_tls/ |
H A D | altcp_tls_mbedtls.c | 115 static err_t altcp_mbedtls_lower_recv_process(struct altcp_pcb *conn, altcp_mbedtls_state_t *state); 116 static err_t altcp_mbedtls_handle_rx_appldata(struct altcp_pcb *conn, altcp_mbedtls_state_t *state); 123 * Allocate one of our structures, assign it to the new connection's 'state' and 131 if (listen_conn && listen_conn->state && listen_conn->accept) { in altcp_mbedtls_lower_accept() 133 altcp_mbedtls_state_t *listen_state = (altcp_mbedtls_state_t *)listen_conn->state; in altcp_mbedtls_lower_accept() 157 if (conn && conn->state) { in altcp_mbedtls_lower_connected() 165 return altcp_mbedtls_lower_recv_process(conn, (altcp_mbedtls_state_t *)conn->state); in altcp_mbedtls_lower_connected() 188 altcp_mbedtls_state_t *state; in altcp_mbedtls_lower_recv() local 202 state = (altcp_mbedtls_state_t *)conn->state; in altcp_mbedtls_lower_recv() 204 if (!state) { in altcp_mbedtls_lower_recv() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/netif/ |
H A D | zepif.c | 173 struct zepif_state *state; in zepif_linkoutput() local 183 state = (struct zepif_state *)netif->state; in zepif_linkoutput() 184 LWIP_ASSERT("state->pcb != NULL", state->pcb != NULL); in zepif_linkoutput() 200 zep->seq_num = lwip_htonl(state->seqno); in zepif_linkoutput() 201 state->seqno++; in zepif_linkoutput() 207 zepif_udp_recv(netif, state->pcb, pbuf_clone(PBUF_RAW, PBUF_RAM, q), NULL, 0); in zepif_linkoutput() 209 err = udp_sendto(state->pcb, q, state->init.zep_dst_ip_addr, state->init.zep_dst_udp_port); in zepif_linkoutput() 225 struct zepif_init *init_state = (struct zepif_init *)netif->state; in zepif_init() 226 struct zepif_state *state = (struct zepif_state *)mem_malloc(sizeof(struct zepif_state)); in zepif_init() local 230 if (state == NULL) { in zepif_init() [all …]
|
H A D | slipif.c | 99 u8_t state; member 124 LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); in slipif_output() 128 priv = (struct slipif_priv *)netif->state; in slipif_output() 213 LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); in slipif_rxbyte() 215 priv = (struct slipif_priv *)netif->state; in slipif_rxbyte() 217 switch (priv->state) { in slipif_rxbyte() 236 priv->state = SLIP_RECV_ESCAPE; in slipif_rxbyte() 255 priv->state = SLIP_RECV_NORMAL; in slipif_rxbyte() 259 } /* end switch (priv->state) */ in slipif_rxbyte() 334 struct slipif_priv *priv = (struct slipif_priv *)netif->state; in slipif_loop_thread() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/apps/http/ |
H A D | altcp_proxyconnect.c | 84 altcp_proxyconnect_state_free(altcp_proxyconnect_state_t *state) in altcp_proxyconnect_state_free() argument 86 LWIP_ASSERT("state != NULL", state != NULL); in altcp_proxyconnect_state_free() 87 mem_free(state); in altcp_proxyconnect_state_free() 113 altcp_proxyconnect_state_t *state = (altcp_proxyconnect_state_t *)conn->state; in altcp_proxyconnect_send_request() local 115 if (!state) { in altcp_proxyconnect_send_request() 119 len = altcp_proxyconnect_format_request(NULL, 0, "", state->outer_port); in altcp_proxyconnect_send_request() 139 host = ipaddr_ntoa(&state->outer_addr); in altcp_proxyconnect_send_request() 140 len2 = altcp_proxyconnect_format_request(buffer, alloc_len, host, state->outer_port); in altcp_proxyconnect_send_request() 162 if (conn && conn->state) { in altcp_proxyconnect_lower_connected() 187 altcp_proxyconnect_state_t *state; in altcp_proxyconnect_lower_recv() local [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/nimble/host/mesh/src/ |
H A D | model_cli.c | 21 u8_t *state; member 34 u8_t state; in gen_onoff_status() local 48 state = net_buf_simple_pull_u8(buf); in gen_onoff_status() 49 if (param->state) { in gen_onoff_status() 50 *param->state = state; in gen_onoff_status() 53 BT_DBG("state: %d", state); in gen_onoff_status() 120 u8_t *state) in bt_mesh_gen_onoff_get() argument 130 .state = state, in bt_mesh_gen_onoff_get() 149 u8_t val, u8_t *state) in bt_mesh_gen_onoff_set() argument 159 .state = state, in bt_mesh_gen_onoff_set() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.1.0/src/core/ |
H A D | altcp_tcp.c | 60 LWIP_ASSERT("pcb mismatch", (conn)->state == tpcb); \ 149 conn->state = NULL; /* already freed */ in altcp_tcp_err() 184 conn->state = tpcb; in altcp_tcp_setup() 237 struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_set_poll() 247 struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_recved() 261 pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_bind() 274 pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_connect() 287 pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_listen() 290 conn->state = lpcb; in altcp_tcp_listen() 301 struct tcp_pcb *pcb = (struct tcp_pcb *)conn->state; in altcp_tcp_abort() [all …]
|
H A D | tcp.c | 172 /** List of all TCP PCBs in LISTEN state */ 174 /** List of all TCP PCBs that are in a state in which 177 /** List of all TCP PCBs in TIME-WAIT state */ 212 LWIP_ASSERT("tcp_free: LISTEN", pcb->state != LISTEN); in tcp_free() 223 LWIP_ASSERT("tcp_free_listen: !LISTEN", pcb->state != LISTEN); in tcp_free_listen() 274 LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); in tcp_listen_closed() 339 * a closing state), the connection is closed, and put in a closing state. 352 if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { in tcp_close_shutdown() 377 - states which send FIN and change state are handled in tcp_close_shutdown_fin() */ in tcp_close_shutdown() 378 switch (pcb->state) { in tcp_close_shutdown() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/core/ |
H A D | tcp.c | 120 /** List of all TCP PCBs in LISTEN state */ 122 /** List of all TCP PCBs that are in a state in which 125 /** List of all TCP PCBs in TIME-WAIT state */ 193 LWIP_ASSERT("pcb->state == LISTEN", pcb->state == LISTEN); in tcp_listen_closed() 256 * a closing state), the connection is closed, and put in a closing state. 267 if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { in tcp_close_shutdown() 280 if (pcb->state == ESTABLISHED) { in tcp_close_shutdown() 282 pcb->state = TIME_WAIT; in tcp_close_shutdown() 298 - states which send FIN and change state are handled in tcp_close_shutdown_fin() */ in tcp_close_shutdown() 299 switch (pcb->state) { in tcp_close_shutdown() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/core/ |
H A D | tcp.c | 102 /** List of all TCP PCBs in LISTEN state */ 104 /** List of all TCP PCBs that are in a state in which 107 /** List of all TCP PCBs in TIME-WAIT state */ 161 * a closing state), the connection is closed, and put in a closing state. 174 if (rst_on_unacked_data && ((pcb->state == ESTABLISHED) || (pcb->state == CLOSE_WAIT))) { in tcp_close_shutdown() 187 if (pcb->state == ESTABLISHED) { in tcp_close_shutdown() 189 pcb->state = TIME_WAIT; in tcp_close_shutdown() 199 switch (pcb->state) { in tcp_close_shutdown() 201 /* Closing a pcb in the CLOSED state might seem erroneous, in tcp_close_shutdown() 202 * however, it is in this state once allocated and as yet unused in tcp_close_shutdown() [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-1.4.1/src/netif/ |
H A D | slipif.c | 97 u8_t state; member 123 LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); in slipif_output() 129 priv = netif->state; in slipif_output() 176 LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); in slipif_rxbyte() 178 priv = netif->state; in slipif_rxbyte() 180 switch (priv->state) { in slipif_rxbyte() 199 priv->state = SLIP_RECV_ESCAPE; in slipif_rxbyte() 214 priv->state = SLIP_RECV_NORMAL; in slipif_rxbyte() 216 } /* end switch (priv->state) */ in slipif_rxbyte() 291 struct slipif_priv *priv = (struct slipif_priv *)netif->state; in slipif_loop_thread() [all …]
|
/nrf52832-nimble/nordic/nrfx/drivers/src/ |
H A D | nrfx_adc.c | 51 nrfx_drv_state_t state; member 62 if (m_cb.state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_adc_init() 78 m_cb.state = NRFX_DRV_STATE_INITIALIZED; in nrfx_adc_init() 97 m_cb.state = NRFX_DRV_STATE_UNINITIALIZED; in nrfx_adc_uninit() 157 NRFX_ASSERT(m_cb.state != NRFX_DRV_STATE_UNINITIALIZED); in nrfx_adc_sample() 167 NRFX_ASSERT(m_cb.state != NRFX_DRV_STATE_UNINITIALIZED); in nrfx_adc_sample_convert() 168 if (m_cb.state == NRFX_DRV_STATE_POWERED_ON) in nrfx_adc_sample_convert() 178 m_cb.state = NRFX_DRV_STATE_POWERED_ON; in nrfx_adc_sample_convert() 191 m_cb.state = NRFX_DRV_STATE_INITIALIZED; in nrfx_adc_sample_convert() 245 NRFX_ASSERT(m_cb.state != NRFX_DRV_STATE_UNINITIALIZED); in nrfx_adc_buffer_convert() [all …]
|
H A D | nrfx_timer.c | 52 nrfx_drv_state_t state; member 70 if (p_cb->state != NRFX_DRV_STATE_UNINITIALIZED) in nrfx_timer_init() 108 p_cb->state = NRFX_DRV_STATE_INITIALIZED; in nrfx_timer_init() 128 m_cb[p_instance->instance_id].state = NRFX_DRV_STATE_UNINITIALIZED; in nrfx_timer_uninit() 134 NRFX_ASSERT(m_cb[p_instance->instance_id].state == NRFX_DRV_STATE_INITIALIZED); in nrfx_timer_enable() 136 m_cb[p_instance->instance_id].state = NRFX_DRV_STATE_POWERED_ON; in nrfx_timer_enable() 142 NRFX_ASSERT(m_cb[p_instance->instance_id].state != NRFX_DRV_STATE_UNINITIALIZED); in nrfx_timer_disable() 144 m_cb[p_instance->instance_id].state = NRFX_DRV_STATE_INITIALIZED; in nrfx_timer_disable() 150 NRFX_ASSERT(m_cb[p_instance->instance_id].state != NRFX_DRV_STATE_UNINITIALIZED); in nrfx_timer_is_enabled() 151 return (m_cb[p_instance->instance_id].state == NRFX_DRV_STATE_POWERED_ON); in nrfx_timer_is_enabled() [all …]
|
/nrf52832-nimble/packages/NimBLE-latest/ext/tinycrypt/include/tinycrypt/ |
H A D | cmac_mode.h | 74 * Once the state has been setup with a key, computing the CMAC of 78 * (2) next mix all of the data into the CMAC computation state using 84 * into the state is critical! 93 * destroy the state so an attacker cannot recover the key; use 111 /* struct tc_cmac_struct represents the state of a CMAC computation */ 132 * @brief Configures the CMAC state to use the given AES key 133 * @return returns TC_CRYPTO_SUCCESS (1) after having configured the CMAC state 138 * @param s IN/OUT -- the state to set up 146 * @brief Erases the CMAC state 147 * @return returns TC_CRYPTO_SUCCESS (1) after having configured the CMAC state [all …]
|
/nrf52832-nimble/rt-thread/components/net/lwip-2.0.2/src/netif/ |
H A D | slipif.c | 99 u8_t state; member 124 LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); in slipif_output() 128 priv = (struct slipif_priv *)netif->state; in slipif_output() 213 LWIP_ASSERT("netif->state != NULL", (netif->state != NULL)); in slipif_rxbyte() 215 priv = (struct slipif_priv *)netif->state; in slipif_rxbyte() 217 switch (priv->state) { in slipif_rxbyte() 236 priv->state = SLIP_RECV_ESCAPE; in slipif_rxbyte() 255 priv->state = SLIP_RECV_NORMAL; in slipif_rxbyte() 259 } /* end switch (priv->state) */ in slipif_rxbyte() 334 struct slipif_priv *priv = (struct slipif_priv *)netif->state; in slipif_loop_thread() [all …]
|