|
Files | |
file | mindsensors-pressure.h |
Mindsensors PPS-v3 driver. | |
Defines | |
#define | MSPPS_I2C_ADDR 0x18 |
#define | MSPPS_CMD 0x41 |
#define | MSPPS_UNIT 0x42 |
#define | MSPPS_PRESS_ABS 0x43 |
#define | MSPPS_PRESS_GAUGE 0x45 |
#define | MSPPS_PRESS_REF 0x47 |
#define | MSPPS_UNIT_PSI 0x50 |
#define | MSPPS_UNIT_MB 0x62 |
#define | MSPPS_UNIT_KPA 0x6B |
#define | MSPSS_CMD_SETREF 0x44 |
#define | MSPPSsetUnitPSI(X) MSPPSsetUnit(X, MSPPS_UNIT_PSI) |
#define | MSPPSsetUnitmB(X) MSPPSsetUnit(X, MSPPS_UNIT_MB) |
#define | MSPPSsetUnitkPa(X) MSPPSsetUnit(X, MSPPS_UNIT_KPA) |
Functions | |
bool | MSPPSsendCmd (tSensors link, ubyte command) |
bool | MSPPSsetUnit (tSensors link, ubyte unit) |
long | MSPPSreadPressure (tSensors link, ubyte reg) |
long | MSPPSreadAbsPressure (tSensors link) |
long | MSPPSreadGaugePressure (tSensors link) |
long | MSPPSreadRefPressure (tSensors link) |
bool | MSPPSsetRefPressure (tSensors link) |
bool | MSPPSsetRefPressure (tSensors link, int refpressure) |
Variables | |
tByteArray | MSPPS_I2CRequest |
tByteArray | MSPPS_I2CReply |
PPS-v3 Sensor
#define MSPPS_CMD 0x41 |
MSPPS command register
Definition at line 43 of file mindsensors-pressure.h.
#define MSPPS_I2C_ADDR 0x18 |
MSPPS I2C device address
Definition at line 41 of file mindsensors-pressure.h.
#define MSPPS_PRESS_ABS 0x43 |
Read the absolute pressure
Definition at line 46 of file mindsensors-pressure.h.
#define MSPPS_PRESS_GAUGE 0x45 |
Read the gauge pressure
Definition at line 47 of file mindsensors-pressure.h.
#define MSPPS_PRESS_REF 0x47 |
Read or write the reference pressure
Definition at line 48 of file mindsensors-pressure.h.
#define MSPPS_UNIT 0x42 |
Configure measurement unit
Definition at line 45 of file mindsensors-pressure.h.
#define MSPPS_UNIT_KPA 0x6B |
Kilo Pascal unit
Definition at line 52 of file mindsensors-pressure.h.
#define MSPPS_UNIT_MB 0x62 |
Millibar unit
Definition at line 51 of file mindsensors-pressure.h.
#define MSPPS_UNIT_PSI 0x50 |
PSI unit
Definition at line 50 of file mindsensors-pressure.h.
#define MSPPSsetUnitkPa | ( | X ) | MSPPSsetUnit(X, MSPPS_UNIT_KPA) |
Definition at line 69 of file mindsensors-pressure.h.
#define MSPPSsetUnitmB | ( | X ) | MSPPSsetUnit(X, MSPPS_UNIT_MB) |
Definition at line 68 of file mindsensors-pressure.h.
#define MSPPSsetUnitPSI | ( | X ) | MSPPSsetUnit(X, MSPPS_UNIT_PSI) |
Definition at line 67 of file mindsensors-pressure.h.
#define MSPSS_CMD_SETREF 0x44 |
Set reference pressure to current absolute pressure
Definition at line 54 of file mindsensors-pressure.h.
long MSPPSreadAbsPressure | ( | tSensors | link ) |
Read the absolute pressure from the sensor and return it in the unit the sensor has been configured for.
link | the sensor port number |
Definition at line 105 of file mindsensors-pressure.h.
long MSPPSreadGaugePressure | ( | tSensors | link ) |
Read the gauge pressure from the sensor and return it in the unit the sensor has been configured for. This is the absolute pressure minus the reference pressure.
link | the sensor port number |
Definition at line 118 of file mindsensors-pressure.h.
long MSPPSreadPressure | ( | tSensors | link, |
ubyte | reg | ||
) |
Read the pressure from the sensor and return it in the unit the sensor has been configured for.
It is better to use MSPPSreadAbsPressure(), MSPPSreadGaugePressure() or MSPPSreadRefPressure() instead
link | the sensor port number |
reg | Specific pressure register to read. |
Definition at line 84 of file mindsensors-pressure.h.
long MSPPSreadRefPressure | ( | tSensors | link ) |
Read the reference pressure from the sensor and return it in the unit specified.
link | the sensor port number |
Definition at line 130 of file mindsensors-pressure.h.
bool MSPPSsendCmd | ( | tSensors | link, |
ubyte | command | ||
) |
Send a command to the sensor
link | the sensor port number |
command | the command to be sent |
Definition at line 173 of file mindsensors-pressure.h.
bool MSPPSsetRefPressure | ( | tSensors | link, |
int | refpressure | ||
) |
Set the reference pressure to the value specified.
link | the sensor port number |
refpressure | the value the ref pressure register should be set to. |
Definition at line 142 of file mindsensors-pressure.h.
bool MSPPSsetRefPressure | ( | tSensors | link ) |
Set the reference pressure to the current absolute pressure value.
link | the sensor port number |
Definition at line 161 of file mindsensors-pressure.h.
bool MSPPSsetUnit | ( | tSensors | link, |
ubyte | unit | ||
) |
Set the unit of measurement to the one specified.
link | the sensor port number |
unit | the unit of measurement to be used. |
Definition at line 191 of file mindsensors-pressure.h.
Array to hold I2C reply data
Definition at line 72 of file mindsensors-pressure.h.
Array to hold I2C command data
Definition at line 71 of file mindsensors-pressure.h.