|
ruuvi.drivers.c ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
|
#include "ruuvi_driver_error.h"#include "ruuvi_driver_sensor.h"#include <stddef.h>#include <string.h>Go to the source code of this file.
Macros | |
| #define | BITS_PER_BYTE (8U) |
| Number of bits in a byte. | |
Functions | |
| rd_status_t | rd_sensor_configuration_set (const rd_sensor_t *sensor, rd_sensor_configuration_t *config) |
| Implementation of ref rd_configuration_fp. | |
| rd_status_t | rd_sensor_configuration_get (const rd_sensor_t *sensor, rd_sensor_configuration_t *config) |
| Implementation of ref rd_configuration_fp. | |
| rd_status_t | rd_sensor_timestamp_function_set (rd_sensor_timestamp_fp timestamp_fp) |
Setup timestamping. Set to NULL to disable timestamps. | |
| uint64_t | rd_sensor_timestamp_get (void) |
| Calls the timestamp function and returns its value. | |
| void | rd_sensor_initialize (rd_sensor_t *const p_sensor) |
| Initialize sensor struct with non-null pointers which return RD_ERROR_NOT_INITIALIZED. | |
| void | rd_sensor_uninitialize (rd_sensor_t *const p_sensor) |
| Mark sensor as uninitialized by calling the generic initialization. Will not clear the name of the sensor. | |
| float | rd_sensor_data_parse (const rd_sensor_data_t *const provided, const rd_sensor_data_fields_t requested) |
| Parse data from provided struct. | |
| void | rd_sensor_data_set (rd_sensor_data_t *const target, const rd_sensor_data_fields_t field, const float value) |
| Set a desired value to target data. | |
| bool | rd_sensor_has_valid_data (const rd_sensor_data_t *const target, const uint8_t index) |
| Check if sensor has valid data at given index. | |
| rd_sensor_data_bitfield_t | rd_sensor_field_type (const rd_sensor_data_t *const target, const uint8_t index) |
| Check the type of data at given index. | |
| void | rd_sensor_data_populate (rd_sensor_data_t *const target, const rd_sensor_data_t *const provided, const rd_sensor_data_fields_t requested) |
| Populate given target data with data provided by sensor as requested. | |
| uint8_t | rd_sensor_data_fieldcount (const rd_sensor_data_t *const target) |
| Count number of floats required for this data structure. | |
| rd_status_t | validate_default_input_set (uint8_t *const input, const uint8_t mode) |
| Validate that given setting can be set on a sensor which supports only default value. | |
| rd_status_t | validate_default_input_get (uint8_t *const input) |
| Validate and get input when only allowed value is default. | |
| bool | rd_sensor_is_init (const rd_sensor_t *const sensor) |
| Check if given sensor structure is already initialized. | |
| #define BITS_PER_BYTE (8U) |
Number of bits in a byte.
Definition at line 6 of file ruuvi_driver_sensor.c.