IoT Drivers  v3.3.0 (S2022)
Engineering in Software Technology
Functions to initialize the driver.

How to initialise the driver. More...

Collaboration diagram for Functions to initialize the driver.:

Functions

void mh_z19_initialise (serial_comPort_t com_port)
 Initialise the driver. More...
 
void mh_z19_injectCallBack (void(*mh_z19_callBack)(uint16_t))
 Inject a call-back function to the driver. More...
 

Detailed Description

How to initialise the driver.

Function Documentation

◆ mh_z19_initialise()

void mh_z19_initialise ( serial_comPort_t  com_port)

Initialise the driver.

Initialise the MH-Z19 Driver.

Parameters
[in]com_portto be used for communication with the RN2483 module.
Note
Must not be called after
vTaskStartScheduler()
is called in case FreeRTOS is used!!

◆ mh_z19_injectCallBack()

void mh_z19_injectCallBack ( void(*)(uint16_t)  mh_z19_callBack)

Inject a call-back function to the driver.

Injects a call-back function that will be called each time a new CO2 value is ready.

Note
The call-back function is called from an Interrupt Service Routine (ISR) so it must be very short and efficient!!
Parameters
[in]mh_z19_callBackfunction pointer to call back function, or NULL if no call back function is used.

The call back function must have this signature:

void functionName(uint16_t ppm)