|
| static uint8_t | crc8 (const uint8_t *data, size_t count) |
| |
| static esp_err_t | i2c_write_uint16 (scd30_handle_t sensor, uint16_t cmd, const uint16_t *data, size_t words) |
| |
| static esp_err_t | i2c_read_uint16 (scd30_handle_t sensor, uint16_t *data, size_t words) |
| |
| static esp_err_t | i2c_execute_uint16 (scd30_handle_t sensor, uint16_t cmd, uint32_t timeout_ms, const uint16_t *out_data, size_t out_words, uint16_t *in_data, size_t in_words) |
| |
| scd30_handle_t | scd30_i2c_create (i2c_bus_handle_t bus, i2c_addr_t dev_addr) |
| | Create a handle for an SCD30 sensor but does not apply any configuration.
|
| |
| scd30_handle_t | scd30_i2c_init (i2c_bus_handle_t bus, i2c_addr_t dev_addr) |
| | Initialize the SCD30 sensor on the I²C bus with a default configuration.
|
| |
| void | scd30_i2c_delete (scd30_handle_t sensor) |
| | Deinitialize the SCD30 sensor and free resources.
|
| |
| esp_err_t | scd30_i2c_trigger_continuous_measurement (scd30_handle_t sensor, p_mbar_t p_comp) |
| | Trigger continuous measurement.
|
| |
| esp_err_t | scd30_i2c_stop_continuous_measurement (scd30_handle_t sensor) |
| | Stop continuous measurement.
|
| |
| esp_err_t | scd30_i2c_read_measurement_interval (scd30_handle_t sensor, i_sec_t *interval) |
| | Read the measurement interval.
|
| |
| esp_err_t | scd30_i2c_write_measurement_interval (scd30_handle_t sensor, i_sec_t interval) |
| | Set measurement interval.
|
| |
| esp_err_t | scd30_i2c_read_data_ready_status (scd30_handle_t sensor, bool *data_ready) |
| | Check whether new measurement data is available for read-out.
|
| |
| esp_err_t | scd30_i2c_read_measurement (scd30_handle_t sensor, co2_ppm_t *co2, t_celsius_t *temperature, rh_percent_t *humidity) |
| | Read CO₂, temperature and humidity measurements.
|
| |
| esp_err_t | scd30_i2c_read_automatic_self_calibration (scd30_handle_t sensor, bool *enabled) |
| | Get automatic self calibration (ASC) state.
|
| |
| esp_err_t | scd30_i2c_write_automatic_self_calibration (scd30_handle_t sensor, bool enabled) |
| | Enable or disable automatic self calibration (ASC).
|
| |
| esp_err_t | scd30_i2c_read_forced_recalibration_value (scd30_handle_t sensor, uco2_ppm_t *frc) |
| | Get forced recalibration (FRC) value.
|
| |
| esp_err_t | scd30_i2c_write_forced_recalibration_value (scd30_handle_t sensor, uco2_ppm_t target) |
| | Set forced recalibration (FRC) value.
|
| |
| esp_err_t | scd30_i2c_read_temperature_offset_ticks (scd30_handle_t sensor, tx100_celsius_t *offset) |
| | Get temperature offset in ticks.
|
| |
| esp_err_t | scd30_i2c_read_temperature_offset (scd30_handle_t sensor, t_celsius_t *offset) |
| | Get temperature offset.
|
| |
| esp_err_t | scd30_i2c_write_temperature_offset_ticks (scd30_handle_t sensor, tx100_celsius_t offset) |
| | Set temperature offset in ticks.
|
| |
| esp_err_t | scd30_i2c_write_temperature_offset (scd30_handle_t sensor, t_celsius_t offset) |
| | Set temperature offset.
|
| |
| esp_err_t | scd30_i2c_read_sensor_altitude (scd30_handle_t sensor, alt_m_t *altitude) |
| | Get configured sensor altitude.
|
| |
| esp_err_t | scd30_i2c_write_sensor_altitude (scd30_handle_t sensor, alt_m_t altitude) |
| | Set sensor altitude above sea level.
|
| |
| esp_err_t | scd30_i2c_read_firmware_version (scd30_handle_t sensor, uint16_t *firmware_version) |
| | Get firmware version.
|
| |
| esp_err_t | scd30_i2c_soft_reset (scd30_handle_t sensor) |
| | Reset the sensor.
|
| |
I²C driver for the SCD30 environmental sensor.
- Author
- Adrien Chevrier
- Copyright
-
Portions under BSD-3-Clause license, derived from:
-
Copyright (c) 2021, Sensirion AG
-
Copyright (c) 2021, Ruslan V. Uss
-
Copyright (c) 2021, Nate Usher
-
-
Modifications and rewrite for new I²C interface:
-
Copyright (c) 2026 Adrien Chevrier. Under AGPL-3.0-or-later license.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
- Version
- 0.1
- Date
- 2026-02-04