ed380de152
Add a new async API based on the RTIO subsystem. This new API allows: 1. Users to create sampling configs (telling the sensor which channels they want to sample together). 2. Sample data in an asynchronous manner which provides greater control over the data processing priority. 3. Fully backwards compatible API with no driver changes needed for functionality (they are needed to improve performance). 4. Helper functions for processing loop. Signed-off-by: Yuval Peress <peress@google.com>
19 lines
336 B
C
19 lines
336 B
C
/*
|
|
* Copyright (c) 2023 Google LLC.
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#include <zephyr/init.h>
|
|
#include <zephyr/drivers/sensor.h>
|
|
|
|
static int sensor_decoders_init(void)
|
|
{
|
|
STRUCT_SECTION_FOREACH(sensor_decoder_api, api) {
|
|
k_object_access_all_grant(api);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
SYS_INIT(sensor_decoders_init, POST_KERNEL, 99);
|