32 #ifndef SENSOR_SENSOR_H_
33 #define SENSOR_SENSOR_H_
38 #include "../rl_file.h"
40 #define MAX_MESSAGE_LENGTH 1000
42 #ifndef I2C_BUS_FILENAME
43 #define I2C_BUS_FILENAME "/dev/i2c-2"
47 #define SENSOR_REGISTRY_SIZE 5
49 #define SENSOR_NAME_LENGTH (RL_FILE_CHANNEL_NAME_LENGTH)
int sensors_open_bus(void)
int sensors_scan(bool sensor_available[SENSOR_REGISTRY_SIZE])
int sensors_close_bus(int bus)
#define SENSOR_REGISTRY_SIZE
Number of sensor registered.
#define SENSOR_NAME_LENGTH
const rl_sensor_t SENSOR_REGISTRY[SENSOR_REGISTRY_SIZE]
int sensors_get_bus(void)
void sensors_close(bool const sensor_available[SENSOR_REGISTRY_SIZE])
void sensors_deinit(void)
int sensors_init_comm(uint8_t device_address)
int sensors_read(int32_t *const sensor_data, bool const sensor_available[SENSOR_REGISTRY_SIZE])
int32_t(* get_value)(int, int)
char name[SENSOR_NAME_LENGTH]