Lines Matching refs:edata
352 struct bma4xx_encoded_data *edata; in bma4xx_submit_one_shot() local
366 edata = (struct bma4xx_encoded_data *)buf; in bma4xx_submit_one_shot()
367 edata->header.is_fifo = false; in bma4xx_submit_one_shot()
368 edata->header.accel_fs = bma4xx->accel_fs_range; in bma4xx_submit_one_shot()
369 edata->header.timestamp = k_ticks_to_ns_floor64(k_uptime_ticks()); in bma4xx_submit_one_shot()
370 edata->has_accel = 0; in bma4xx_submit_one_shot()
371 edata->has_temp = 0; in bma4xx_submit_one_shot()
382 edata->has_accel = 1; in bma4xx_submit_one_shot()
384 edata->has_temp = 1; in bma4xx_submit_one_shot()
391 edata->has_accel = 1; in bma4xx_submit_one_shot()
395 edata->has_temp = 1; in bma4xx_submit_one_shot()
406 if (edata->has_accel) { in bma4xx_submit_one_shot()
407 rc = bma4xx_sample_fetch(dev, &edata->accel_xyz[0], &edata->accel_xyz[1], in bma4xx_submit_one_shot()
408 &edata->accel_xyz[2]); in bma4xx_submit_one_shot()
417 if (edata->has_temp) { in bma4xx_submit_one_shot()
418 rc = bma4xx_temp_fetch(dev, &edata->temp); in bma4xx_submit_one_shot()
464 const struct bma4xx_encoded_data *edata = (const struct bma4xx_encoded_data *)buffer; in bma4xx_decoder_get_frame_count() local
465 const struct bma4xx_decoder_header *header = &edata->header; in bma4xx_decoder_get_frame_count()
477 *frame_count = edata->has_accel ? 1 : 0; in bma4xx_decoder_get_frame_count()
480 *frame_count = edata->has_temp ? 1 : 0; in bma4xx_decoder_get_frame_count()
590 const struct bma4xx_encoded_data *edata = (const struct bma4xx_encoded_data *)buffer; in bma4xx_one_shot_decode() local
591 const struct bma4xx_decoder_header *header = &edata->header; in bma4xx_one_shot_decode()
606 if (!edata->has_accel) { in bma4xx_one_shot_decode()
612 out->header.base_timestamp_ns = edata->header.timestamp; in bma4xx_one_shot_decode()
621 bma4xx_convert_raw_accel_to_q31(edata->accel_xyz[0], &out->readings[0].x); in bma4xx_one_shot_decode()
622 bma4xx_convert_raw_accel_to_q31(edata->accel_xyz[1], &out->readings[0].y); in bma4xx_one_shot_decode()
623 bma4xx_convert_raw_accel_to_q31(edata->accel_xyz[2], &out->readings[0].z); in bma4xx_one_shot_decode()
630 if (!edata->has_temp) { in bma4xx_one_shot_decode()
636 out->header.base_timestamp_ns = edata->header.timestamp; in bma4xx_one_shot_decode()
643 bma4xx_convert_raw_temp_to_q31(edata->temp, &out->readings[0].temperature); in bma4xx_one_shot_decode()