Lines Matching refs:buffer

88 static int adxl345_decode_stream(const uint8_t *buffer, struct sensor_chan_spec chan_spec,  in adxl345_decode_stream()  argument
91 const struct adxl345_fifo_data *enc_data = (const struct adxl345_fifo_data *)buffer; in adxl345_decode_stream()
93 buffer + sizeof(struct adxl345_fifo_data) + enc_data->fifo_byte_count; in adxl345_decode_stream()
108 buffer += sizeof(struct adxl345_fifo_data); in adxl345_decode_stream()
115 if ((uint8_t *)*fit >= buffer) { in adxl345_decode_stream()
116 sample_num = ((uint8_t *)*fit - buffer) / sample_set_size; in adxl345_decode_stream()
119 while (count < max_count && buffer < buffer_end) { in adxl345_decode_stream()
120 const uint8_t *sample_end = buffer; in adxl345_decode_stream()
124 if ((uintptr_t)buffer < *fit) { in adxl345_decode_stream()
126 buffer = sample_end; in adxl345_decode_stream()
135 adxl345_accel_convert_q31(&data->readings[count].x, *(int16_t *)buffer, in adxl345_decode_stream()
139 *(int16_t *)(buffer + buff_offset), in adxl345_decode_stream()
143 *(int16_t *)(buffer + buff_offset), in adxl345_decode_stream()
149 buffer = sample_end; in adxl345_decode_stream()
158 static int adxl345_decoder_get_frame_count(const uint8_t *buffer, struct sensor_chan_spec chan_spec, in adxl345_decoder_get_frame_count() argument
168 const struct adxl345_fifo_data *data = (const struct adxl345_fifo_data *)buffer; in adxl345_decoder_get_frame_count()
232 static int adxl345_decoder_decode(const uint8_t *buffer, struct sensor_chan_spec chan_spec, in adxl345_decoder_decode() argument
235 const struct adxl345_sample *data = (const struct adxl345_sample *)buffer; in adxl345_decoder_decode()
239 return adxl345_decode_stream(buffer, chan_spec, fit, max_count, data_out); in adxl345_decoder_decode()
246 static bool adxl345_decoder_has_trigger(const uint8_t *buffer, enum sensor_trigger_type trigger) in adxl345_decoder_has_trigger() argument
248 const struct adxl345_fifo_data *data = (const struct adxl345_fifo_data *)buffer; in adxl345_decoder_has_trigger()