sensors: Add a blocking sensor_read call

Rename the current sensor_read to sensor_read_async_pool and create a
new blocking sensor_read helper.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
This commit is contained in:
Tom Burdick 2024-04-05 11:38:20 -05:00 committed by Henrik Brix Andersen
commit d2ccc91d7d
4 changed files with 51 additions and 7 deletions

View file

@ -171,7 +171,7 @@ static void run_generic_test(const struct device *dev)
}
/* Perform the actual sensor read */
rv = sensor_read(&iodev_read, &sensor_read_rtio_ctx, NULL);
rv = sensor_read_async_mempool(&iodev_read, &sensor_read_rtio_ctx, NULL);
zassert_ok(rv, "Could not read sensor (error %d, iteration %d/%d)", rv,
iteration + 1, CONFIG_GENERIC_SENSOR_TEST_NUM_EXPECTED_VALS);