Home
last modified time | relevance | path

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

123456789

/device/google/contexthub/firmware/os/core/
DappSec.c99 static void limitChunkSize(struct AppSecState *state) in limitChunkSize() argument
101 if (state->haveSig && state->chunkSize > state->signedBytesIn) in limitChunkSize()
102 state->chunkSize = state->signedBytesIn; in limitChunkSize()
103 if (state->haveEncr && state->chunkSize > state->encryptedBytesIn) in limitChunkSize()
104 state->chunkSize = state->signedBytesIn; in limitChunkSize()
107 static void appSecSetCurState(struct AppSecState *state, uint32_t curState) in appSecSetCurState() argument
118 if (curState != state->curState || curState == STATE_INIT) { in appSecSetCurState()
126 __func__, state->curState, curState, in appSecSetCurState()
127 state->chunkSize, chunkSize[curState], in appSecSetCurState()
128 state->haveBytes); in appSecSetCurState()
[all …]
Dspi.c53 static void spiMasterNext(struct SpiDeviceState *state);
54 static void spiMasterStop(struct SpiDeviceState *state);
55 static void spiMasterDone(struct SpiDeviceState *state, int err);
57 static void spiSlaveNext(struct SpiDeviceState *state);
58 static void spiSlaveIdle(struct SpiDeviceState *state, int err);
59 static void spiSlaveDone(struct SpiDeviceState *state);
61 static int spiMasterStart(struct SpiDeviceState *state, in spiMasterStart() argument
64 struct SpiDevice *dev = &state->dev; in spiMasterStart()
75 return dev->ops->masterRxTx(dev, state->packets[0].rxBuf, in spiMasterStart()
76 state->packets[0].txBuf, state->packets[0].size, mode); in spiMasterStart()
[all …]
/device/google/contexthub/lib/nanohub/
Dsha2.c21 void sha2init(struct Sha2state *state) in sha2init() argument
23 state->h[0] = 0x6a09e667; in sha2init()
24 state->h[1] = 0xbb67ae85; in sha2init()
25 state->h[2] = 0x3c6ef372; in sha2init()
26 state->h[3] = 0xa54ff53a; in sha2init()
27 state->h[4] = 0x510e527f; in sha2init()
28 state->h[5] = 0x9b05688c; in sha2init()
29 state->h[6] = 0x1f83d9ab; in sha2init()
30 state->h[7] = 0x5be0cd19; in sha2init()
31 state->msgLen = 0; in sha2init()
[all …]
Drsa.c168 const uint32_t* rsaPubOpIterative(struct RsaState* state, const uint32_t *a, const uint32_t *c, uin… in rsaPubOpIterative() argument
174 memcpy(state->tmpB, a, RSA_BYTES); in rsaPubOpIterative()
186 … biMulIterative(state->tmpA, state->tmpB, gigastep == 16 ? a : state->tmpB, gigastepSubstep); in rsaPubOpIterative()
193 …if (biModIterative(state->tmpA, c, state->tmpB, state1, state2, gigastepSubstep - RSA_LEN)) { //MO… in rsaPubOpIterative()
203 memcpy(state->tmpB, state->tmpA, RSA_BYTES); in rsaPubOpIterative()
209 return state->tmpA; in rsaPubOpIterative()
214 const uint32_t* rsaPubOp(struct RsaState* state, const uint32_t *a, const uint32_t *c) in rsaPubOp() argument
220 ret = rsaPubOpIterative(state, a, c, &state1, &state2, &step); in rsaPubOp()
244 const uint32_t* rsaPrivOp(struct RsaState* state, const uint32_t *a, const uint32_t *b, const uint3… in rsaPrivOp() argument
248 memcpy(state->tmpC, a, RSA_BYTES); //tC will hold our powers of a in rsaPrivOp()
[all …]
/device/google/contexthub/firmware/os/platform/stm32/
Di2c.c178 struct I2cStmState state; member
350 struct I2cStmState *state = &pdev->state; in stmI2cSlaveIdle() local
352 state->slaveState = STM_I2C_SLAVE_RX_ARMED; in stmI2cSlaveIdle()
357 static inline void stmI2cInvokeRxCallback(struct I2cStmState *state, size_t tx, size_t rx, int err) in stmI2cInvokeRxCallback() argument
359 uint16_t oldTid = osSetCurrentTid(state->tid); in stmI2cInvokeRxCallback()
360 state->rx.callback(state->rx.cookie, tx, rx, err); in stmI2cInvokeRxCallback()
364 static inline void stmI2cInvokeTxCallback(struct I2cStmState *state, size_t tx, size_t rx, int err) in stmI2cInvokeTxCallback() argument
366 uint16_t oldTid = osSetCurrentTid(state->tid); in stmI2cInvokeTxCallback()
367 state->tx.callback(state->tx.cookie, tx, rx, err); in stmI2cInvokeTxCallback()
373 struct I2cStmState *state = &pdev->state; in stmI2cSlaveRxDone() local
[all …]
Dspi.c110 struct StmSpiState state; member
170 struct StmSpiState *state = &pdev->state; in stmSpiEnable() local
189 atomicWriteByte(&state->xferEnable, false); in stmSpiEnable()
191 state->txWord = mode->txWord; in stmSpiEnable()
192 state->bitsPerWord = mode->bitsPerWord; in stmSpiEnable()
275 struct StmSpiState *state = &pdev->state; in stmSpiDone() local
284 if (state->nssChange && pdev->nss) in stmSpiDone()
297 struct StmSpiState *state = &pdev->state; in stmSpiRxDone() local
300 state->rxDone = true; in stmSpiRxDone()
302 if (state->txDone) { in stmSpiRxDone()
[all …]
Ddma.c195 struct StmDmaStreamState *state = dmaGetStreamState(busId, stream); in dmaIsrTeif() local
201 uint16_t oldTid = osSetCurrentTid(state->tid); in dmaIsrTeif()
202 state->callback(state->cookie, regs->NDTR, -EIO); in dmaIsrTeif()
208 struct StmDmaStreamState *state = dmaGetStreamState(busId, stream); in dmaIsrTcif() local
214 uint16_t oldTid = osSetCurrentTid(state->tid); in dmaIsrTcif()
215 state->callback(state->cookie, regs->NDTR, 0); in dmaIsrTcif()
221 struct StmDmaStreamState *state = dmaGetStreamState(busId, stream); in dmaIsr() local
223 if (UNLIKELY(!state->callback)) { in dmaIsr()
244 struct StmDmaStreamState *state = dmaGetStreamState(busId, stream); in dmaStart() local
245 state->callback = callback; in dmaStart()
[all …]
/device/google/contexthub/firmware/os/drivers/tilt_detection/
Dtilt_detection.c82 struct TiltAlgoState *state = &mTask.algoState; in algoUpdate() local
94 if (state->this_batch_init_ts == 0) { in algoUpdate()
95 state->this_batch_init_ts = sample_ts; in algoUpdate()
98 state->this_batch_sample_sum[0] += sample->x; in algoUpdate()
99 state->this_batch_sample_sum[1] += sample->y; in algoUpdate()
100 state->this_batch_sample_sum[2] += sample->z; in algoUpdate()
102 state->this_batch_num_samples++; in algoUpdate()
104 dt = (sample_ts - state->this_batch_init_ts); in algoUpdate()
107 invN = 1.0f / state->this_batch_num_samples; in algoUpdate()
108 state->this_batch_g[0] = state->this_batch_sample_sum[0] * invN; in algoUpdate()
[all …]
/device/generic/goldfish-opengl/system/GLESv1_enc/
DGLEncoder.cpp75 GLClientState* state = ctx->m_state; in s_glGetIntegerv() local
94 *ptr = state->getBoundTexture(GL_TEXTURE_2D); in s_glGetIntegerv()
98 *ptr = state->getBoundTexture(GL_TEXTURE_EXTERNAL_OES); in s_glGetIntegerv()
107 if (!state->getClientStateParameter<GLint>(param,ptr)) { in s_glGetIntegerv()
118 GLClientState* state = ctx->m_state; in s_glGetFloatv() local
138 *ptr = (GLfloat)state->getBoundTexture(GL_TEXTURE_2D); in s_glGetFloatv()
142 *ptr = (GLfloat)state->getBoundTexture(GL_TEXTURE_EXTERNAL_OES); in s_glGetFloatv()
146 if (!state->getClientStateParameter<GLfloat>(param,ptr)) { in s_glGetFloatv()
157 GLClientState* state = ctx->m_state; in s_glGetFixedv() local
177 *ptr = state->getBoundTexture(GL_TEXTURE_2D) << 16; in s_glGetFixedv()
[all …]
/device/google/wahoo/liblight/
Dlights.c163 is_lit(struct light_state_t const* state) in is_lit() argument
165 return state->color & 0x00ffffff; in is_lit()
169 rgb_to_brightness(struct light_state_t const* state) in rgb_to_brightness() argument
171 int color = state->color & 0x00ffffff; in rgb_to_brightness()
178 struct light_state_t const* state) in set_light_backlight() argument
181 int brightness = rgb_to_brightness(state); in set_light_backlight()
182 unsigned int lpEnabled = state->brightnessMode == BRIGHTNESS_MODE_LOW_PERSISTENCE; in set_light_backlight()
191 if ((g_last_backlight_mode != state->brightnessMode && lpEnabled) || in set_light_backlight()
199 g_last_backlight_mode = state->brightnessMode; in set_light_backlight()
211 struct light_state_t const* state) in set_speaker_light_locked() argument
[all …]
/device/google/cuttlefish/host/frontend/vnc_server/
Dblackboard.cpp81 auto& state = GetStateForClient(conn); in WaitForSenderWork() local
83 while (!state.closed && in WaitForSenderWork()
84 (!state.ready_to_receive || NoNewStripesFor(state.stripe_seq_nums))) { in WaitForSenderWork()
85 state.new_frame_cv.wait(guard); in WaitForSenderWork()
88 state.ready_to_receive = false; in WaitForSenderWork()
90 state.orientation, state.stripe_seq_nums); in WaitForSenderWork()
92 state.stripe_seq_nums[s->index] = s->seq_number; in WaitForSenderWork()
107 auto& state = GetStateForClient(conn); in SetOrientation() local
108 state.orientation = orientation; in SetOrientation()
111 ResetToZero(&state.stripe_seq_nums); in SetOrientation()
[all …]
/device/google/coral/json-c/
Djson_tokener.c139 tok->stack[depth].state = json_tokener_state_eatws; in json_tokener_reset_level()
187 #define state tok->stack[tok->depth].state macro
212 …(((tok)->depth == 0 && state == json_tokener_state_eatws && saved_state == json_tokener_state_fini…
261 switch(state) { in json_tokener_parse_ex()
272 state = json_tokener_state_comment_start; in json_tokener_parse_ex()
274 state = saved_state; in json_tokener_parse_ex()
282 state = json_tokener_state_eatws; in json_tokener_parse_ex()
287 state = json_tokener_state_eatws; in json_tokener_parse_ex()
293 state = json_tokener_state_inf; in json_tokener_parse_ex()
299 state = json_tokener_state_null; // or NaN in json_tokener_parse_ex()
[all …]
/device/google/crosshatch/json-c/
Djson_tokener.c139 tok->stack[depth].state = json_tokener_state_eatws; in json_tokener_reset_level()
187 #define state tok->stack[tok->depth].state macro
212 …(((tok)->depth == 0 && state == json_tokener_state_eatws && saved_state == json_tokener_state_fini…
261 switch(state) { in json_tokener_parse_ex()
272 state = json_tokener_state_comment_start; in json_tokener_parse_ex()
274 state = saved_state; in json_tokener_parse_ex()
282 state = json_tokener_state_eatws; in json_tokener_parse_ex()
287 state = json_tokener_state_eatws; in json_tokener_parse_ex()
293 state = json_tokener_state_inf; in json_tokener_parse_ex()
299 state = json_tokener_state_null; // or NaN in json_tokener_parse_ex()
[all …]
/device/google/bonito/json-c/
Djson_tokener.c139 tok->stack[depth].state = json_tokener_state_eatws; in json_tokener_reset_level()
187 #define state tok->stack[tok->depth].state macro
212 …(((tok)->depth == 0 && state == json_tokener_state_eatws && saved_state == json_tokener_state_fini…
261 switch(state) { in json_tokener_parse_ex()
272 state = json_tokener_state_comment_start; in json_tokener_parse_ex()
274 state = saved_state; in json_tokener_parse_ex()
282 state = json_tokener_state_eatws; in json_tokener_parse_ex()
287 state = json_tokener_state_eatws; in json_tokener_parse_ex()
293 state = json_tokener_state_inf; in json_tokener_parse_ex()
299 state = json_tokener_state_null; // or NaN in json_tokener_parse_ex()
[all …]
/device/generic/goldfish-opengl/shared/OpenglCodecCommon/
DGLClientState.h212 void enable(int location, int state);
650 … const GLClientState::VertexAttribState& state = getState(GLClientState::VERTEX_LOCATION); in getClientStateParameter() local
651 *out = state.size; in getClientStateParameter()
656 … const GLClientState::VertexAttribState& state = getState(GLClientState::VERTEX_LOCATION); in getClientStateParameter() local
657 *out = state.type; in getClientStateParameter()
662 … const GLClientState::VertexAttribState& state = getState(GLClientState::VERTEX_LOCATION); in getClientStateParameter() local
663 *out = state.stride; in getClientStateParameter()
668 const GLClientState::VertexAttribState& state = getState(GLClientState::COLOR_LOCATION); in getClientStateParameter() local
669 *out = state.size; in getClientStateParameter()
674 const GLClientState::VertexAttribState& state = getState(GLClientState::COLOR_LOCATION); in getClientStateParameter() local
[all …]
/device/generic/goldfish-opengl/system/GLESv2_enc/
DGL2EncoderUtils.cpp28 assert (ctx->state() != NULL); in pixelDataSize()
29 return ctx->state()->pixelDataSize(width, height, 1, format, type, pack); in pixelDataSize()
35 assert (ctx->state() != NULL); in pixelDataSize3D()
36 return ctx->state()->pixelDataSize(width, height, depth, format, type, pack); in pixelDataSize3D()
48 assert (ctx->state() != NULL); in clearBufferNumElts()
49 return ctx->state()->clearBufferNumElts(buffer); in clearBufferNumElts()
54 assert (ctx->state() != NULL); in numActiveUniformsInUniformBlock()
55 return ctx->state()->numActiveUniformsInUniformBlock(program, blockIndex); in numActiveUniformsInUniformBlock()
60 assert (ctx->state() != NULL); in glActiveUniformBlockivParamSize()
63 return ctx->state()->numActiveUniformsInUniformBlock(program, blockIndex); in glActiveUniformBlockivParamSize()
DGL2Encoder.cpp677 GLClientState* state = ctx->m_state; in s_glGetIntegerv() local
731 SET_ERROR_IF(!state, GL_INVALID_OPERATION); in s_glGetIntegerv()
732 *ptr = state->getBoundTexture(GL_TEXTURE_2D); in s_glGetIntegerv()
735 SET_ERROR_IF(!state, GL_INVALID_OPERATION); in s_glGetIntegerv()
736 *ptr = state->getBoundTexture(GL_TEXTURE_EXTERNAL_OES); in s_glGetIntegerv()
740 SET_ERROR_IF(!state, GL_INVALID_OPERATION); in s_glGetIntegerv()
741 if (!state->getClientStateParameter<GLint>(param, ptr)) { in s_glGetIntegerv()
743 state->setMaxVertexAttribs(*ptr); in s_glGetIntegerv()
889 SET_ERROR_IF(!state, GL_INVALID_OPERATION); in s_glGetIntegerv()
890 if (!state->getClientStateParameter<GLint>(param, ptr)) { in s_glGetIntegerv()
[all …]
/device/generic/goldfish/sensors/
Dmultihal_sensors_qemu.cpp86 QemuSensorsProtocolState* state) { in parseQemuSensorEvent() argument
106 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEvent()
116 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEvent()
128 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEvent()
138 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEvent()
148 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEvent()
160 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEvent()
168 if (!approximatelyEqual(state->lastAmbientTemperatureValue, in parseQemuSensorEvent()
170 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEvent()
174 state->lastAmbientTemperatureValue = payload->scalar; in parseQemuSensorEvent()
[all …]
/device/google/coral/vibrator/bench/
Dbenchmark.cpp88 (benchmark::State & state){code} BENCHMARK_REGISTER_F(fixt, test)->Apply(fixt::DefaultArgs)
93 for (auto _ : state) {
99 for (auto _ : state) {
105 for (auto _ : state) {
113 for (auto _ : state) {
119 for (auto _ : state) {
125 for (auto _ : state) {
131 for (auto _ : state) {
137 for (auto _ : state) {
144 Effect effect = Effect(state.range(0));
[all …]
/device/google/contexthub/firmware/os/algos/common/math/
Dlevenberg_marquardt.c13 static bool checkRelativeStepSize(const float *step, const float *state,
17 const float *state, const void *f_data,
54 float *state) { in lmSolverSolve() argument
68 ASSERT_NOT_NULL(state); in lmSolverSolve()
76 memcpy(state, initial_state, sizeof(float) * state_dim); in lmSolverSolve()
81 if (computeResidualAndGradients(solver->func, state, f_data, data->temp, in lmSolverSolve()
105 if (checkRelativeStepSize(data->step, state, state_dim, in lmSolverSolve()
111 vecAdd(state_new, state, data->step, state_dim); in lmSolverSolve()
127 memcpy(state, state_new, sizeof(float) * state_dim); in lmSolverSolve()
131 if (computeResidualAndGradients(solver->func, state, f_data, data->temp, in lmSolverSolve()
[all …]
/device/generic/opengl-transport/host/commands/emugen/
DEntryPoint.h46 void setUnsupported(bool state) { m_unsupported = state; } in setUnsupported() argument
48 void setCustomDecoder(bool state) { m_customDecoder = state; } in setCustomDecoder() argument
50 void setNotApi(bool state) { m_notApi = state; } in setNotApi() argument
52 void setFlushOnEncode(bool state) { m_flushOnEncode = state; } in setFlushOnEncode() argument
/device/linaro/hikey/hifi/xaf/hifi-dpf/plugins/cadence/mixer/
Dxa-mixer.c54 u32 state; member
199 d->state |= XA_MIXER_FLAG_OUTPUT; in xa_mixer_do_execute_stereo_16bit()
248 d->state = XA_MIXER_FLAG_PREINIT_DONE; in xa_mixer_init()
256 XF_CHK_ERR(d->state & XA_MIXER_FLAG_PREINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_init()
262 d->state |= XA_MIXER_FLAG_POSTINIT_DONE; in xa_mixer_init()
270 XF_CHK_ERR(d->state & XA_MIXER_FLAG_POSTINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_init()
273 d->state |= XA_MIXER_FLAG_RUNNING; in xa_mixer_init()
284 *(WORD32 *)pv_value = (d->state & XA_MIXER_FLAG_RUNNING ? 1 : 0); in xa_mixer_init()
305 XF_CHK_ERR(d->state & XA_MIXER_FLAG_PREINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_set_config_param()
343 XF_CHK_ERR(d->state & XA_MIXER_FLAG_PREINIT_DONE, XA_API_FATAL_INVALID_CMD_TYPE); in xa_mixer_get_config_param()
[all …]
/device/linaro/hikey/hifi/xaf/hifi-dpf/audio/
Dxa-class-audio-codec.c167 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_codec_empty_this_buffer()
173 if (base->state & XA_BASE_FLAG_COMPLETED) in xa_codec_empty_this_buffer()
176 base->state = XA_BASE_FLAG_POSTINIT | XA_BASE_FLAG_EXECUTION; in xa_codec_empty_this_buffer()
186 …XF_CHK_ERR(base->state & (XA_BASE_FLAG_RUNTIME_INIT | XA_BASE_FLAG_EXECUTION), XA_API_FATAL_INVALI… in xa_codec_empty_this_buffer()
209 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_codec_fill_this_buffer()
212 if (base->state & XA_BASE_FLAG_RUNTIME_INIT) in xa_codec_fill_this_buffer()
220 BUG((base->state & XA_BASE_FLAG_COMPLETED) == 0, _x("invalid state: %x"), base->state); in xa_codec_fill_this_buffer()
233 else if ((base->state & XA_BASE_FLAG_COMPLETED) && !xf_output_port_routed(&codec->output)) in xa_codec_fill_this_buffer()
252 if (base->state & (XA_BASE_FLAG_RUNTIME_INIT | XA_BASE_FLAG_EXECUTION)) in xa_codec_fill_this_buffer()
271 XF_CHK_ERR(base->state & XA_BASE_FLAG_POSTINIT, XA_API_FATAL_INVALID_CMD); in xa_codec_port_route()
[all …]
/device/google/contexthub/firmware/os/algos/
Dap_hub_sync.c39 sync->state = 0; in apHubSyncReset()
56 if (sync->state == NOT_INITED) { in apHubSyncAddDelta()
61 sync->state = USE_MAX; in apHubSyncAddDelta()
68 if (sync->state == USE_MAX) { in apHubSyncAddDelta()
74 sync->state = USE_FILTERED; in apHubSyncAddDelta()
87 switch (sync->state) { in apHubSyncGetDelta()
100 osLog(LOG_WARN, "ApHub sync: Invalid sync state %d", sync->state); in apHubSyncGetDelta()
/device/amlogic/yukawa/hal/audio/
Dfir_filter.c65 fir->state = (int16_t*)malloc(fir->buffer_size * sizeof(int16_t)); in fir_init()
66 if (fir->state == NULL) { in fir_init()
89 free(fir->state); in fir_release()
98 memset(fir->state, 0, fir->buffer_size * sizeof(int16_t)); in fir_reset()
105 memcpy(&fir->state[start_offset], input, samples * fir->channels * sizeof(int16_t)); in fir_process_interleaved()
123 int16x4_t input_vec = vld1_s16(&fir->state[offset]); in fir_process_interleaved()
130 int32_t input_A = (int32_t)(fir->state[offset]); in fir_process_interleaved()
132 int32_t input_B = (int32_t)(fir->state[offset + 1]); in fir_process_interleaved()
152 memmove(fir->state, &fir->state[samples * fir->channels], in fir_process_interleaved()

123456789