Lines Matching full:channels
46 * @brief Compute the number of samples needed for the given channels
48 * @param[in] channels Array of channels requested
49 * @param[in] num_channels Number of channels on the @p channels array
50 * @return The number of samples required to read the given channels
52 static inline int compute_num_samples(const struct sensor_chan_spec *const channels, in compute_num_samples() argument
58 num_samples += SENSOR_CHANNEL_3_AXIS(channels[i].chan_type) ? 3 : 1; in compute_num_samples()
95 * @param[in] num_channels The number of valid channels in the header so far
104 if (sensor_chan_spec_eq(header->channels[i], chan_spec)) { in check_header_contains_channel()
120 const struct sensor_chan_spec *const channels = cfg->channels; in sensor_submit_fallback_sync() local
121 const int num_output_samples = compute_num_samples(channels, cfg->count); in sensor_submit_fallback_sync()
162 /* Populate values, update shift, and set channels */ in sensor_submit_fallback_sync()
165 const int num_samples = SENSOR_CHANNEL_3_AXIS(channels[i].chan_type) ? 3 : 1; in sensor_submit_fallback_sync()
168 rc = sensor_channel_get(dev, channels[i].chan_type, value); in sensor_submit_fallback_sync()
171 header->channels[sample_idx++] = (struct sensor_chan_spec) { in sensor_submit_fallback_sync()
172 rc == 0 ? channels[i].chan_type - 3 : SENSOR_CHAN_MAX, in sensor_submit_fallback_sync()
175 header->channels[sample_idx++] = (struct sensor_chan_spec) { in sensor_submit_fallback_sync()
176 rc == 0 ? channels[i].chan_type - 2 : SENSOR_CHAN_MAX, in sensor_submit_fallback_sync()
179 header->channels[sample_idx++] = (struct sensor_chan_spec) { in sensor_submit_fallback_sync()
180 rc == 0 ? channels[i].chan_type - 1 : SENSOR_CHAN_MAX, in sensor_submit_fallback_sync()
184 header->channels[sample_idx++] = (struct sensor_chan_spec) { in sensor_submit_fallback_sync()
185 rc == 0 ? channels[i].chan_type : SENSOR_CHAN_MAX, in sensor_submit_fallback_sync()
192 channels[i].chan_type, channels[i].chan_idx); in sensor_submit_fallback_sync()
232 * Spread the q31 values. This is needed because some channels are 3D. If in sensor_submit_fallback_sync()
239 header, header->channels[sample_idx + sample], sample_idx + sample); in sensor_submit_fallback_sync()
265 LOG_DBG("Total channels in header: %" PRIu32, header->num_channels); in sensor_submit_fallback_sync()
336 /* For 3-axis channels, we need to verify we have each individual axis */ in get_frame_count()
354 sensor_chan_spec_eq(header->channels[i], channel_x) && in get_frame_count()
355 sensor_chan_spec_eq(header->channels[i + 1], channel_y) && in get_frame_count()
356 sensor_chan_spec_eq(header->channels[i + 2], channel_z)) { in get_frame_count()
364 if (sensor_chan_spec_eq(header->channels[i], channel)) { in get_frame_count()
412 if (sensor_chan_spec_eq(chan_spec, header->channels[i])) { in get_q31_value()
477 * @param[in] max_count The maximum number of channels to decode.