/device/google/contexthub/firmware/os/core/ |
D | appSec.c | 99 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 …]
|
D | spi.c | 53 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/firmware/os/platform/stm32/ |
D | i2c.c | 178 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 …]
|
D | spi.c | 110 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 …]
|
D | dma.c | 195 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/lib/nanohub/ |
D | sha2.c | 21 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 …]
|
D | rsa.c | 168 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/drivers/tilt_detection/ |
D | tilt_detection.c | 82 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/google/sunfish/vibrator/common/bench/ |
D | benchmark.cpp | 58 auto getOtherArg(const State &state, std::size_t index) const { in getOtherArg() argument 59 return state.range(index + 0); in getOtherArg() 102 void performBench(State *state, Return<void> (I::*performApi)(Effect, EffectStrength, in performBench() argument 104 auto effect = getEffect(*state); in performBench() 105 auto strength = getStrength(*state); in performBench() 118 for (auto _ : *state) { in performBench() 119 state->ResumeTiming(); in performBench() 122 state->PauseTiming(); in performBench() 128 auto getEffect(const State &state) const { in getEffect() 129 return static_cast<Effect>(this->getOtherArg(state, 0)); in getEffect() [all …]
|
/device/google/coral/json-c/ |
D | json_tokener.c | 139 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/redbull/json-c/ |
D | json_tokener.c | 139 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/sunfish/json-c/ |
D | json_tokener.c | 139 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/sensors/ |
D | multihal_sensors_qemu.cpp | 115 void MultihalSensors::parseQemuSensorEventLocked(QemuSensorsProtocolState* state) { in parseQemuSensorEventLocked() argument 133 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEventLocked() 146 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEventLocked() 156 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEventLocked() 173 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEventLocked() 183 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEventLocked() 193 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEventLocked() 206 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEventLocked() 214 if (!approximatelyEqual(state->lastAmbientTemperatureValue, in parseQemuSensorEventLocked() 216 event.timestamp = nowNs + state->timeBiasNs; in parseQemuSensorEventLocked() [all …]
|
/device/google/sunfish/vibrator/drv2624/bench/ |
D | benchmark.cpp | 57 void SetUp(::benchmark::State &state) override { in SetUp() argument 72 SetProperty(std::string() + PROPERTY_PREFIX + "config.dynamic", getDynamicConfig(state)); in SetUp() 88 std::string getDynamicConfig(const ::benchmark::State &state) const { in getDynamicConfig() 89 return std::to_string(state.range(0)); in getDynamicConfig() 92 auto getOtherArg(const ::benchmark::State &state, std::size_t index) const { in getOtherArg() argument 93 return state.range(index + 1); in getOtherArg() 104 (benchmark::State & state){code} BENCHMARK_REGISTER_F(fixt, test) \ 111 for (auto _ : state) { 117 for (auto _ : state) { 123 for (auto _ : state) { [all …]
|
/device/google/barbet/vibrator/drv2624/bench/ |
D | benchmark.cpp | 51 void SetUp(::benchmark::State &state) override { in SetUp() argument 66 SetProperty(std::string() + PROPERTY_PREFIX + "config.dynamic", getDynamicConfig(state)); in SetUp() 82 std::string getDynamicConfig(const ::benchmark::State &state) const { in getDynamicConfig() 83 return std::to_string(state.range(0)); in getDynamicConfig() 86 auto getOtherArg(const ::benchmark::State &state, std::size_t index) const { in getOtherArg() argument 87 return state.range(index + 1); in getOtherArg() 98 (benchmark::State & state){code} BENCHMARK_REGISTER_F(fixt, test) \ 105 for (auto _ : state) { 111 for (auto _ : state) { 119 for (auto _ : state) { [all …]
|
/device/google/redfin/vibrator/drv2624/bench/ |
D | benchmark.cpp | 51 void SetUp(::benchmark::State &state) override { in SetUp() argument 66 SetProperty(std::string() + PROPERTY_PREFIX + "config.dynamic", getDynamicConfig(state)); in SetUp() 82 std::string getDynamicConfig(const ::benchmark::State &state) const { in getDynamicConfig() 83 return std::to_string(state.range(0)); in getDynamicConfig() 86 auto getOtherArg(const ::benchmark::State &state, std::size_t index) const { in getOtherArg() argument 87 return state.range(index + 1); in getOtherArg() 98 (benchmark::State & state){code} BENCHMARK_REGISTER_F(fixt, test) \ 105 for (auto _ : state) { 111 for (auto _ : state) { 119 for (auto _ : state) { [all …]
|
/device/generic/goldfish-opengl/system/codecs/c2/decoders/base/ |
D | SimpleC2Component.cpp | 219 Mutexed<ExecState>::Locked state(mExecState); in setListener_vb() local 220 if (state->mState == RUNNING) { in setListener_vb() 227 state->mListener = listener; in setListener_vb() 236 Mutexed<ExecState>::Locked state(mExecState); in queue_nb() local 237 if (state->mState != RUNNING) { in queue_nb() 267 Mutexed<ExecState>::Locked state(mExecState); in flush_sm() local 268 if (state->mState != RUNNING) { in flush_sm() 296 Mutexed<ExecState>::Locked state(mExecState); in drain_nb() local 297 if (state->mState != RUNNING) { in drain_nb() 315 Mutexed<ExecState>::Locked state(mExecState); in start() local [all …]
|
/device/google/contexthub/firmware/os/algos/common/math/ |
D | levenberg_marquardt.c | 14 static bool checkRelativeStepSize(const float *step, const float *state, 18 const float *state, const void *f_data, 51 float *state) { in lmSolverSolve() argument 65 CHRE_ASSERT_NOT_NULL(state); in lmSolverSolve() 73 memcpy(state, initial_state, sizeof(float) * state_dim); in lmSolverSolve() 78 if (computeResidualAndGradients(solver->func, state, f_data, data->temp, in lmSolverSolve() 102 if (checkRelativeStepSize(data->step, state, state_dim, in lmSolverSolve() 108 vecAdd(state_new, state, data->step, state_dim); in lmSolverSolve() 124 memcpy(state, state_new, sizeof(float) * state_dim); in lmSolverSolve() 128 if (computeResidualAndGradients(solver->func, state, f_data, data->temp, in lmSolverSolve() [all …]
|
/device/google/cuttlefish/host/commands/secure_env/oemlock/ |
D | oemlock.cpp | 47 auto state = CF_EXPECT(data->asUint8()); in ReadFlag() local 48 return (state >> bit) & 1; in ReadFlag() 53 auto state = CF_EXPECT(data->asUint8()); in WriteFlag() local 54 value ? state |= (1 << bit) : state &= ~(1 << bit); in WriteFlag() 56 CF_EXPECT(secure_env::CreateStorageData(&state, sizeof(state))); in WriteFlag() 81 auto state = CF_EXPECT(data->asUint8()); in IsOemUnlockAllowed() local 82 const bool allowed_by_device = (state >> kAllowedByDeviceBit) & 1; in IsOemUnlockAllowed() 83 const bool allowed_by_carrier = (state >> kAllowedByCarrierBit) & 1; in IsOemUnlockAllowed()
|
/device/google/atv/libraries/BluetoothServices/src/com/google/android/tv/btservices/remote/ |
D | BleConnection.java | 188 private final AtomicReference<ConnectionState> state; field in BleConnection 197 state = new AtomicReference<>(ConnectionState.UNINITIALIZED); in BleConnection() 201 if (state.compareAndSet( in connect() 204 synchronized (state) { in connect() 212 state.set(ConnectionState.DISCONNECTED); in connect() 225 if (!state.compareAndSet(ConnectionState.PENDING_RESPONSE, ConnectionState.READY) in maybeSendNextCommand() 227 || !state.compareAndSet(ConnectionState.READY, in maybeSendNextCommand() 251 if (state.compareAndSet(ConnectionState.READY, ConnectionState.PENDING_RESPONSE)) { in writeCharacteristic() 269 if (state.compareAndSet(ConnectionState.READY, ConnectionState.PENDING_RESPONSE)) { in readCharacteristic() 288 if (state.compareAndSet(ConnectionState.READY, ConnectionState.PENDING_RESPONSE)) { in writeDescriptor() [all …]
|
/device/google/contexthub/firmware/os/drivers/st_hts221/ |
D | hts221.c | 142 uint8_t state; member 167 bool (*comm_tx)(uint8_t addr, uint8_t data, uint32_t delay, uint8_t state); 168 bool (*comm_rx)(uint8_t addr, uint16_t len, uint32_t delay, uint8_t state); 189 static struct I2cTransfer *allocXfer(uint8_t state) in allocXfer() argument 196 mTask.transfers[i].state = state; in allocXfer() 224 static bool i2c_read(uint8_t addr, uint16_t len, uint32_t delay, uint8_t state) in i2c_read() argument 226 struct I2cTransfer *xfer = allocXfer(state); in i2c_read() 248 static bool i2c_write(uint8_t addr, uint8_t data, uint32_t delay, uint8_t state) in i2c_write() argument 250 struct I2cTransfer *xfer = allocXfer(state); in i2c_write() 307 uint32_t state = on ? SENSOR_HUMIDITY_POWER_UP : SENSOR_HUMIDITY_POWER_DOWN; in humidityPower() local [all …]
|
/device/amlogic/yukawa/hal/audio/ |
D | fir_filter.c | 65 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()
|
/device/linaro/dragonboard/audio/ |
D | fir_filter.c | 65 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()
|
/device/google/contexthub/firmware/os/drivers/st_lps22hb/ |
D | lps22hb.c | 150 uint8_t state; member 180 bool (*comm_tx)(uint8_t addr, uint8_t data, uint32_t delay, uint8_t state); 181 bool (*comm_rx)(uint8_t addr, uint16_t len, uint32_t delay, uint8_t state); 214 static struct I2cTransfer *allocXfer(uint8_t state) in allocXfer() argument 221 mTask.transfers[i].state = state; in allocXfer() 248 static bool i2c_read(uint8_t addr, uint16_t len, uint32_t delay, uint8_t state) in i2c_read() argument 250 struct I2cTransfer *xfer = allocXfer(state); in i2c_read() 265 static bool i2c_write(uint8_t addr, uint8_t data, uint32_t delay, uint8_t state) in i2c_write() argument 267 struct I2cTransfer *xfer = allocXfer(state); in i2c_write() 355 uint32_t state = on ? SENSOR_BARO_POWER_UP : SENSOR_BARO_POWER_DOWN; in baroPower() local [all …]
|
/device/generic/opengl-transport/host/commands/emugen/ |
D | EntryPoint.h | 46 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
|