RA Flexible Software Package Documentation  Release v5.5.0

 
RRH46410 Gas Sensor Module (rm_rrh46410)

Functions

fsp_err_t RM_RRH46410_Open (rm_zmod4xxx_ctrl_t *const p_api_ctrl, rm_zmod4xxx_cfg_t const *const p_cfg)
 Opens and configures the RRH46410 sensor module. Implements rm_zmod4xxx_api_t::open. More...
 
fsp_err_t RM_RRH46410_Close (rm_zmod4xxx_ctrl_t *const p_api_ctrl)
 This function should be called when close the sensor module. Implements rm_zmod4xxx_api_t::close. More...
 
fsp_err_t RM_RRH46410_MeasurementStart (rm_zmod4xxx_ctrl_t *const p_api_ctrl)
 This function should be called when start a measurement. Implements rm_zmod4xxx_api_t::measurementStart. More...
 
fsp_err_t RM_RRH46410_MeasurementStop (rm_zmod4xxx_ctrl_t *const p_api_ctrl)
 This function should be called when stop a measurement. Implements rm_zmod4xxx_api_t::measurementStop. More...
 
fsp_err_t RM_RRH46410_Read (rm_zmod4xxx_ctrl_t *const p_api_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data)
 This function should be called to get measurement results after measurement finishes. To check measurement status either polling or busy/interrupt pin can be used. Implements rm_zmod4xxx_api_t::read. More...
 
fsp_err_t RM_RRH46410_Iaq2ndGenDataCalculate (rm_zmod4xxx_ctrl_t *const p_api_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_iaq_2nd_data_t *const p_rrh46410_data)
 This function should be called when calculating gas data from measurement results. Implements rm_zmod4xxx_api_t::iaq2ndGenDataCalculate. More...
 
fsp_err_t RM_RRH46410_PbaqDataCalculate (rm_zmod4xxx_ctrl_t *const p_api_ctrl, rm_zmod4xxx_raw_data_t *const p_raw_data, rm_zmod4xxx_pbaq_data_t *const p_rrh46410_data)
 This function should be called when calculating gas data from measurement results. Implements rm_zmod4xxx_api_t::pbaqDataCalculate. More...
 
fsp_err_t RM_RRH46410_TemperatureAndHumiditySet (rm_zmod4xxx_ctrl_t *const p_api_ctrl, float temperature, float humidity)
 This function should be called before Read. Humidity measurements are needed for ambient compensation. temperature is not supported. Implements rm_zmod4xxx_api_t::temperatureAndHumiditySet. More...
 

Detailed Description

Middleware to implement the RRH46410 sensor module interface. This module implements the ZMOD4XXX Middleware Interface.

Overview

This module provides an API for configuring and controlling the RRH46410 sensor module (ZMOD4410 + MCU).

I2C communication with the RRH46410 sensor module is realized by connecting with the rm_comms_i2c module.

Features

The RRH46410 sensor interface implementation has the following key features:

Configuration

Build Time Configurations for rm_rrh46410

The following build time configurations are defined in fsp_cfg/rm_rrh46410_cfg.h:

ConfigurationOptionsDefaultDescription
Parameter Checking
  • Default (BSP)
  • Enabled
  • Disabled
Default (BSP) If selected code for parameter checking is included in the build.
Operation Mode
  • IAQ 2nd Gen and Rel IAQ
  • IAQ 2nd Gen ULP and Rel IAQ ULP
  • Public Building AQ Standard (PBAQ)
IAQ 2nd Gen and Rel IAQ Select operation mode.

Configurations for Sensor > RRH46410 Gas Sensor Module (rm_rrh46410)

This module can be added to the Stacks tab via New Stack > Sensor > RRH46410 Gas Sensor Module (rm_rrh46410).

ConfigurationOptionsDefaultDescription
NameName must be a valid C symbolg_rrh46410_sensor0 Module name.
Comms I2C CallbackName must be a valid C symbolrrh46410_comms_i2c_callback A user COMMS I2C callback function can be provided.
IRQ CallbackName must be a valid C symbolrrh46410_irq_callback A user IRQ callback function can be provided.

Pin Configuration

This module use SDA and SCL pins of I2C Master, SCI I2C and IICA Master.

Usage Notes

RRH46410 datasheet is here.
The RRH46410 has three modes of operation.
The RRH46410 will respond to TVOC immediately upon start-up; however, a conditioning period of 48 hours followed by a sensor module restart in an ambient environment is recommended to improve stability and obtain maximum performance.
Best results are achieved with continuous operation because the module algorithm can learn about the environment over time.

Operation mode Description Data
IAQ 2nd Generation and Relative IAQ Using AI for improved ppm TVOC, IAQ and eCO2 functionality (recommended for new designs). Lightweight algorithm reacts to air quality changes and outputs a relative IAQ IAQ, TVOC[mg/m^3], EtOH[ppm], eCO2[ppm], Rel IAQ
IAQ 2nd Generation Ultra Low Power and Relative IAQ Ultra Low Power Using AI for improved ppm TVOC, IAQ and eCO2 functionality. Lightweight algorithm reacts to air quality changes and outputs a relative IAQ. This operation mode offers a much lower power consumption. IAQ, TVOC[mg/m^3], EtOH[ppm], eCO2[ppm], Rel IAQ
Public Building AQ Standard (PBAQ) For highly accurate and consistent sensor readings to fulfill public building standards. TVOC[mg/m^3], EtOH[ppm]

If an RTOS is used, blocking and bus lock is available.

Limitations

Notifications

Bus Initialization

The RRH46410 interface expects a bus instance to be opened before opening any RRH46410 device. The interface will handle switching between devices on the bus but will not open or close the bus instance. The user should open the bus with the appropriate I2C Master Interface open call.

Initialization

Initialize with RM_RRH46410_Open().

From measurement start to data acquisition

After normal completion, start the measurement with RM_RRH46410_MeasurementStart(). An endless loop continuously checks the status of the RRH46410 sensor module and reads its data. The measurement results are subsequently processed, and the air quality values are calculated.

If IRQ is enabled

  1. Wait until RM_ZMOD4XXX_EVENT_MEASUREMENT_COMPLETE is received via IRQ callback.
  2. Call RM_RRH46410_Read(). This function will read the measurement results.
  3. Wait until RM_ZMOD4XXX_EVENT_MEASUREMENT_COMPLETE is received.
  4. Call the DataCalculate API according to the mode.

If IRQ is disabled

  1. Call RM_RRH46410_Read(). This function will read the measurement results.
  2. If RM_ZMOD4XXX_EVENT_MEASUREMENT_NOT_COMPLETE is received in callback, user should wait some time and then call RM_RRH46410_Read() again.
  3. Wait until RM_ZMOD4XXX_EVENT_MEASUREMENT_COMPLETE is received.
  4. Call the DataCalculate API according to the mode.

Examples

Basic Example

These are basic examples of minimal use of RRH46410 sensor implementation in an application.

IAQ 2nd Gen.

void rm_rrh46410_iaq_2nd_gen_basic_example (void)
{
fsp_err_t err = FSP_SUCCESS;
float humidity = RRH46410_DEFAULT_HUMIDITY_50F;
/* Open the I2C bus if it is not already open. */
rm_comms_i2c_bus_extended_cfg_t * p_extend =
(rm_comms_i2c_bus_extended_cfg_t *) g_rrh46410_cfg.p_comms_instance->p_cfg->p_extend;
i2c_master_instance_t * p_driver_instance = (i2c_master_instance_t *) p_extend->p_driver_instance;
p_driver_instance->p_api->open(p_driver_instance->p_ctrl, p_driver_instance->p_cfg);
#if BSP_CFG_RTOS
/* Create a semaphore for blocking if a semaphore is not NULL */
if (NULL != p_extend->p_blocking_semaphore)
{
#if BSP_CFG_RTOS == 1 // AzureOS
tx_semaphore_create(p_extend->p_blocking_semaphore->p_semaphore_handle,
p_extend->p_blocking_semaphore->p_semaphore_name,
(ULONG) 0);
#elif BSP_CFG_RTOS == 2 // FreeRTOS
*(p_extend->p_blocking_semaphore->p_semaphore_handle) =
xSemaphoreCreateCountingStatic((UBaseType_t) 1,
(UBaseType_t) 0,
p_extend->p_blocking_semaphore->p_semaphore_memory);
#endif
}
/* Create a recursive mutex for bus lock if a recursive mutex is not NULL */
if (NULL != p_extend->p_bus_recursive_mutex)
{
#if BSP_CFG_RTOS == 1 // AzureOS
tx_mutex_create(p_extend->p_bus_recursive_mutex->p_mutex_handle,
p_extend->p_bus_recursive_mutex->p_mutex_name,
TX_INHERIT);
#elif BSP_CFG_RTOS == 2 // FreeRTOS
*(p_extend->p_bus_recursive_mutex->p_mutex_handle) =
xSemaphoreCreateRecursiveMutexStatic(p_extend->p_bus_recursive_mutex->p_mutex_memory);
#endif
}
#endif
/* Reset sensor module (active low). Please change to the IO port connected to the RES_N pin of the RRH46410 sensor module on the customer board. */
/* Delay 1s after power-on and reset */
err = RM_RRH46410_Open(&g_rrh46410_ctrl, &g_rrh46410_cfg);
/* Handle any errors. This function should be defined by the user. */
handle_error(err);
#if RRH46410_IRQ_ENABLE
g_rrh46410_irq_callback_flag = 0;
#endif
g_rrh46410_i2c_callback_flag = 0;
err = RM_RRH46410_MeasurementStart(&g_rrh46410_ctrl);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
while (1)
{
/* Set the current humidity */
err = RM_RRH46410_TemperatureAndHumiditySet(&g_rrh46410_ctrl, 0.0F, humidity);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
#if RRH46410_IRQ_ENABLE
while (0U == g_rrh46410_irq_callback_flag)
{
}
g_rrh46410_irq_callback_flag = 0;
#else
/* Delay required time. See Table 3 in the RRH46410 Programming Manual. */
#endif
do
{
err = RM_RRH46410_Read(&g_rrh46410_ctrl, &raw_data);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
err = RM_RRH46410_Iaq2ndGenDataCalculate(&g_rrh46410_ctrl, &raw_data, &rrh46410_data);
{
/* Measurement is not complete */
}
if (FSP_SUCCESS == err)
{
/* Describe the process by referring to rrh46410_data */
}
{
/* Gas data is invalid. */
}
else
{
handle_error(err);
}
}
}

IAQ 2nd Gen. ULP

void rm_rrh46410_iaq_2nd_gen_ulp_basic_example (void)
{
fsp_err_t err = FSP_SUCCESS;
float humidity = RRH46410_DEFAULT_HUMIDITY_50F;
/* Open the I2C bus if it is not already open. */
rm_comms_i2c_bus_extended_cfg_t * p_extend =
(rm_comms_i2c_bus_extended_cfg_t *) g_rrh46410_cfg.p_comms_instance->p_cfg->p_extend;
i2c_master_instance_t * p_driver_instance = (i2c_master_instance_t *) p_extend->p_driver_instance;
p_driver_instance->p_api->open(p_driver_instance->p_ctrl, p_driver_instance->p_cfg);
#if BSP_CFG_RTOS
/* Create a semaphore for blocking if a semaphore is not NULL */
if (NULL != p_extend->p_blocking_semaphore)
{
#if BSP_CFG_RTOS == 1 // AzureOS
tx_semaphore_create(p_extend->p_blocking_semaphore->p_semaphore_handle,
p_extend->p_blocking_semaphore->p_semaphore_name,
(ULONG) 0);
#elif BSP_CFG_RTOS == 2 // FreeRTOS
*(p_extend->p_blocking_semaphore->p_semaphore_handle) =
xSemaphoreCreateCountingStatic((UBaseType_t) 1,
(UBaseType_t) 0,
p_extend->p_blocking_semaphore->p_semaphore_memory);
#endif
}
/* Create a recursive mutex for bus lock if a recursive mutex is not NULL */
if (NULL != p_extend->p_bus_recursive_mutex)
{
#if BSP_CFG_RTOS == 1 // AzureOS
tx_mutex_create(p_extend->p_bus_recursive_mutex->p_mutex_handle,
p_extend->p_bus_recursive_mutex->p_mutex_name,
TX_INHERIT);
#elif BSP_CFG_RTOS == 2 // FreeRTOS
*(p_extend->p_bus_recursive_mutex->p_mutex_handle) =
xSemaphoreCreateRecursiveMutexStatic(p_extend->p_bus_recursive_mutex->p_mutex_memory);
#endif
}
#endif
/* Reset sensor module (active low). Please change to the IO port connected to the RES_N pin of the RRH46410 sensor module on the customer board. */
/* Delay 1s after power-on and reset */
err = RM_RRH46410_Open(&g_rrh46410_ctrl, &g_rrh46410_cfg);
/* Handle any errors. This function should be defined by the user. */
handle_error(err);
#if RRH46410_IRQ_ENABLE
g_rrh46410_irq_callback_flag = 0;
#endif
g_rrh46410_i2c_callback_flag = 0;
err = RM_RRH46410_MeasurementStart(&g_rrh46410_ctrl);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
while (1)
{
/* Set the current humidity */
err = RM_RRH46410_TemperatureAndHumiditySet(&g_rrh46410_ctrl, 0.0F, humidity);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
#if RRH46410_IRQ_ENABLE
while (0U == g_rrh46410_irq_callback_flag)
{
}
g_rrh46410_irq_callback_flag = 0;
#else
/* Delay required time. See Table 3 in the RRH46410 Programming Manual. */
#endif
do
{
err = RM_RRH46410_Read(&g_rrh46410_ctrl, &raw_data);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
err = RM_RRH46410_Iaq2ndGenDataCalculate(&g_rrh46410_ctrl, &raw_data, &rrh46410_data);
{
/* Measurement is not complete */
}
if (FSP_SUCCESS == err)
{
/* Describe the process by referring to rrh46410_data */
}
{
/* Gas data is invalid. */
}
else
{
handle_error(err);
}
}
}

PBAQ

void rm_rrh46410_pbaq_basic_example (void)
{
fsp_err_t err = FSP_SUCCESS;
rm_zmod4xxx_pbaq_data_t rrh46410_data;
float humidity = RRH46410_DEFAULT_HUMIDITY_50F;
/* Open the I2C bus if it is not already open. */
rm_comms_i2c_bus_extended_cfg_t * p_extend =
(rm_comms_i2c_bus_extended_cfg_t *) g_rrh46410_cfg.p_comms_instance->p_cfg->p_extend;
i2c_master_instance_t * p_driver_instance = (i2c_master_instance_t *) p_extend->p_driver_instance;
p_driver_instance->p_api->open(p_driver_instance->p_ctrl, p_driver_instance->p_cfg);
#if BSP_CFG_RTOS
/* Create a semaphore for blocking if a semaphore is not NULL */
if (NULL != p_extend->p_blocking_semaphore)
{
#if BSP_CFG_RTOS == 1 // AzureOS
tx_semaphore_create(p_extend->p_blocking_semaphore->p_semaphore_handle,
p_extend->p_blocking_semaphore->p_semaphore_name,
(ULONG) 0);
#elif BSP_CFG_RTOS == 2 // FreeRTOS
*(p_extend->p_blocking_semaphore->p_semaphore_handle) =
xSemaphoreCreateCountingStatic((UBaseType_t) 1,
(UBaseType_t) 0,
p_extend->p_blocking_semaphore->p_semaphore_memory);
#endif
}
/* Create a recursive mutex for bus lock if a recursive mutex is not NULL */
if (NULL != p_extend->p_bus_recursive_mutex)
{
#if BSP_CFG_RTOS == 1 // AzureOS
tx_mutex_create(p_extend->p_bus_recursive_mutex->p_mutex_handle,
p_extend->p_bus_recursive_mutex->p_mutex_name,
TX_INHERIT);
#elif BSP_CFG_RTOS == 2 // FreeRTOS
*(p_extend->p_bus_recursive_mutex->p_mutex_handle) =
xSemaphoreCreateRecursiveMutexStatic(p_extend->p_bus_recursive_mutex->p_mutex_memory);
#endif
}
#endif
/* Reset sensor module (active low). Please change to the IO port connected to the RES_N pin of the RRH46410 sensor module on the customer board. */
/* Delay 1s after power-on and reset */
err = RM_RRH46410_Open(&g_rrh46410_ctrl, &g_rrh46410_cfg);
/* Handle any errors. This function should be defined by the user. */
handle_error(err);
#if RRH46410_IRQ_ENABLE
g_rrh46410_irq_callback_flag = 0;
#endif
g_rrh46410_i2c_callback_flag = 0;
err = RM_RRH46410_MeasurementStart(&g_rrh46410_ctrl);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
while (1)
{
/* Set the current humidity */
err = RM_RRH46410_TemperatureAndHumiditySet(&g_rrh46410_ctrl, 0.0F, humidity);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
#if RRH46410_IRQ_ENABLE
while (0U == g_rrh46410_irq_callback_flag)
{
}
g_rrh46410_irq_callback_flag = 0;
#else
/* Delay required time. See Table 3 in the RRH46410 Programming Manual. */
#endif
do
{
err = RM_RRH46410_Read(&g_rrh46410_ctrl, &raw_data);
handle_error(err);
while (0U == g_rrh46410_i2c_callback_flag)
{
}
g_rrh46410_i2c_callback_flag = 0;
err = RM_RRH46410_PbaqDataCalculate(&g_rrh46410_ctrl, &raw_data, &rrh46410_data);
{
/* Measurement is not complete */
}
if (FSP_SUCCESS == err)
{
/* Describe the process by referring to rrh46410_data */
}
{
/* Gas data is invalid. */
}
else
{
handle_error(err);
}
}
}

Data Structures

struct  rm_rrh46410_init_process_params_t
 
struct  rm_rrh46410_instance_ctrl_t
 

Data Structure Documentation

◆ rm_rrh46410_init_process_params_t

struct rm_rrh46410_init_process_params_t

RRH46410 initialization process block

Data Fields
volatile bool communication_finished Communication flag for blocking.
volatile rm_zmod4xxx_event_t event Callback event.

◆ rm_rrh46410_instance_ctrl_t

struct rm_rrh46410_instance_ctrl_t

RRH46410 control block

Data Fields

uint32_t open
 Open flag.
 
uint8_t write_buf [RM_RRH46410_MAX_I2C_BUF_SIZE]
 Write buffer for I2C communications.
 
uint8_t read_buf [RM_RRH46410_MAX_I2C_BUF_SIZE]
 Read buffer for I2C communications.
 
uint8_t * p_read_data
 Pointer to read data. This is used for checking error code and checksum in callback.
 
uint8_t read_bytes
 Read bytes. This is used for checking error code and checksum in callback.
 
volatile uint8_t prev_sample_id
 Previous sample ID. This is used for checking if sensor is in stabilization.
 
volatile int16_t warmup_counts
 Counts for warning up. This is used for checking if sensor is in stabilization.
 
volatile rm_zmod4xxx_event_t event
 Callback event.
 
rm_rrh46410_init_process_params_t init_process_params
 For the initialization process.
 
rm_zmod4xxx_cfg_t const * p_cfg
 Pointer of configuration block.
 
rm_comms_instance_t const * p_comms_i2c_instance
 Pointer of I2C Communications Middleware instance structure.
 
void const * p_irq_instance
 Pointer to IRQ instance.
 
void const * p_context
 Pointer to the user-provided context.
 
void(* p_comms_callback )(rm_zmod4xxx_callback_args_t *p_args)
 I2C Communications callback.
 
void(* p_irq_callback )(rm_zmod4xxx_callback_args_t *p_args)
 IRQ callback.
 

Function Documentation

◆ RM_RRH46410_Open()

fsp_err_t RM_RRH46410_Open ( rm_zmod4xxx_ctrl_t *const  p_api_ctrl,
rm_zmod4xxx_cfg_t const *const  p_cfg 
)

Opens and configures the RRH46410 sensor module. Implements rm_zmod4xxx_api_t::open.

Return values
FSP_SUCCESSRRH46410 successfully configured.
FSP_ERR_ASSERTIONNull pointer, or one or more configuration options is invalid.
FSP_ERR_ALREADY_OPENModule is already open. This module can only be opened once.
FSP_ERR_TIMEOUTCommunication is timeout.
FSP_ERR_ABORTEDCommunication is aborted.

◆ RM_RRH46410_Close()

fsp_err_t RM_RRH46410_Close ( rm_zmod4xxx_ctrl_t *const  p_api_ctrl)

This function should be called when close the sensor module. Implements rm_zmod4xxx_api_t::close.

Return values
FSP_SUCCESSSuccessfully closed.
FSP_ERR_ASSERTIONNull pointer passed as a parameter.
FSP_ERR_NOT_OPENModule is not open.

◆ RM_RRH46410_MeasurementStart()

fsp_err_t RM_RRH46410_MeasurementStart ( rm_zmod4xxx_ctrl_t *const  p_api_ctrl)

This function should be called when start a measurement. Implements rm_zmod4xxx_api_t::measurementStart.

Return values
FSP_SUCCESSSuccessfully started.
FSP_ERR_ASSERTIONNull pointer passed as a parameter.
FSP_ERR_NOT_OPENModule is not opened configured.
FSP_ERR_TIMEOUTCommunication is timeout.
FSP_ERR_ABORTEDCommunication is aborted.

◆ RM_RRH46410_MeasurementStop()

fsp_err_t RM_RRH46410_MeasurementStop ( rm_zmod4xxx_ctrl_t *const  p_api_ctrl)

This function should be called when stop a measurement. Implements rm_zmod4xxx_api_t::measurementStop.

Return values
FSP_SUCCESSSuccessfully stopped.
FSP_ERR_ASSERTIONNull pointer passed as a parameter.
FSP_ERR_NOT_OPENModule is not opened configured.
FSP_ERR_TIMEOUTCommunication is timeout.
FSP_ERR_ABORTEDCommunication is aborted.

◆ RM_RRH46410_Read()

fsp_err_t RM_RRH46410_Read ( rm_zmod4xxx_ctrl_t *const  p_api_ctrl,
rm_zmod4xxx_raw_data_t *const  p_raw_data 
)

This function should be called to get measurement results after measurement finishes. To check measurement status either polling or busy/interrupt pin can be used. Implements rm_zmod4xxx_api_t::read.

Return values
FSP_SUCCESSSuccessfully results are read.
FSP_ERR_ASSERTIONNull pointer passed as a parameter.
FSP_ERR_NOT_OPENModule is not opened configured.
FSP_ERR_TIMEOUTCommunication is timeout.
FSP_ERR_ABORTEDCommunication is aborted.

◆ RM_RRH46410_Iaq2ndGenDataCalculate()

fsp_err_t RM_RRH46410_Iaq2ndGenDataCalculate ( rm_zmod4xxx_ctrl_t *const  p_api_ctrl,
rm_zmod4xxx_raw_data_t *const  p_raw_data,
rm_zmod4xxx_iaq_2nd_data_t *const  p_rrh46410_data 
)

This function should be called when calculating gas data from measurement results. Implements rm_zmod4xxx_api_t::iaq2ndGenDataCalculate.

Return values
FSP_SUCCESSSuccessfully gas data is calculated.
FSP_ERR_ASSERTIONNull pointer passed as a parameter.
FSP_ERR_NOT_OPENModule is not opened configured.
FSP_ERR_UNSUPPORTEDUnsupported operation mode.
FSP_ERR_SENSOR_MEASUREMENT_NOT_FINISHEDMeasurement is not finished.

◆ RM_RRH46410_PbaqDataCalculate()

fsp_err_t RM_RRH46410_PbaqDataCalculate ( rm_zmod4xxx_ctrl_t *const  p_api_ctrl,
rm_zmod4xxx_raw_data_t *const  p_raw_data,
rm_zmod4xxx_pbaq_data_t *const  p_rrh46410_data 
)

This function should be called when calculating gas data from measurement results. Implements rm_zmod4xxx_api_t::pbaqDataCalculate.

Return values
FSP_SUCCESSSuccessfully gas data is calculated.
FSP_ERR_ASSERTIONNull pointer passed as a parameter.
FSP_ERR_NOT_OPENModule is not opened configured.
FSP_ERR_UNSUPPORTEDUnsupported operation mode.
FSP_ERR_SENSOR_MEASUREMENT_NOT_FINISHEDMeasurement is not finished.

◆ RM_RRH46410_TemperatureAndHumiditySet()

fsp_err_t RM_RRH46410_TemperatureAndHumiditySet ( rm_zmod4xxx_ctrl_t *const  p_api_ctrl,
float  temperature,
float  humidity 
)

This function should be called before Read. Humidity measurements are needed for ambient compensation. temperature is not supported. Implements rm_zmod4xxx_api_t::temperatureAndHumiditySet.

Return values
FSP_SUCCESSSuccessfully humidity is set.
FSP_ERR_ASSERTIONNull pointer passed as a parameter.
FSP_ERR_NOT_OPENModule is not opened configured.