Lines Matching full:channels

45  * @brief Compute the number of samples needed for the given channels
47 * @param[in] channels Array of channels requested
48 * @param[in] num_channels Number of channels on the @p channels array
49 * @return The number of samples required to read the given channels
51 static inline int compute_num_samples(const struct sensor_chan_spec *const channels, in compute_num_samples() argument
57 num_samples += SENSOR_CHANNEL_3_AXIS(channels[i].chan_type) ? 3 : 1; in compute_num_samples()
94 * @param[in] num_channels The number of valid channels in the header so far
103 if (sensor_chan_spec_eq(header->channels[i], chan_spec)) { in check_header_contains_channel()
119 const struct sensor_chan_spec *const channels = cfg->channels; in sensor_submit_fallback_sync() local
120 const int num_output_samples = compute_num_samples(channels, cfg->count); in sensor_submit_fallback_sync()
151 /* Populate values, update shift, and set channels */ in sensor_submit_fallback_sync()
154 const int num_samples = SENSOR_CHANNEL_3_AXIS(channels[i].chan_type) ? 3 : 1; in sensor_submit_fallback_sync()
157 rc = sensor_channel_get(dev, channels[i].chan_type, value); in sensor_submit_fallback_sync()
160 header->channels[sample_idx++] = (struct sensor_chan_spec) { in sensor_submit_fallback_sync()
161 rc == 0 ? channels[i].chan_type - 3 : SENSOR_CHAN_MAX, in sensor_submit_fallback_sync()
164 header->channels[sample_idx++] = (struct sensor_chan_spec) { in sensor_submit_fallback_sync()
165 rc == 0 ? channels[i].chan_type - 2 : SENSOR_CHAN_MAX, in sensor_submit_fallback_sync()
168 header->channels[sample_idx++] = (struct sensor_chan_spec) { in sensor_submit_fallback_sync()
169 rc == 0 ? channels[i].chan_type - 1 : SENSOR_CHAN_MAX, in sensor_submit_fallback_sync()
173 header->channels[sample_idx++] = (struct sensor_chan_spec) { in sensor_submit_fallback_sync()
174 rc == 0 ? channels[i].chan_type : SENSOR_CHAN_MAX, in sensor_submit_fallback_sync()
181 channels[i].chan_type, channels[i].chan_idx); in sensor_submit_fallback_sync()
221 * Spread the q31 values. This is needed because some channels are 3D. If in sensor_submit_fallback_sync()
228 header, header->channels[sample_idx + sample], sample_idx + sample); in sensor_submit_fallback_sync()
254 LOG_DBG("Total channels in header: %" PRIu32, header->num_channels); in sensor_submit_fallback_sync()
336 if (sensor_chan_spec_eq(header->channels[i], channel)) { in get_frame_count()
394 if (sensor_chan_spec_eq(chan_spec, header->channels[i])) { in get_q31_value()
459 * @param[in] max_count The maximum number of channels to decode.