Lines Matching refs:enc_data
163 static int adxl367_get_accel(const struct adxl367_fifo_data *enc_data, in adxl367_get_accel() argument
172 if (enc_data->has_x) { in adxl367_get_accel()
176 buffer, enc_data->fifo_read_mode, in adxl367_get_accel()
181 if (enc_data->has_y) { in adxl367_get_accel()
185 if (enc_data->has_x) { in adxl367_get_accel()
190 (buffer + buff_offset), enc_data->fifo_read_mode, in adxl367_get_accel()
195 if (enc_data->has_z) { in adxl367_get_accel()
202 if (enc_data->has_x) { in adxl367_get_accel()
206 if (enc_data->has_y) { in adxl367_get_accel()
212 (buffer + buff_offset), enc_data->fifo_read_mode, in adxl367_get_accel()
221 if (enc_data->has_x) { in adxl367_get_accel()
223 buffer, enc_data->fifo_read_mode, in adxl367_get_accel()
228 if (enc_data->has_y) { in adxl367_get_accel()
230 (buffer + buff_offset), enc_data->fifo_read_mode, in adxl367_get_accel()
236 if (enc_data->has_z) { in adxl367_get_accel()
238 (buffer + buff_offset), enc_data->fifo_read_mode, in adxl367_get_accel()
251 static int adxl367_get_12b_accel(const struct adxl367_fifo_data *enc_data, in adxl367_get_12b_accel() argument
263 if (enc_data->has_x) { in adxl367_get_12b_accel()
270 buffer, enc_data->fifo_read_mode, in adxl367_get_12b_accel()
275 if (enc_data->has_y) { in adxl367_get_12b_accel()
281 if (enc_data->has_x) { in adxl367_get_12b_accel()
290 (buffer + buff_offset), enc_data->fifo_read_mode, in adxl367_get_12b_accel()
295 if (enc_data->has_z) { in adxl367_get_12b_accel()
302 if (enc_data->has_x) { in adxl367_get_12b_accel()
306 if (enc_data->has_y) { in adxl367_get_12b_accel()
330 (buffer + buff_offset), enc_data->fifo_read_mode, in adxl367_get_12b_accel()
339 if (enc_data->has_x) { in adxl367_get_12b_accel()
346 buffer, enc_data->fifo_read_mode, ADXL367_X_AXIS, in adxl367_get_12b_accel()
350 if (enc_data->has_y) { in adxl367_get_12b_accel()
368 (buffer + buff_offset), enc_data->fifo_read_mode, in adxl367_get_12b_accel()
372 if (enc_data->has_z) { in adxl367_get_12b_accel()
389 (buffer + buff_offset), enc_data->fifo_read_mode, in adxl367_get_12b_accel()
402 static void adxl367_get_12b_temp(const struct adxl367_fifo_data *enc_data, in adxl367_get_12b_temp() argument
405 if (enc_data->has_tmp) { in adxl367_get_12b_temp()
415 (buffer + offset), enc_data->fifo_read_mode, in adxl367_get_12b_temp()
422 const struct adxl367_fifo_data *enc_data) in adxl367_decode_12b_stream() argument
425 buffer + sizeof(struct adxl367_fifo_data) + enc_data->fifo_byte_count; in adxl367_decode_12b_stream()
426 uint8_t packet_size = enc_data->packet_size; in adxl367_decode_12b_stream()
427 uint64_t period_ns = accel_period_ns[enc_data->accel_odr]; in adxl367_decode_12b_stream()
452 if (enc_data->packet_size % 2) { in adxl367_decode_12b_stream()
470 data->header.base_timestamp_ns = enc_data->timestamp; in adxl367_decode_12b_stream()
477 adxl367_get_12b_temp(enc_data, data, buffer, count, packet_size); in adxl367_decode_12b_stream()
483 data->header.base_timestamp_ns = enc_data->timestamp; in adxl367_decode_12b_stream()
485 data->shift = range_to_shift[enc_data->range]; in adxl367_decode_12b_stream()
487 int ret = adxl367_get_12b_accel(enc_data, data, buffer, count, packet_size, in adxl367_decode_12b_stream()
506 const struct adxl367_fifo_data *enc_data = (const struct adxl367_fifo_data *)buffer; in adxl367_decode_stream() local
508 buffer + sizeof(struct adxl367_fifo_data) + enc_data->fifo_byte_count; in adxl367_decode_stream()
518 uint8_t packet_size = enc_data->packet_size; in adxl367_decode_stream()
519 uint64_t period_ns = accel_period_ns[enc_data->accel_odr]; in adxl367_decode_stream()
522 if (enc_data->fifo_read_mode == ADXL367_8B) { in adxl367_decode_stream()
526 if (enc_data->fifo_read_mode == ADXL367_12B) { in adxl367_decode_stream()
528 data_out, enc_data); in adxl367_decode_stream()
550 data->header.base_timestamp_ns = enc_data->timestamp; in adxl367_decode_stream()
557 if (enc_data->has_tmp) { in adxl367_decode_stream()
561 (buffer + offset), enc_data->fifo_read_mode, 1); in adxl367_decode_stream()
568 data->header.base_timestamp_ns = enc_data->timestamp; in adxl367_decode_stream()
570 data->shift = range_to_shift[enc_data->range]; in adxl367_decode_stream()
572 int ret = adxl367_get_accel(enc_data, data, buffer, count, in adxl367_decode_stream()