Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
scd4x.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Jan Fäh
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DRIVERS_SENSOR_SCD4X_H_
8#define ZEPHYR_INCLUDE_DRIVERS_SENSOR_SCD4X_H_
9
11
13 /* Offset temperature: Toffset_actual = Tscd4x – Treference + Toffset_previous
14 * 0 - 20°C
15 */
17 /* Altidude of the sensor;
18 * 0 - 3000m
19 */
21 /* Ambient pressure in hPa
22 * 700 - 1200hPa
23 */
25 /* Set the current state (enabled: 1 / disabled: 0).
26 * Default: enabled.
27 */
29 /* Set the initial period for automatic self calibration correction in hours. Allowed values
30 * are integer multiples of 4 hours.
31 * Default: 44
32 */
34 /* Set the standard period for automatic self calibration correction in hours. Allowed
35 * values are integer multiples of 4 hours. Default: 156
36 */
38};
39
53int scd4x_forced_recalibration(const struct device *dev, uint16_t target_concentration,
54 uint16_t *frc_correction);
55
65int scd4x_self_test(const struct device *dev);
66
78int scd4x_persist_settings(const struct device *dev);
79
90int scd4x_factory_reset(const struct device *dev);
91
92#endif /* ZEPHYR_INCLUDE_DRIVERS_SENSOR_SCD4X_H_ */
@ SENSOR_ATTR_PRIV_START
This and higher values are sensor specific.
Definition sensor.h:359
int scd4x_self_test(const struct device *dev)
Performs a self test.
sensor_attribute_scd4x
Definition scd4x.h:12
@ SENSOR_ATTR_SCD4X_SELF_CALIB_INITIAL_PERIOD
Definition scd4x.h:33
@ SENSOR_ATTR_SCD4X_AMBIENT_PRESSURE
Definition scd4x.h:24
@ SENSOR_ATTR_SCD4X_TEMPERATURE_OFFSET
Definition scd4x.h:16
@ SENSOR_ATTR_SCD4X_SENSOR_ALTITUDE
Definition scd4x.h:20
@ SENSOR_ATTR_SCD4X_SELF_CALIB_STANDARD_PERIOD
Definition scd4x.h:37
@ SENSOR_ATTR_SCD4X_AUTOMATIC_CALIB_ENABLE
Definition scd4x.h:28
int scd4x_persist_settings(const struct device *dev)
Performs a self test.
int scd4x_forced_recalibration(const struct device *dev, uint16_t target_concentration, uint16_t *frc_correction)
Performs a forced recalibration.
int scd4x_factory_reset(const struct device *dev)
Performs a factory reset.
Public APIs for the sensor driver.
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:411