Lines Matching refs:edata
187 struct icm42688_encoded_data *edata = (struct icm42688_encoded_data *)buf; in icm42688_encode() local
191 edata->channels = 0; in icm42688_encode()
194 edata->channels |= icm42688_encode_channel(channels[i].chan_type); in icm42688_encode()
202 edata->header.is_fifo = false; in icm42688_encode()
203 edata->header.accel_fs = data->cfg.accel_fs; in icm42688_encode()
204 edata->header.gyro_fs = data->cfg.gyro_fs; in icm42688_encode()
205 edata->header.timestamp = sensor_clock_cycles_to_ns(cycles); in icm42688_encode()
312 const struct icm42688_fifo_data *edata = (const struct icm42688_fifo_data *)buffer; in icm42688_fifo_decode() local
313 const uint8_t *buffer_end = buffer + sizeof(struct icm42688_fifo_data) + edata->fifo_count; in icm42688_fifo_decode()
323 ((struct sensor_data_header *)data_out)->base_timestamp_ns = edata->header.timestamp; in icm42688_fifo_decode()
357 accel_period_ns[edata->accel_odr] * (accel_frame_count - 1); in icm42688_fifo_decode()
360 gyro_period_ns[edata->gyro_odr] * (gyro_frame_count - 1); in icm42688_fifo_decode()
368 uint64_t period_ns = accel_period_ns[edata->accel_odr]; in icm42688_fifo_decode()
370 icm42688_get_shift(SENSOR_CHAN_ACCEL_XYZ, edata->header.accel_fs, in icm42688_fifo_decode()
371 edata->header.gyro_fs, &data->shift); in icm42688_fifo_decode()
374 rc = icm42688_read_imu_from_packet(buffer, true, edata->header.accel_fs, 0, in icm42688_fifo_decode()
376 rc |= icm42688_read_imu_from_packet(buffer, true, edata->header.accel_fs, 1, in icm42688_fifo_decode()
378 rc |= icm42688_read_imu_from_packet(buffer, true, edata->header.accel_fs, 2, in icm42688_fifo_decode()
389 uint64_t period_ns = gyro_period_ns[edata->gyro_odr]; in icm42688_fifo_decode()
391 icm42688_get_shift(SENSOR_CHAN_GYRO_XYZ, edata->header.accel_fs, in icm42688_fifo_decode()
392 edata->header.gyro_fs, &data->shift); in icm42688_fifo_decode()
395 rc = icm42688_read_imu_from_packet(buffer, false, edata->header.gyro_fs, 0, in icm42688_fifo_decode()
397 rc |= icm42688_read_imu_from_packet(buffer, false, edata->header.gyro_fs, 1, in icm42688_fifo_decode()
399 rc |= icm42688_read_imu_from_packet(buffer, false, edata->header.gyro_fs, 2, in icm42688_fifo_decode()
417 const struct icm42688_encoded_data *edata = (const struct icm42688_encoded_data *)buffer; in icm42688_one_shot_decode() local
418 const struct icm42688_decoder_header *header = &edata->header; in icm42688_one_shot_decode()
420 .accel_fs = edata->header.accel_fs, in icm42688_one_shot_decode()
421 .gyro_fs = edata->header.gyro_fs, in icm42688_one_shot_decode()
442 if ((channel_request & edata->channels) != channel_request) { in icm42688_one_shot_decode()
448 out->header.base_timestamp_ns = edata->header.timestamp; in icm42688_one_shot_decode()
459 edata->readings[icm42688_get_channel_position(chan_spec.chan_type)], in icm42688_one_shot_decode()
467 if ((channel_request & edata->channels) != channel_request) { in icm42688_one_shot_decode()
473 out->header.base_timestamp_ns = edata->header.timestamp; in icm42688_one_shot_decode()
483 edata->readings[icm42688_get_channel_position(chan_spec.chan_type - 3)], in icm42688_one_shot_decode()
487 edata->readings[icm42688_get_channel_position(chan_spec.chan_type - 2)], in icm42688_one_shot_decode()
491 edata->readings[icm42688_get_channel_position(chan_spec.chan_type - 1)], in icm42688_one_shot_decode()
609 const struct icm42688_fifo_data *edata = (const struct icm42688_fifo_data *)buffer; in icm24688_decoder_has_trigger() local
611 if (!edata->header.is_fifo) { in icm24688_decoder_has_trigger()
617 return FIELD_GET(BIT_INT_STATUS_DATA_RDY, edata->int_status); in icm24688_decoder_has_trigger()
619 return FIELD_GET(BIT_INT_STATUS_FIFO_THS, edata->int_status); in icm24688_decoder_has_trigger()
621 return FIELD_GET(BIT_INT_STATUS_FIFO_FULL, edata->int_status); in icm24688_decoder_has_trigger()