Loading...
Searching...
No Matches
sm_pwm_01c.h File Reference

SM_PWM_01C Device Driver. More...

Detailed Description

SM_PWM_01C Device Driver.

Author
Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr

Definition in file sm_pwm_01c.h.

#include <inttypes.h>
#include "timex.h"
#include "ztimer.h"
#include "periph/gpio.h"
+ Include dependency graph for sm_pwm_01c.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  circ_buf_t
 Circular buffer holding moving average values. More...
 
struct  sm_pwm_01c_params_t
 Parameters for the SM_PWM_01c sensor. More...
 
struct  sm_pwm_01c_data_t
 LPO and concentration (ug/m3) values for small and large particles. More...
 
struct  sm_pwm_01c_values_t
 LPO and concentration (ug/m3) values for small and large particles. More...
 
struct  sm_pwm_01c_t
 Device descriptor for the SM_PWM_01c sensor. More...
 

Macros

#define CONFIG_SM_PWM_01C_SAMPLE_TIME   (100 * US_PER_MS)
 Frequency at witch LPO % is calculated.
 
#define CONFIG_SM_PWM_01C_WINDOW_TIME   (10 * US_PER_SEC)
 Length in time of the measuring window, recommended 5-30s.
 
#define SM_PWM_01C_BUFFER_LEN
 Length in time of the measuring window.
 

Functions

int sm_pwm_01c_init (sm_pwm_01c_t *dev, const sm_pwm_01c_params_t *params)
 Initialize the given SM_PWM_01C device.
 
void sm_pwm_01c_start (sm_pwm_01c_t *dev)
 Start continuous measurement of Large and Small particle concentrations.
 
void sm_pwm_01c_stop (sm_pwm_01c_t *dev)
 Stops continuous measurement of Large and Small particle concentration.
 
void sm_pwm_01c_read_data (sm_pwm_01c_t *dev, sm_pwm_01c_data_t *data)
 Reads particle concentration values.