30 lines
536 B
C
30 lines
536 B
C
#ifndef SCD4X_DATA_H
|
|
#define SCD4X_DATA_H
|
|
|
|
#include "nvs_flash.h"
|
|
|
|
#define SCD4X_NORMAL_MODE 1
|
|
#define SCD4X_LP_MODE 2
|
|
#define SCD4X_SS_MODE 3
|
|
#define SCD4X_OFF_MODE 0
|
|
#define SCD4X_CAPTURE_ENABLED 0b11
|
|
|
|
struct scd4x_data {
|
|
uint16_t co2;
|
|
int32_t temperature;
|
|
int32_t humidity;
|
|
};
|
|
typedef struct scd4x_data scd4x_data_t;
|
|
|
|
struct scd4x_config {
|
|
scd4x_data_t* measure;
|
|
uint16_t delay;
|
|
uint8_t mode;
|
|
uint8_t enabled;
|
|
};
|
|
typedef struct scd4x_config scd4x_config_t;
|
|
|
|
scd4x_config_t* get_sensor_configuration(nvs_handle_t nvs);
|
|
|
|
#endif
|