Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
scd4x.h File Reference

Go to the source code of this file.

Enumerations

enum  sensor_attribute_scd4x {
  SENSOR_ATTR_SCD4X_TEMPERATURE_OFFSET = SENSOR_ATTR_PRIV_START , SENSOR_ATTR_SCD4X_SENSOR_ALTITUDE , SENSOR_ATTR_SCD4X_AMBIENT_PRESSURE , SENSOR_ATTR_SCD4X_AUTOMATIC_CALIB_ENABLE ,
  SENSOR_ATTR_SCD4X_SELF_CALIB_INITIAL_PERIOD , SENSOR_ATTR_SCD4X_SELF_CALIB_STANDARD_PERIOD
}
 

Functions

int scd4x_forced_recalibration (const struct device *dev, uint16_t target_concentration, uint16_t *frc_correction)
 Performs a forced recalibration.
 
int scd4x_self_test (const struct device *dev)
 Performs a self test.
 
int scd4x_persist_settings (const struct device *dev)
 Performs a self test.
 
int scd4x_factory_reset (const struct device *dev)
 Performs a factory reset.
 

Enumeration Type Documentation

◆ sensor_attribute_scd4x

Enumerator
SENSOR_ATTR_SCD4X_TEMPERATURE_OFFSET 
SENSOR_ATTR_SCD4X_SENSOR_ALTITUDE 
SENSOR_ATTR_SCD4X_AMBIENT_PRESSURE 
SENSOR_ATTR_SCD4X_AUTOMATIC_CALIB_ENABLE 
SENSOR_ATTR_SCD4X_SELF_CALIB_INITIAL_PERIOD 
SENSOR_ATTR_SCD4X_SELF_CALIB_STANDARD_PERIOD 

Function Documentation

◆ scd4x_factory_reset()

int scd4x_factory_reset ( const struct device * dev)

Performs a factory reset.

The perform_factory_reset command resets all configuration settings stored in the EEPROM and erases the FRC and ASC algorithm history.

Parameters
devPointer to the sensor device
Returns
0 if successful, negative errno code if failure.

◆ scd4x_forced_recalibration()

int scd4x_forced_recalibration ( const struct device * dev,
uint16_t target_concentration,
uint16_t * frc_correction )

Performs a forced recalibration.

Operate the SCD4x in the operation mode for at least 3 minutes in an environment with a homogeneous and constant CO2 concentration. Otherwise the recalibratioin will fail. The sensor must be operated at the voltage desired for the application when performing the FRC sequence.

Parameters
devPointer to the sensor device
target_concentrationReference CO2 concentration.
frc_correctionPrevious differences from the target concentration
Returns
0 if successful, negative errno code if failure.

◆ scd4x_persist_settings()

int scd4x_persist_settings ( const struct device * dev)

Performs a self test.

The persist_settings command can be used to save the actual configuration. This command should only be sent when persistence is required and if actual changes to the configuration have been made. The EEPROM is guaranteed to withstand at least 2000 write cycles

Parameters
devPointer to the sensor device
Returns
0 if successful, negative errno code if failure.

◆ scd4x_self_test()

int scd4x_self_test ( const struct device * dev)

Performs a self test.

The self_test command can be used as an end-of-line test to check the sensor functionality

Parameters
devPointer to the sensor device
Returns
0 if successful, negative errno code if failure.