software:firmware
MakAir Firmware
|
Mass flow meter management. More...
#include <Arduino.h>
Go to the source code of this file.
Macros | |
#define | MFM_CALIBRATION_OK 0 |
#define | MFM_CALIBRATION_IMPOSSIBLE 1 |
#define | MFM_CALIBRATION_OUT_OF_RANGE 2 |
#define | MFM_SFM_3300D_I2C_ADDRESS 0x40 |
#define | MFM_HONEYWELL_HAF_I2C_ADDRESS 0x49 |
#define | MFM_SDP703_02_I2C_ADDRESS 0x40 |
#define | MFM_SFM3019_I2C_ADDRESS 0x2E |
#define | MFM_FORCE_RELEASE_I2C_TRUE 0xb00b |
#define | MFM_FORCE_RELEASE_I2C_FALSE 0 |
Functions | |
bool | MFM_init (void) |
Initialize Mass Flow Meter. More... | |
int32_t | MFM_read_milliliters (bool reset_after_read) |
Get the number of milliliters since last reset. More... | |
int32_t | MFM_expi_read_milliliters (bool reset_after_read) |
Get the number of milliliters since last reset for expiratory sensor. More... | |
void | MFM_reset (void) |
Reset the volume counter. More... | |
int8_t | MFM_calibrateZero (void) |
Calibrate the zero of the sensor. More... | |
int32_t | MFM_getOffset (void) |
Get massflow meter offset. More... | |
int32_t | MFM_read_airflow (void) |
Read instant air flow. More... | |
int32_t | MFM_expi_read_airflow (void) |
Read instant air flow. More... | |
uint32_t | MFM_read_serial_number (void) |
Get the serial number of the inspiratory flow meter. More... | |
uint32_t | MFM_expi_read_serial_number (void) |
Get the serial number of the expiratory flow meter. More... | |
Variables | |
volatile uint16_t | MFM_force_release_I2C |
Mass flow meter management.
Definition in file mass_flow_meter.h.
#define MFM_CALIBRATION_IMPOSSIBLE 1 |
Definition at line 51 of file mass_flow_meter.h.
#define MFM_CALIBRATION_OK 0 |
Definition at line 50 of file mass_flow_meter.h.
#define MFM_CALIBRATION_OUT_OF_RANGE 2 |
Definition at line 52 of file mass_flow_meter.h.
#define MFM_FORCE_RELEASE_I2C_FALSE 0 |
Definition at line 91 of file mass_flow_meter.h.
#define MFM_FORCE_RELEASE_I2C_TRUE 0xb00b |
Definition at line 90 of file mass_flow_meter.h.
#define MFM_HONEYWELL_HAF_I2C_ADDRESS 0x49 |
Definition at line 84 of file mass_flow_meter.h.
#define MFM_SDP703_02_I2C_ADDRESS 0x40 |
Definition at line 85 of file mass_flow_meter.h.
#define MFM_SFM3019_I2C_ADDRESS 0x2E |
Definition at line 86 of file mass_flow_meter.h.
#define MFM_SFM_3300D_I2C_ADDRESS 0x40 |
Definition at line 83 of file mass_flow_meter.h.
int8_t MFM_calibrateZero | ( | void | ) |
Calibrate the zero of the sensor.
Calibrate the zero of the sensor.
Definition at line 604 of file mass_flow_meter.cpp.
int32_t MFM_expi_read_airflow | ( | void | ) |
Read instant air flow.
Definition at line 566 of file mass_flow_meter.cpp.
int32_t MFM_expi_read_milliliters | ( | bool | reset_after_read | ) |
Get the number of milliliters since last reset for expiratory sensor.
reset_after_read | If true, performs the volume reset in the same atomic operation |
Definition at line 654 of file mass_flow_meter.cpp.
uint32_t MFM_expi_read_serial_number | ( | void | ) |
Get the serial number of the expiratory flow meter.
0
if before init or if init failedGet the serial number of the expiratory flow meter.
Definition at line 597 of file mass_flow_meter.cpp.
int32_t MFM_getOffset | ( | void | ) |
bool MFM_init | ( | void | ) |
Initialize Mass Flow Meter.
Definition at line 321 of file mass_flow_meter.cpp.
int32_t MFM_read_airflow | ( | void | ) |
Read instant air flow.
Definition at line 555 of file mass_flow_meter.cpp.
int32_t MFM_read_milliliters | ( | bool | reset_after_read | ) |
Get the number of milliliters since last reset.
reset_after_read | If true, performs the volume reset in the same atomic operation |
Definition at line 637 of file mass_flow_meter.cpp.
uint32_t MFM_read_serial_number | ( | void | ) |
Get the serial number of the inspiratory flow meter.
0
if before init or if init failed Definition at line 581 of file mass_flow_meter.cpp.
void MFM_reset | ( | void | ) |
|
extern |
Definition at line 32 of file mass_flow_meter.cpp.