mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
docs: updated @param tags, added missing function descriptions, other minor changes
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
parent
39df7fd10f
commit
3aef2ea70e
@ -81,7 +81,7 @@ namespace upm {
|
||||
* Installs an interrupt service routine (ISR) to be called when
|
||||
* the appropriate magnetic field is detected
|
||||
*
|
||||
* @param fptr Pointer to a function to be called on interrupt
|
||||
* @param isr Pointer to a function to be called on interrupt
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
|
@ -111,7 +111,7 @@ float abp_get_temperature(abp_context dev);
|
||||
* value of 5 will be set.
|
||||
*
|
||||
* @param dev abp_context pointer
|
||||
* @param min int maximum pressure value possible
|
||||
* @param max int maximum pressure value possible
|
||||
*/
|
||||
void abp_set_max_pressure(abp_context dev, int max);
|
||||
|
||||
|
@ -105,7 +105,7 @@ namespace upm {
|
||||
* not explicitly called to the set the min value, then a default max
|
||||
* value of 5 will be set.
|
||||
*
|
||||
* @param min int minimum pressure value possible
|
||||
* @param max int maximum pressure value possible
|
||||
*/
|
||||
void setMaxPressure(int max);
|
||||
|
||||
|
@ -58,12 +58,28 @@ typedef struct _ad8232_context {
|
||||
} *ad8232_context;
|
||||
|
||||
/**
|
||||
* Sensor Init function
|
||||
* Sensor init function
|
||||
*
|
||||
* @param lo_plus Digital pin to use for LO+
|
||||
* @param lo_minus Digital pin to use for LO-
|
||||
* @param output Analog pin to read the data
|
||||
* @param a_ref Analog voltage reference
|
||||
*/
|
||||
ad8232_context ad8232_init(int lo_plus, int lo_minus, int output, float a_ref);
|
||||
|
||||
/**
|
||||
* Sensor destructor
|
||||
*/
|
||||
void ad8232_close(ad8232_context dev);
|
||||
|
||||
/**
|
||||
* Returns the current ADC value for the device output pin. If an
|
||||
* LO (leads off) event is detected, 0 is returned.
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param value ADC value
|
||||
* @return result status code
|
||||
*/
|
||||
upm_result_t ad8232_get_value(ad8232_context dev, int* value);
|
||||
|
||||
#endif /* AD8232_H_ */
|
@ -80,6 +80,7 @@ namespace upm {
|
||||
* @param loPlus Digital pin to use for LO+
|
||||
* @param loMinus Digital pin to use for LO-
|
||||
* @param output Analog pin to read the data
|
||||
* @param aref Analog voltage reference
|
||||
*/
|
||||
AD8232(int loPlus, int loMinus, int output, float aref=AD8232_DEFAULT_AREF);
|
||||
|
||||
|
@ -120,8 +120,8 @@ namespace upm {
|
||||
* to set gain so it matches full scale value of input
|
||||
*
|
||||
* @param bus i2c bus the sensor is attached to.
|
||||
* @param address. Optional device address. Default is 0x48.
|
||||
* @param vref. Optional reference (i.e. half full swing) voltage. Default is 2.048V
|
||||
* @param address Optional device address. Default is 0x48.
|
||||
* @param vref Optional reference (i.e. half full swing) voltage. Default is 2.048V
|
||||
*/
|
||||
ADS1015 (int bus, uint8_t address = 0x48, float vref = ADS1015_VREF);
|
||||
|
||||
@ -135,7 +135,7 @@ namespace upm {
|
||||
* needs to be overridden in subclasses as the ADS1115 and
|
||||
* ADS1015 have different sample rates.
|
||||
*
|
||||
* @param ADSSAMPLERATE enum
|
||||
* @param rate ADSSAMPLERATE enum
|
||||
*/
|
||||
void setSPS(ADSSAMPLERATE rate = SPS_1600);
|
||||
|
||||
|
@ -119,7 +119,7 @@ namespace upm {
|
||||
* ADS1X15 constructor
|
||||
*
|
||||
* @param bus i2c bus the sensor is attached to.
|
||||
* @param address. Device address. Default is 0x48.
|
||||
* @param address Device address. Default is 0x48.
|
||||
*/
|
||||
ADS1115 (int bus, uint8_t address = 0x48);
|
||||
|
||||
@ -133,7 +133,7 @@ namespace upm {
|
||||
* needs to be overridden in subclasses as the ADS1115 and
|
||||
* ADS1015 have different sample rates.
|
||||
*
|
||||
* @param ADSSAMPLERATE enum
|
||||
* @param rate ADSSAMPLERATE enum
|
||||
*/
|
||||
void setSPS(ADSDATARATE rate = ADS1115::SPS_128);
|
||||
|
||||
|
@ -212,7 +212,7 @@ namespace upm {
|
||||
* ADS1X15 constructor
|
||||
*
|
||||
* @param bus i2c bus the sensor is attached to.
|
||||
* @param address. Device address. Default is 0x48.
|
||||
* @param address Device address. Default is 0x48.
|
||||
*/
|
||||
ADS1X15(int bus, uint8_t address);
|
||||
|
||||
|
@ -84,7 +84,6 @@ class AM2315 {
|
||||
*
|
||||
* @param bus Number of the used bus
|
||||
* @param devAddr Address of the used I2C device
|
||||
* @param mode AM2315 oversampling
|
||||
*/
|
||||
AM2315 (int bus, int devAddr=AM2315_I2C_ADDRESS);
|
||||
|
||||
|
@ -57,7 +57,7 @@ class APDS9930
|
||||
/**
|
||||
* APDS-9930 digital proximity and ambient light sensor constructor
|
||||
*
|
||||
* @param iio device number
|
||||
* @param device iio device number
|
||||
*/
|
||||
APDS9930(int device);
|
||||
/**
|
||||
|
@ -477,7 +477,7 @@ namespace upm {
|
||||
* BMA220 constructor
|
||||
*
|
||||
* @param bus i2c bus to use
|
||||
* @param address the address for this device
|
||||
* @param addr the address for this device
|
||||
*/
|
||||
BMA220(int bus=BMA220_I2C_BUS, uint8_t addr=BMA220_DEFAULT_ADDR);
|
||||
|
||||
@ -494,7 +494,6 @@ namespace upm {
|
||||
/**
|
||||
* read a register
|
||||
*
|
||||
* @param dev the device to access (XM or G)
|
||||
* @param reg the register to read
|
||||
* @return the value of the register
|
||||
*/
|
||||
@ -503,7 +502,6 @@ namespace upm {
|
||||
/**
|
||||
* write to a register
|
||||
*
|
||||
* @param dev the device to access (XM or G)
|
||||
* @param reg the register to write to
|
||||
* @param val the value to write
|
||||
* @return true if successful, false otherwise
|
||||
|
@ -354,7 +354,7 @@ extern "C" {
|
||||
* pin. See the datasheet for details.
|
||||
*
|
||||
* @param dev The device context.
|
||||
* @param A bitmask of BMA250E_INT_MAP_0_BITS_T bits.
|
||||
* @param bits A bitmask of BMA250E_INT_MAP_0_BITS_T bits.
|
||||
* @return UPM result.
|
||||
*/
|
||||
upm_result_t bma250e_set_interrupt_map0(const bma250e_context dev,
|
||||
@ -374,7 +374,7 @@ extern "C" {
|
||||
* details.
|
||||
*
|
||||
* @param dev The device context.
|
||||
* @param A bitmask of BMA250E_INT_MAP_1_BITS_T bits.
|
||||
* @param bits A bitmask of BMA250E_INT_MAP_1_BITS_T bits.
|
||||
* @return UPM result.
|
||||
*/
|
||||
upm_result_t bma250e_set_interrupt_map1(const bma250e_context dev,
|
||||
@ -394,7 +394,7 @@ extern "C" {
|
||||
* details.
|
||||
*
|
||||
* @param dev The device context.
|
||||
* @param A bitmask of BMA250E_INT_MAP_2_BITS_T bits.
|
||||
* @param bits A bitmask of BMA250E_INT_MAP_2_BITS_T bits.
|
||||
* @return UPM result.
|
||||
*/
|
||||
upm_result_t bma250e_set_interrupt_map2(const bma250e_context dev,
|
||||
|
@ -327,7 +327,7 @@ namespace upm {
|
||||
* to map specific interrupts to the interrupt 1 or interrupt 2
|
||||
* pin. See the datasheet for details.
|
||||
*
|
||||
* @param A bitmask of BMA250E_INT_MAP_0_BITS_T bits.
|
||||
* @param bits A bitmask of BMA250E_INT_MAP_0_BITS_T bits.
|
||||
* @throws std::runtime_error on failure.
|
||||
*/
|
||||
void setInterruptMap0(uint8_t bits);
|
||||
@ -344,7 +344,7 @@ namespace upm {
|
||||
* Set the Interrupt Map 1 register. See the datasheet for
|
||||
* details.
|
||||
*
|
||||
* @param A bitmask of BMA250E_INT_MAP_1_BITS_T bits.
|
||||
* @param bits A bitmask of BMA250E_INT_MAP_1_BITS_T bits.
|
||||
* @throws std::runtime_error on failure.
|
||||
*/
|
||||
void setInterruptMap1(uint8_t bits);
|
||||
@ -361,7 +361,7 @@ namespace upm {
|
||||
* Set the Interrupt Map 2 register. See the datasheet for
|
||||
* details.
|
||||
*
|
||||
* @param A bitmask of BMA250E_INT_MAP_2_BITS_T bits.
|
||||
* @param bits A bitmask of BMA250E_INT_MAP_2_BITS_T bits.
|
||||
* @throws std::runtime_error on failure.
|
||||
*/
|
||||
void setInterruptMap2(uint8_t bits);
|
||||
|
@ -284,7 +284,7 @@ extern "C" {
|
||||
* pin. See the datasheet for details.
|
||||
*
|
||||
* @param dev The device context.
|
||||
* @param A bitmask of BMG160_INT_MAP_0_BITS_T bits.
|
||||
* @param bits A bitmask of BMG160_INT_MAP_0_BITS_T bits.
|
||||
* @return UPM result.
|
||||
*/
|
||||
upm_result_t bmg160_set_interrupt_map0(const bmg160_context dev,
|
||||
@ -304,7 +304,7 @@ extern "C" {
|
||||
* details.
|
||||
*
|
||||
* @param dev The device context.
|
||||
* @param A bitmask of BMG160_INT_MAP_1_BITS_T bits.
|
||||
* @param bits A bitmask of BMG160_INT_MAP_1_BITS_T bits.
|
||||
* @return UPM result.
|
||||
*/
|
||||
upm_result_t bmg160_set_interrupt_map1(const bmg160_context dev,
|
||||
|
@ -263,7 +263,7 @@ namespace upm {
|
||||
* to map specific interrupts to the interrupt 1 or interrupt 2
|
||||
* pin. See the datasheet for details.
|
||||
*
|
||||
* @param A bitmask of BMG160_INT_MAP_0_BITS_T bits.
|
||||
* @param bits A bitmask of BMG160_INT_MAP_0_BITS_T bits.
|
||||
* @throws std::runtime_error on failure.
|
||||
*/
|
||||
void setInterruptMap0(uint8_t bits);
|
||||
@ -280,7 +280,7 @@ namespace upm {
|
||||
* Set the Interrupt Map 1 register. See the datasheet for
|
||||
* details.
|
||||
*
|
||||
* @param A bitmask of BMG160_INT_MAP_1_BITS_T bits.
|
||||
* @param bits A bitmask of BMG160_INT_MAP_1_BITS_T bits.
|
||||
* @throws std::runtime_error on failure.
|
||||
*/
|
||||
void setInterruptMap1(uint8_t bits);
|
||||
|
@ -82,7 +82,7 @@ namespace upm {
|
||||
* @param bus i2c bus to use
|
||||
* @param address The address for this device if using I2C. If
|
||||
* using SPI, supply -1 for this parameter.
|
||||
* @param cs_pin The GPIO to use for Chip Select (CS). This is
|
||||
* @param csPin The GPIO to use for Chip Select (CS). This is
|
||||
* only needed for SPI, and only if your SPI implementation
|
||||
* requires it. Otherwise, just pass -1 if not using SPI, or your
|
||||
* CS is handled automatically by your SPI implementation.
|
||||
|
@ -192,7 +192,7 @@ namespace upm {
|
||||
* Set the operating mode of the device. See the datasheet for
|
||||
* details.
|
||||
*
|
||||
* @param power One of the BMM150_POWER_MODE_T values.
|
||||
* @param opmode One of the BMM150_OPERATION_MODE_T values.
|
||||
* @throws std::runtime_error on failure.
|
||||
*/
|
||||
void setOpmode(BMM150_OPERATION_MODE_T opmode);
|
||||
|
@ -75,7 +75,7 @@ namespace upm {
|
||||
* operating mode is I2C.
|
||||
*
|
||||
* @param bus I2C or SPI bus to use.
|
||||
* @param address The I2C address for this device. Use -1 for SPI.
|
||||
* @param addr The I2C address for this device. Use -1 for SPI.
|
||||
* @param cs The gpio pin to use for the SPI Chip Select. Use -1
|
||||
* for I2C, or for SPI with a hardware controlled pin.
|
||||
* @throws std::runtime_error on failure.
|
||||
@ -104,7 +104,7 @@ namespace upm {
|
||||
* suitable value by using one of the predefined modes for
|
||||
* setUsageMode().
|
||||
*
|
||||
* @param mode One of the OSRS_H_T values.
|
||||
* @param rate One of the OSRS_H_T values.
|
||||
*/
|
||||
void setOversampleRateHumidity(BME280_OSRS_H_T rate);
|
||||
|
||||
|
@ -236,7 +236,7 @@ extern "C" {
|
||||
* bmp280_set_usage_mode().
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param mode One of the BMP280_OSRS_T_T values.
|
||||
* @param rate One of the BMP280_OSRS_T_T values.
|
||||
*/
|
||||
void bmp280_set_oversample_rate_temperature(const bmp280_context dev,
|
||||
BMP280_OSRS_T_T rate);
|
||||
@ -248,7 +248,7 @@ extern "C" {
|
||||
* bmp280_set_usage_mode().
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param mode One of the BMP280_OSRS_P_T values.
|
||||
* @param rate One of the BMP280_OSRS_P_T values.
|
||||
*/
|
||||
void bmp280_set_oversample_rate_pressure(const bmp280_context dev,
|
||||
BMP280_OSRS_P_T rate);
|
||||
@ -260,7 +260,7 @@ extern "C" {
|
||||
* predefined modes for bmp280_set_usage_mode().
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param mode One of the BME280_OSRS_H_T values.
|
||||
* @param rate One of the BME280_OSRS_H_T values.
|
||||
*/
|
||||
void bmp280_set_oversample_rate_humidity(const bmp280_context dev,
|
||||
BME280_OSRS_H_T rate);
|
||||
@ -271,7 +271,7 @@ extern "C" {
|
||||
* performing a measurement. See the data sheet for details.
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param mode One of the BMP280_T_SB_T values.
|
||||
* @param tsb One of the BMP280_T_SB_T values.
|
||||
*/
|
||||
void bmp280_set_timer_standby(const bmp280_context dev,
|
||||
BMP280_T_SB_T tsb);
|
||||
@ -283,7 +283,7 @@ extern "C" {
|
||||
* bmp280_set_usage_mode().
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param mode One of the BMP280_FILTER_T values.
|
||||
* @param filter One of the BMP280_FILTER_T values.
|
||||
*/
|
||||
void bmp280_set_filter(const bmp280_context dev, BMP280_FILTER_T filter);
|
||||
|
||||
|
@ -85,7 +85,7 @@ namespace upm {
|
||||
* operating mode is I2C.
|
||||
*
|
||||
* @param bus I2C or SPI bus to use.
|
||||
* @param address The I2C address for this device. Use -1 for SPI.
|
||||
* @param addr The I2C address for this device. Use -1 for SPI.
|
||||
* @param cs The gpio pin to use for the SPI Chip Select. Use -1
|
||||
* for I2C, or for SPI with a hardware controlled pin.
|
||||
* @throws std::runtime_error on failure.
|
||||
@ -174,7 +174,7 @@ namespace upm {
|
||||
* a suitable value by using one of the predefined modes for
|
||||
* setUsageMode().
|
||||
*
|
||||
* @param mode One of the BMP280_OSRS_T_T values.
|
||||
* @param rate One of the BMP280_OSRS_T_T values.
|
||||
*/
|
||||
void setOversampleRateTemperature(BMP280_OSRS_T_T rate);
|
||||
|
||||
@ -184,7 +184,7 @@ namespace upm {
|
||||
* a suitable value by using one of the predefined modes for
|
||||
* setUsageMode().
|
||||
*
|
||||
* @param mode One of the BMP280_OSRS_P_T values.
|
||||
* @param rate One of the BMP280_OSRS_P_T values.
|
||||
*/
|
||||
void setOversampleRatePressure(BMP280_OSRS_P_T rate);
|
||||
|
||||
@ -193,7 +193,7 @@ namespace upm {
|
||||
* this timer governs how long the chip will wait before
|
||||
* performing a measurement. See the data sheet for details.
|
||||
*
|
||||
* @param mode One of the BMP280_T_SB_T values.
|
||||
* @param tsb One of the BMP280_T_SB_T values.
|
||||
*/
|
||||
void setTimerStandby(BMP280_T_SB_T tsb);
|
||||
|
||||
@ -202,7 +202,7 @@ namespace upm {
|
||||
* details. This value can be automatically set to a suitable
|
||||
* value by using one of the predefined modes for setUsageMode().
|
||||
*
|
||||
* @param mode One of the BMP280_FILTER_T values.
|
||||
* @param filter One of the BMP280_FILTER_T values.
|
||||
*/
|
||||
void setFilter(BMP280_FILTER_T filter);
|
||||
|
||||
|
@ -558,7 +558,7 @@ extern "C" {
|
||||
* interrupts if they are enabled.
|
||||
*
|
||||
* @param dev The device context.
|
||||
* @param a bitmask of INT_STA_BITS_T bits to set in the interrupt
|
||||
* @param mask A bitmask of INT_STA_BITS_T bits to set in the interrupt
|
||||
* mask register.
|
||||
*/
|
||||
void bno055_set_interrupt_mask(const bno055_context dev, uint8_t mask);
|
||||
|
@ -261,7 +261,7 @@ namespace upm {
|
||||
* Write previously saved calibration data to the calibration
|
||||
* registers.
|
||||
*
|
||||
* @param calibData A vector of uint8_t (bytes) representing
|
||||
* @param calibrationData A vector of uint8_t (bytes) representing
|
||||
* calibration data as returned by readCalibrationData().
|
||||
* It's length must always be exactly BNO055_CALIBRATION_DATA_SIZE.
|
||||
* @throws std::length_error if the vector size is not equal to
|
||||
@ -572,7 +572,7 @@ namespace upm {
|
||||
* interrupt. The interrupt status register can still be used
|
||||
* to detect masked interrupts if they are enabled.
|
||||
*
|
||||
* @param a bitmask of BNO055_INT_STA_BITS_T bits to set in
|
||||
* @param mask A bitmask of BNO055_INT_STA_BITS_T bits to set in
|
||||
* the interrupt mask register.
|
||||
*/
|
||||
void setInterruptMask(uint8_t mask);
|
||||
|
@ -68,7 +68,7 @@ typedef struct _button_context {
|
||||
/**
|
||||
* button init function
|
||||
*
|
||||
* @param gpio Pin to use
|
||||
* @param pin Pin to use
|
||||
*/
|
||||
button_context button_init(int pin);
|
||||
|
||||
|
@ -59,7 +59,7 @@ class Button{
|
||||
/**
|
||||
* button constructor
|
||||
*
|
||||
* @param gpio Pin to use
|
||||
* @param pin Pin to use
|
||||
*/
|
||||
Button(unsigned int pin);
|
||||
/**
|
||||
|
@ -79,7 +79,7 @@ class CurieImu {
|
||||
/**
|
||||
* Instantiates a CurieImu object
|
||||
*
|
||||
* @param subplatformoffset Subplatform offset
|
||||
* @param subplatform_offset Subplatform offset
|
||||
*/
|
||||
CurieImu (int subplatform_offset=512);
|
||||
|
||||
|
@ -291,7 +291,7 @@ namespace upm {
|
||||
* Set the Phase Loss Voltage Threshold. See the datasheet for
|
||||
* details. This method will throw on error.
|
||||
*
|
||||
* @param dispUnits A floating point value between 1.0-99.0
|
||||
* @param phaseLoss A floating point value between 1.0-99.0
|
||||
*/
|
||||
void writePhaseLossVT(float phaseLoss);
|
||||
|
||||
@ -299,7 +299,7 @@ namespace upm {
|
||||
* Set the Phase Loss Imbalance Threshold. See the datasheet for
|
||||
* details. This method will throw on error.
|
||||
*
|
||||
* @param dispUnits A floating point value between 1.0-99.0
|
||||
* @param phaseLoss A floating point value between 1.0-99.0
|
||||
*/
|
||||
void writePhaseLossIT(float phaseLoss);
|
||||
|
||||
|
@ -126,20 +126,20 @@ extern "C" {
|
||||
float enc03r_angular_velocity(const enc03r_context dev);
|
||||
|
||||
/**
|
||||
* Set sensor offset. The offste is applied to the return value
|
||||
* Set sensor offset. The offset is applied to the return value
|
||||
* before scaling. Default is 0.
|
||||
*
|
||||
* @param dev Device context
|
||||
* @param scale Scale to apply to value
|
||||
* @param offset Offset to apply to value
|
||||
*/
|
||||
void enc03r_set_offset(const enc03r_context dev, float offset);
|
||||
|
||||
/**
|
||||
* Set sensor scale. The return value is scaled by this value
|
||||
* before the offset is applied. Default is 1.0.
|
||||
* after the offset is applied. Default is 1.0.
|
||||
*
|
||||
* @param dev Device context
|
||||
* @param scale Offset to apply to value
|
||||
* @param scale Scale to apply to value
|
||||
*/
|
||||
void enc03r_set_scale(const enc03r_context dev, float scale);
|
||||
|
||||
|
@ -60,7 +60,7 @@ class ENC03R {
|
||||
* ENC03R sensor constructor
|
||||
*
|
||||
* @param pin Analog pin to use
|
||||
* @param vref Reference voltage to use; default is 5.0 V
|
||||
* @param aref Reference voltage to use; default is 5.0 V
|
||||
*/
|
||||
ENC03R(int pin, float aref=5.0);
|
||||
|
||||
@ -104,19 +104,18 @@ class ENC03R {
|
||||
float angularVelocity();
|
||||
|
||||
/**
|
||||
* Set sensor offset. The offste is applied to the return value
|
||||
* Set sensor offset. The offset is applied to the return value
|
||||
* before scaling. Default is 0.
|
||||
*
|
||||
* @param scale Scale to apply to value
|
||||
* @param offset Offset to apply to value
|
||||
*/
|
||||
void setOffset(float offset);
|
||||
|
||||
/**
|
||||
* Set sensor scale. The return value is scaled by this value
|
||||
* before the offset is applied. Default is 1.0.
|
||||
* after the offset is applied. Default is 1.0.
|
||||
*
|
||||
* @param dev Device context
|
||||
* @param scale Offset to apply to value
|
||||
* @param scale Scale to apply to value
|
||||
*/
|
||||
void setScale(float scale);
|
||||
|
||||
|
@ -38,9 +38,9 @@ namespace upm {
|
||||
* @kit hak
|
||||
* @web http://wiki.seeed.cc/Grove-Gas_Sensor-MQ2/
|
||||
*
|
||||
* @brief API for the Grove MQ2 Gas Sensor
|
||||
* @brief API for the MQ2 Gas Sensor
|
||||
*
|
||||
* The Grove MQ2 Gas Sensor module is useful for gas leakage detection
|
||||
* The MQ2 Gas Sensor module is useful for gas leakage detection
|
||||
* (in home and industry). It can detect LPG, i-butane, methane, alcohol,
|
||||
* hydrogen, smoke, and other combustible gases. It's a medium-sensitivity
|
||||
* sensor with a detection range of 300-10,000 ppm.
|
||||
|
@ -39,7 +39,7 @@ namespace upm {
|
||||
*
|
||||
* @brief API for the MQ3 Gas Sensor
|
||||
*
|
||||
* The Grove MQ3 Gas Sensor module is useful for gas leakage detection (in
|
||||
* The MQ3 Gas Sensor module is useful for gas leakage detection (in
|
||||
* home and industry). It can detect alcohol vapors and benzine. It's
|
||||
* highly sensitive but has a long warm-up time of about 1 minute. It's
|
||||
* detection range is 0.04-4 mg/L Alcohol.
|
||||
|
@ -37,7 +37,7 @@ namespace upm {
|
||||
* @con analog
|
||||
* @web https://www.dfrobot.com/index.php?route=product/product&product_id=683
|
||||
*
|
||||
* @brief API for the DFRobot MQ4 Gas Sensor
|
||||
* @brief API for the MQ4 Gas Sensor
|
||||
*
|
||||
* The MQ4 Gas Sensor module is useful for detecting CH4 (Methane),
|
||||
* and natural gas concentrations in the air. It has a
|
||||
|
@ -40,7 +40,7 @@ namespace upm {
|
||||
*
|
||||
* @brief API for the MQ5 Gas Sensor
|
||||
*
|
||||
* The Grove MQ5 Gas Sensor module is useful for gas leakage detection
|
||||
* The MQ5 Gas Sensor module is useful for gas leakage detection
|
||||
* (in home and industry). It can detect LPG, natural gas, town gas, and so
|
||||
* on. It is highly sensitive and has a detection range of
|
||||
* 300-10,000 ppm.
|
||||
|
@ -37,7 +37,7 @@ namespace upm {
|
||||
* @con analog
|
||||
* @web https://www.dfrobot.com/wiki/index.php/LPG_Gas_Sensor(MQ6)_(SKU:SEN0131)
|
||||
*
|
||||
* @brief API for the DFRobot MQ6 LPG Gas Sensor
|
||||
* @brief API for the MQ6 LPG Gas Sensor
|
||||
*
|
||||
* The MQ6 Gas Sensor module is useful for detecting LPG,
|
||||
* iso-butane, propane, and LNG concentrations in the air. It has a
|
||||
|
@ -37,7 +37,7 @@ namespace upm {
|
||||
* @con analog
|
||||
* @web https://www.dfrobot.com/wiki/index.php/Carbon_Monoxide_Gas_Sensor(MQ7)_(SKU:SEN0132)
|
||||
*
|
||||
* @brief API for the DFRobot MQ7 CO Gas Sensor
|
||||
* @brief API for the MQ7 CO Gas Sensor
|
||||
*
|
||||
* The Grove MQ7 Gas Sensor module is useful for detecting Carbon
|
||||
* Monoxide (CO) concentrations in the air. It has a detection
|
||||
|
@ -37,7 +37,7 @@ namespace upm {
|
||||
* @con analog
|
||||
* @web https://www.dfrobot.com/wiki/index.php/Hydrogen_Gas_Sensor(MQ8)_(SKU:SEN0133)
|
||||
*
|
||||
* @brief API for the DFRobot MQ8 Hydrogen (H2) Gas Sensor
|
||||
* @brief API for the MQ8 Hydrogen (H2) Gas Sensor
|
||||
*
|
||||
* The MQ8 Gas Sensor module is useful for detecting Hydrogen gas
|
||||
* concentrations in the air. It has a detection range of 100-10000
|
||||
|
@ -31,17 +31,17 @@ namespace upm {
|
||||
/**
|
||||
* @library gas
|
||||
* @sensor tp401
|
||||
* @comname Air Quality Sensor
|
||||
* @altname TP401 Gas Sensor
|
||||
* @comname TP401 Gas Sensor
|
||||
* @altname Grove Air Quality Sensor
|
||||
* @type gaseous
|
||||
* @man seeed
|
||||
* @con analog
|
||||
* @web https://www.seeedstudio.com/Grove-Air-quality-sensor-p-1065.html
|
||||
* @kit hak
|
||||
*
|
||||
* @brief API for the Grove TP401 Air Quality Sensor
|
||||
* @brief API for the TP401 Gas Sensor
|
||||
*
|
||||
* The Grove TP401 Air Quality Sensor module is useful for monitoring air purity indoors.
|
||||
* The TP401 Gas Sensor module is useful for monitoring air purity indoors.
|
||||
* It can detect CO and a wide range of other harmful gases, but, due to a limited detection
|
||||
* range, it should be used only when qualitative results are needed. Example applications
|
||||
* are air recirculation, ventilation systems, and refreshing sprayers.
|
||||
|
@ -56,7 +56,7 @@ class GroveButton: public Grove {
|
||||
/**
|
||||
* Grove button constructor
|
||||
*
|
||||
* @param gpio Pin to use
|
||||
* @param pin Pin to use
|
||||
*/
|
||||
GroveButton(unsigned int pin);
|
||||
/**
|
||||
|
@ -61,7 +61,7 @@ class GroveLed: public Grove {
|
||||
/**
|
||||
* Grove LED constructor
|
||||
*
|
||||
* @param gpio Pin to use
|
||||
* @param pin Pin to use
|
||||
*/
|
||||
GroveLed(int pin);
|
||||
/**
|
||||
|
@ -58,7 +58,7 @@ class GroveRelay: public Grove {
|
||||
/**
|
||||
* Grove relay constructor
|
||||
*
|
||||
* @param gpio Pin to use
|
||||
* @param pin Pin to use
|
||||
*/
|
||||
GroveRelay(unsigned int pin);
|
||||
/**
|
||||
|
@ -324,7 +324,7 @@ namespace upm {
|
||||
/**
|
||||
* Sets the output data rate
|
||||
*
|
||||
* @param One of the DR_BITS_T values
|
||||
* @param odr One of the DR_BITS_T values
|
||||
* @return True if successful
|
||||
*/
|
||||
bool setDataRate(DR_BITS_T odr);
|
||||
@ -332,7 +332,7 @@ namespace upm {
|
||||
/**
|
||||
* Sets the power mode
|
||||
*
|
||||
* @param One of the PM_BITS_T values
|
||||
* @param pm One of the PM_BITS_T values
|
||||
* @return True if successful
|
||||
*/
|
||||
bool setPowerMode(PM_BITS_T pm);
|
||||
|
@ -63,8 +63,6 @@ class HCSR04 {
|
||||
*
|
||||
* @param triggerPin Pin to trigger the sensor for distance
|
||||
* @param echoPin Pulse response to triggering
|
||||
* @param fptr Function pointer to handle rising-edge and
|
||||
* falling-edge interrupts
|
||||
*/
|
||||
HCSR04 (int triggerPin, int echoPin);
|
||||
/**
|
||||
@ -74,6 +72,8 @@ class HCSR04 {
|
||||
|
||||
/**
|
||||
* Gets the distance from the sensor
|
||||
*
|
||||
* @param sys Selects units for measurement: 0 = inch, 1 = cm
|
||||
*/
|
||||
double getDistance (int sys);
|
||||
|
||||
|
@ -104,7 +104,7 @@ namespace upm {
|
||||
* range of 0C-50C. The constructor sets a default of
|
||||
* RANGE_MINUS40_50.
|
||||
*
|
||||
* @param One of the RANGE_T values, default is RANGE_MINUS40_50
|
||||
* @param range One of the RANGE_T values, default is RANGE_MINUS40_50
|
||||
*/
|
||||
void setRange(RANGE_T range=RANGE_MINUS40_50)
|
||||
{
|
||||
|
@ -372,7 +372,7 @@ namespace upm
|
||||
/**
|
||||
* Prints a string to the screen.
|
||||
*
|
||||
* @param s Message to print
|
||||
* @param msg Message to print
|
||||
*/
|
||||
void print(std::string msg);
|
||||
|
||||
|
@ -70,7 +70,7 @@ namespace upm
|
||||
/**
|
||||
* Set brightness
|
||||
*
|
||||
* @param brightness as percentage
|
||||
* @param percent brightness as percentage
|
||||
*
|
||||
* @throws std::runtime_error
|
||||
*/
|
||||
|
@ -76,8 +76,8 @@ namespace upm
|
||||
* Jhd1313m1 constructor
|
||||
*
|
||||
* @param bus I2C bus to use
|
||||
* @param address Slave address the LCD is registered on
|
||||
* @param address Slave address the RGB backlight is registered on
|
||||
* @param lcdAddress Slave address the LCD is registered on
|
||||
* @param rgbAddress Slave address the RGB backlight is registered on
|
||||
*/
|
||||
Jhd1313m1(int bus, int lcdAddress = 0x3E, int rgbAddress = 0x62);
|
||||
|
||||
|
@ -57,7 +57,7 @@ class KXCJK1013
|
||||
/**
|
||||
* KXCJK1013 Tri-axis Digital Accelerometer
|
||||
*
|
||||
* @param iio device number
|
||||
* @param device iio device number
|
||||
*/
|
||||
KXCJK1013(int device);
|
||||
|
||||
@ -70,8 +70,7 @@ class KXCJK1013
|
||||
* Installs an interrupt service routine (ISR) to be called when
|
||||
* an interrupt occurs
|
||||
*
|
||||
* @param interrupt channel
|
||||
* @param fptr Pointer to a function to be called on interrupt
|
||||
* @param isr Pointer to a function to be called on interrupt
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
@ -86,7 +85,7 @@ class KXCJK1013
|
||||
|
||||
/**
|
||||
* Enable trigger buffer
|
||||
* @param trigger buffer length in integer
|
||||
* @param length buffer length in integer
|
||||
*/
|
||||
bool enableBuffer(int length);
|
||||
|
||||
@ -105,7 +104,7 @@ class KXCJK1013
|
||||
|
||||
/**
|
||||
* Set sampling frequency
|
||||
* @param sampling frequency in float
|
||||
* @param sampling_frequency sampling frequency in float
|
||||
* Available sampling frequency are 0.781000, 1.563000, 3.125000, 6.250000, 12.500000, 25, 50,
|
||||
* 100, 200, 400, 800, and 1600
|
||||
* Default sampling frequency is 25
|
||||
|
@ -442,7 +442,7 @@ class L3GD20
|
||||
/**
|
||||
* L3GD20 Tri-axis Digital Gyroscope Contructor for IIO operation
|
||||
*
|
||||
* @param iio device number
|
||||
* @param device iio device number
|
||||
*/
|
||||
L3GD20(int device);
|
||||
|
||||
@ -482,7 +482,7 @@ class L3GD20
|
||||
/**
|
||||
* Set the power mode of the device. I2C only.
|
||||
*
|
||||
* @param power One of the POWER_MODES_T values.
|
||||
* @param mode One of the POWER_MODES_T values.
|
||||
*/
|
||||
void setPowerMode(POWER_MODES_T mode);
|
||||
|
||||
@ -543,8 +543,7 @@ class L3GD20
|
||||
* Installs an interrupt service routine (ISR) to be called when
|
||||
* an interrupt occurs. IIO only.
|
||||
*
|
||||
* @param interrupt channel
|
||||
* @param fptr Pointer to a function to be called on interrupt
|
||||
* @param isr Pointer to a function to be called on interrupt
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
@ -561,7 +560,7 @@ class L3GD20
|
||||
/**
|
||||
* Enable trigger buffer. IIO only.
|
||||
*
|
||||
* @param trigger buffer length in integer
|
||||
* @param length buffer length in integer
|
||||
*/
|
||||
bool enableBuffer(int length);
|
||||
|
||||
@ -584,7 +583,7 @@ class L3GD20
|
||||
* Set sampling frequency. IIO only. For I2C operation, use the
|
||||
* setODR() method with the appropriate ODR_CUTOFF_T value.
|
||||
*
|
||||
* @param sampling frequency in float
|
||||
* @param sampling_frequency sampling frequency in float
|
||||
* Available sampling frequency are 95, 190, 380, and 760
|
||||
* Default sampling frequency is 95
|
||||
*/
|
||||
|
@ -121,7 +121,6 @@ namespace upm
|
||||
* @param spi spi bus to use
|
||||
* @param CD Command/Data select pin
|
||||
* @param reset reset pin
|
||||
* @param address the slave address the lcd is registered on
|
||||
*/
|
||||
EBOLED(int spi=EBOLED_DEFAULT_SPI_BUS, int CD=EBOLED_DEFAULT_CD,
|
||||
int reset=EBOLED_DEFAULT_RESET);
|
||||
@ -150,8 +149,8 @@ namespace upm
|
||||
/**
|
||||
* Set cursor to a coordinate
|
||||
*
|
||||
* @param y Axis on the vertical scale. This device supports 6 rows.
|
||||
* @param x Axis on the horizontal scale This device supports 64 columns
|
||||
* @param row Axis on the vertical scale. This device supports 6 rows.
|
||||
* @param column Axis on the horizontal scale This device supports 64 columns
|
||||
*
|
||||
* @return result of operation
|
||||
*/
|
||||
@ -185,7 +184,6 @@ namespace upm
|
||||
* @param y Axis on the vertical scale
|
||||
* @param data Character to write
|
||||
* @param color Character color
|
||||
* @param bg Character background color
|
||||
* @param size Size of the font
|
||||
*/
|
||||
void drawChar (uint8_t x, uint8_t y, uint8_t data, uint8_t color, uint8_t size);
|
||||
@ -242,7 +240,7 @@ namespace upm
|
||||
*
|
||||
* @param x the x position of the beginning of the line
|
||||
* @param y the y position of the beginning of the line
|
||||
* @param width is the vertical length of the line
|
||||
* @param height is the vertical length of the line
|
||||
* @param color line is COLOR_WHITE, COLOR_BLACK or COLOR_XOR
|
||||
*/
|
||||
void drawLineVertical (int8_t x, int8_t y, uint8_t height, uint8_t color = COLOR_WHITE);
|
||||
|
@ -78,7 +78,7 @@ class SSD1327 : public LCD
|
||||
/**
|
||||
* Sets the gray level for the LCD panel
|
||||
*
|
||||
* @param gray level from 0 to 255
|
||||
* @param level level from 0 to 255
|
||||
* @return Result of the operation
|
||||
*/
|
||||
void setGrayLevel(uint8_t level);
|
||||
|
@ -64,7 +64,7 @@ class Led {
|
||||
/**
|
||||
* LED constructor
|
||||
*
|
||||
* @param gpio Pin to use
|
||||
* @param pin Pin to use
|
||||
*/
|
||||
Led(int pin);
|
||||
/**
|
||||
|
@ -89,7 +89,6 @@ namespace upm {
|
||||
/**
|
||||
* Set ADC reference voltage
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param aref ADC reference voltage
|
||||
*/
|
||||
void setAref(float aref);
|
||||
@ -98,7 +97,6 @@ namespace upm {
|
||||
* Set sensor scale. This scale is applied to the return value:
|
||||
* counts = counts * scale
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param scale count scale value used
|
||||
*/
|
||||
void setScale(float scale);
|
||||
@ -107,7 +105,6 @@ namespace upm {
|
||||
* Set sensor offset. This offset is applied to the return value:
|
||||
* value = value + offset
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param offset count offset value used
|
||||
* @return Function result code
|
||||
*/
|
||||
|
@ -91,9 +91,10 @@ class LSM303 {
|
||||
/**
|
||||
* Instantiates an LSM303 object
|
||||
*
|
||||
* @param i2c bus
|
||||
* @param addr Magnetometer
|
||||
* @param addr Accelerometer
|
||||
* @param bus I2C bus to use
|
||||
* @param addrMag I2C address of the Magnetometer (default 0x1E)
|
||||
* @param addrAcc I2C address of the Accelerometer (default 0x19)
|
||||
* @param accScale Accelerometer scale, can be 2, 4 or 8 (default 8)
|
||||
*/
|
||||
LSM303 (int bus,
|
||||
int addrMag=LSM303_MAG,
|
||||
|
@ -1060,7 +1060,8 @@ namespace upm {
|
||||
* @param bus i2c bus to use
|
||||
* @param raw bypass board definition file, set to true if using Sparkfun
|
||||
* 9DOF Block on an Intel Edison Arduino board
|
||||
* @param address the address for this device
|
||||
* @param gAddress the gyroscope address for this device
|
||||
* @param xmAddress the accelerometer/magnetometer address for this device
|
||||
*/
|
||||
LSM9DS0(int bus=LSM9DS0_I2C_BUS,
|
||||
bool raw=false,
|
||||
|
@ -43,7 +43,7 @@
|
||||
namespace upm {
|
||||
|
||||
/**
|
||||
* @brief Grove NFC Tag
|
||||
* @brief M24LR64E NFC Tag library
|
||||
* @defgroup m24lr64e libupm-m24lr64e
|
||||
* @ingroup seeed i2c other
|
||||
*/
|
||||
@ -52,15 +52,17 @@ namespace upm {
|
||||
* @library m24lr64e
|
||||
* @sensor m24lr64e
|
||||
* @comname Dynamic NFC/RFID Tag Module
|
||||
* @altname Grove NFC Tag
|
||||
* @type other
|
||||
* @man seeed
|
||||
* @web http://www.seeedstudio.com/wiki/Grove_-_NFC_Tag
|
||||
* @con i2c
|
||||
*
|
||||
* @brief C++ API for the M24LR64E-based Grove NFC Tag
|
||||
* @brief C++ API for the M24LR64E NFC Tag
|
||||
*
|
||||
* Grove NFC tag is an 8KB electrically erasable programmable read-only memory (EEPROM)
|
||||
* that can be written to or read from using I2C and NFC-equipped devices.
|
||||
* The M24LR64E NFC tag is an 8KB electrically erasable programmable
|
||||
* read-only memory (EEPROM) that can be written to or read from using
|
||||
* I2C and NFC-equipped devices.
|
||||
*
|
||||
* The user mode (default) allows read and write access to all 8KB
|
||||
* of space, provided the sector security status (SSS) allows it.
|
||||
@ -246,8 +248,8 @@ namespace upm {
|
||||
* Writes bytes to the EEPROM
|
||||
*
|
||||
* @param address Address to write to
|
||||
* @param data Data to write
|
||||
* @param data Length of the data buffer
|
||||
* @param buffer Data to write
|
||||
* @param len Length of the data buffer
|
||||
*/
|
||||
mraa::Result writeBytes(unsigned int address, uint8_t* buffer, int len);
|
||||
|
||||
|
@ -73,7 +73,7 @@ class MAX31723 {
|
||||
* Instantiates an MAX31723 object
|
||||
*
|
||||
* @param bus Number of the used bus
|
||||
* @param devAddr Address of the used I2C device
|
||||
* @param csn Chip select (slave select) pin to use
|
||||
*/
|
||||
MAX31723 (int csn);
|
||||
|
||||
|
@ -302,7 +302,7 @@ extern "C" {
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param pin GPIO pin to use as the interrupt pin.
|
||||
* @param fptr Pointer to a function to be called on interrupt.
|
||||
* @param isr Pointer to a function to be called on interrupt.
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
* @return UPM result.
|
||||
|
@ -63,7 +63,7 @@ namespace upm {
|
||||
* MCP2515 constructor.
|
||||
*
|
||||
* @param bus spi bus to use
|
||||
* @param cs_pin The GPIO pin to use for Chip Select (CS). Pass
|
||||
* @param csPin The GPIO pin to use for Chip Select (CS). Pass
|
||||
* pass -1 if your CS is handled automatically by your SPI
|
||||
* implementation (Edison).
|
||||
*/
|
||||
@ -335,7 +335,7 @@ namespace upm {
|
||||
* an interrupt occurs.
|
||||
*
|
||||
* @param pin GPIO pin to use as the interrupt pin.
|
||||
* @param fptr Pointer to a function to be called on interrupt.
|
||||
* @param isr Pointer to a function to be called on interrupt.
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
|
@ -155,7 +155,7 @@ namespace upm {
|
||||
* MCP9808 constructor
|
||||
*
|
||||
* @param bus i2c bus the sensor is attached to.
|
||||
* @param address. Device address. Default is 0x18.
|
||||
* @param address Device address. Default is 0x18.
|
||||
*/
|
||||
MCP9808 (int bus, uint8_t address = 0x18);
|
||||
|
||||
@ -180,14 +180,14 @@ namespace upm {
|
||||
/**
|
||||
* Will cause the devices to either sleep or wakeup.
|
||||
*
|
||||
* @param sleep . Bool, default true to sleep. false to wake.
|
||||
* @param sleep Bool, default true to sleep. false to wake.
|
||||
*/
|
||||
void shutDown(bool sleep = true);
|
||||
|
||||
/**
|
||||
* setMode - sets temperature reporting mode.
|
||||
*
|
||||
* @param celsius. Default is true. If false all
|
||||
* @param celsius Default is true. If false all
|
||||
* temps will be reported in fahrenheit.
|
||||
*/
|
||||
void setMode(bool celsius = true)
|
||||
@ -275,7 +275,7 @@ namespace upm {
|
||||
/**
|
||||
* Sets hysteresis value.
|
||||
*
|
||||
* @param MCP9808_CONFIG enum value HYST_0, HYST_1_5,
|
||||
* @param value MCP9808_CONFIG enum value HYST_0, HYST_1_5,
|
||||
* HYST_3_0 or HYST_6_0
|
||||
*/
|
||||
void setHysteresis(MCP9808_CONFIG value);
|
||||
|
@ -98,7 +98,7 @@ namespace upm {
|
||||
* specify those voltages here for more accurate results.
|
||||
*
|
||||
* @param ppm400 The measured reference voltage at 400 ppm
|
||||
* @param ppm40000 The measured reference voltage at 1000 ppm
|
||||
* @param ppm1000 The measured reference voltage at 1000 ppm
|
||||
*/
|
||||
void setCalibration(float ppm400, float ppm1000);
|
||||
|
||||
|
@ -50,10 +50,28 @@ typedef struct _mic_context {
|
||||
uint16_t analog_pin;
|
||||
} *mic_context;
|
||||
|
||||
/**
|
||||
* Microphone sensor initialization function
|
||||
*
|
||||
* @param pin analog pin to use
|
||||
* @return sensor context
|
||||
*/
|
||||
mic_context mic_init(int pin);
|
||||
|
||||
/**
|
||||
* Microphone sensor destructor
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
*/
|
||||
void mic_close(mic_context dev);
|
||||
|
||||
/**
|
||||
* Gets a sample from the microphone
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param micval microphone value in ADC counts
|
||||
* @return result of the operation
|
||||
*/
|
||||
upm_result_t mic_get_value(mic_context dev, float* micval);
|
||||
|
||||
#endif /* MIC_H_ */
|
||||
|
@ -65,7 +65,7 @@ namespace upm {
|
||||
* MICSV89 constructor
|
||||
*
|
||||
* @param bus i2c bus the sensor is attached to.
|
||||
* @param address. Device address. Default is 0x70.
|
||||
* @param address Device address. Default is 0x70.
|
||||
*/
|
||||
MICSV89 (int bus, uint8_t address = 0x70);
|
||||
|
||||
|
@ -208,7 +208,7 @@ extern "C" {
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param pin GPIO pin to use as the interrupt pin
|
||||
* @param fptr Pointer to a function to be called on interrupt
|
||||
* @param isr Pointer to a function to be called on interrupt
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
* @return UPM result
|
||||
|
@ -236,7 +236,7 @@ namespace upm {
|
||||
* an interrupt occurs
|
||||
*
|
||||
* @param pin GPIO pin to use as the interrupt pin
|
||||
* @param fptr Pointer to a function to be called on interrupt
|
||||
* @param isr Pointer to a function to be called on interrupt
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
|
@ -91,7 +91,7 @@ class MMC35240
|
||||
/**
|
||||
* MMC35240 Tri-axis Magnetic Sensor
|
||||
*
|
||||
* @param iio device number
|
||||
* @param device iio device number
|
||||
*/
|
||||
MMC35240(int device);
|
||||
|
||||
@ -104,8 +104,7 @@ class MMC35240
|
||||
* Installs an interrupt service routine (ISR) to be called when
|
||||
* an interrupt occurs
|
||||
*
|
||||
* @param interrupt channel
|
||||
* @param fptr Pointer to a function to be called on interrupt
|
||||
* @param isr Pointer to a function to be called on interrupt
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
@ -120,7 +119,7 @@ class MMC35240
|
||||
|
||||
/**
|
||||
* Enable trigger buffer
|
||||
* @param trigger buffer length in integer
|
||||
* @param length buffer length in integer
|
||||
*/
|
||||
bool enableBuffer(int length);
|
||||
|
||||
@ -139,7 +138,7 @@ class MMC35240
|
||||
|
||||
/**
|
||||
* Set sampling frequency
|
||||
* @param sampling frequency in float
|
||||
* @param sampling_frequency sampling frequency in float
|
||||
* Available sampling frequency are 1.5, 13, 25, 50
|
||||
* Default sampling frequency is 1.500000
|
||||
*/
|
||||
|
@ -205,7 +205,7 @@ class MPL3115A2 {
|
||||
/**
|
||||
* Converts temperature from degC*1000 to degF*1000
|
||||
*
|
||||
* @param iTemp Temperature in degC
|
||||
* @param fTemp Temperature in degC
|
||||
*/
|
||||
float convertTempCtoF(float fTemp);
|
||||
|
||||
@ -214,7 +214,7 @@ class MPL3115A2 {
|
||||
* This is set for 15degC (Pa = 0.0002961 in Hg)
|
||||
* TODO: Change the function to add temperature calibration
|
||||
*
|
||||
* @param iPressure Pressure in Pa
|
||||
* @param fPressure Pressure in Pa
|
||||
*/
|
||||
float convertPaToinHg(float fPressure);
|
||||
|
||||
|
@ -749,7 +749,7 @@ namespace upm {
|
||||
* set the Low Pass Digital filter. This enables filtering (if
|
||||
* non-0) of the accelerometer and gyro outputs.
|
||||
*
|
||||
* @param scale one of the DLPF_CFG_T values
|
||||
* @param dlp one of the DLPF_CFG_T values
|
||||
* @return true if successful, false otherwise
|
||||
*/
|
||||
bool setDigitalLowPassFilter(DLPF_CFG_T dlp);
|
||||
@ -769,7 +769,7 @@ namespace upm {
|
||||
* (DLPF) is 0 or 7 (DLPF_260_256 or DLPF_RESERVED), and 1Khz
|
||||
* otherwise.
|
||||
*
|
||||
* @param scale one of the DLPF_CFG_T values
|
||||
* @param div one of the DLPF_CFG_T values
|
||||
* @return true if successful, false otherwise
|
||||
*/
|
||||
bool setSampleRateDivider(uint8_t div);
|
||||
|
@ -121,7 +121,7 @@ extern "C" {
|
||||
* precision supported: MS5803_OSR_4096
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param dev One of the MS5803_OSR_T values.
|
||||
* @param osr One of the MS5803_OSR_T values.
|
||||
*/
|
||||
void ms5803_set_temperature_osr(const ms5803_context dev,
|
||||
MS5803_OSR_T osr);
|
||||
@ -134,7 +134,7 @@ extern "C" {
|
||||
* precision supported: MS5803_OSR_4096
|
||||
*
|
||||
* @param dev Device context.
|
||||
* @param dev One of the MS5803_OSR_T values.
|
||||
* @param osr One of the MS5803_OSR_T values.
|
||||
*/
|
||||
void ms5803_set_pressure_osr(const ms5803_context dev,
|
||||
MS5803_OSR_T osr);
|
||||
|
@ -108,7 +108,7 @@ namespace upm {
|
||||
* The default set at device intialization is the highest
|
||||
* precision supported: MS5803_OSR_4096
|
||||
*
|
||||
* @param dev One of the MS5803_OSR_T values.
|
||||
* @param osr One of the MS5803_OSR_T values.
|
||||
*/
|
||||
void setTemperatureOSR(MS5803_OSR_T osr);
|
||||
|
||||
@ -119,7 +119,7 @@ namespace upm {
|
||||
* The default set at device intialization is the highest
|
||||
* precision supported: MS5803_OSR_4096
|
||||
*
|
||||
* @param dev One of the MS5803_OSR_T values.
|
||||
* @param osr One of the MS5803_OSR_T values.
|
||||
*/
|
||||
void setPressureOSR(MS5803_OSR_T osr);
|
||||
|
||||
|
@ -218,7 +218,7 @@ class NRF24L01 {
|
||||
/**
|
||||
* Sends the buffer data
|
||||
*
|
||||
* @param *value Pointer to the buffer
|
||||
* @param value Pointer to the buffer
|
||||
*/
|
||||
void send (uint8_t * value);
|
||||
|
||||
@ -285,7 +285,7 @@ class NRF24L01 {
|
||||
/**
|
||||
* Sinks all the arrived data into a provided buffer
|
||||
*
|
||||
* @param load Size of the payload (MAX 32)
|
||||
* @param data Pointer to the buffer
|
||||
*/
|
||||
void getData (uint8_t * data);
|
||||
|
||||
|
@ -67,7 +67,6 @@ namespace upm {
|
||||
* NUNCHUCK constructor
|
||||
*
|
||||
* @param bus I2C bus to use
|
||||
* @param addr I2C address to use
|
||||
*/
|
||||
NUNCHUCK(int bus);
|
||||
|
||||
|
@ -143,7 +143,7 @@ extern "C" {
|
||||
* Enable debugging output (linux platforms only).
|
||||
*
|
||||
* @param dev Device context
|
||||
* @param true to enable some debug output, false otherwise
|
||||
* @param enable true to enable some debug output, false otherwise
|
||||
*/
|
||||
void otp538u_set_debug(const otp538u_context dev, bool enable);
|
||||
|
||||
|
@ -156,7 +156,7 @@ namespace upm {
|
||||
/**
|
||||
* Enable debugging output.
|
||||
*
|
||||
* @param true to enable some debug output, false otherwise
|
||||
* @param enable true to enable some debug output, false otherwise
|
||||
*/
|
||||
void setDebug(bool enable)
|
||||
{
|
||||
|
@ -67,7 +67,6 @@ class P9813
|
||||
* @param dataPin Data Pin
|
||||
* @param batchMode (optional) Immediately write to the LED controllers (false, default) or wait for a pushState
|
||||
* call (true)
|
||||
* @param csn (optional) Chip Select Pin
|
||||
*/
|
||||
P9813(uint16_t ledCount, uint16_t clkPin, uint16_t dataPin, bool batchMode = false);
|
||||
|
||||
|
@ -259,7 +259,7 @@ namespace upm {
|
||||
/**
|
||||
* waits for an ISO14443A target to enter the field
|
||||
*
|
||||
* @param cardbaudbate baud rate of the card, one of the BAUD_T values
|
||||
* @param cardbaudrate baud rate of the card, one of the BAUD_T values
|
||||
* @param uid Pointer to the array that will be populated with the
|
||||
* cards UID, up to 7 bytes
|
||||
* @param uidLength Pointer to the variable that will hold the
|
||||
|
@ -48,16 +48,46 @@ typedef struct _relay_context{
|
||||
mraa_gpio_context gpio;
|
||||
} *relay_context;
|
||||
|
||||
/**
|
||||
* relay init function
|
||||
*
|
||||
* @param pin Pin to use
|
||||
*/
|
||||
relay_context relay_init(int pin);
|
||||
|
||||
/**
|
||||
* relay destructor
|
||||
*/
|
||||
void relay_close(relay_context dev);
|
||||
|
||||
/**
|
||||
* Sets the relay switch to on (closed circuit). This allows current
|
||||
* to flow and lights up the indicator LED.
|
||||
*
|
||||
* @return result of the operation
|
||||
*/
|
||||
upm_result_t relay_on(relay_context dev);
|
||||
|
||||
/**
|
||||
* Sets the relay switch to off (open circuit). This stops current
|
||||
* from flowing and the indicator LED is not lit.
|
||||
*
|
||||
* @return result of the operation
|
||||
*/
|
||||
upm_result_t relay_off(relay_context dev);
|
||||
|
||||
/**
|
||||
* Checks whether the relay switch is closed.
|
||||
*
|
||||
* @return True if the switch is on (closed), false otherwise
|
||||
*/
|
||||
bool relay_is_on(relay_context dev);
|
||||
|
||||
/**
|
||||
* Checks whether the relay switch is open.
|
||||
*
|
||||
* @return True if the switch is off (open), false otherwise
|
||||
*/
|
||||
bool relay_is_off(relay_context dev);
|
||||
|
||||
#endif /* RELAY_H_ */
|
||||
|
@ -62,7 +62,7 @@ namespace upm {
|
||||
/**
|
||||
* relay constructor
|
||||
*
|
||||
* @param gpio Pin to use
|
||||
* @param pin Pin to use
|
||||
*/
|
||||
Relay(unsigned int pin);
|
||||
/**
|
||||
|
@ -51,13 +51,38 @@ typedef struct _rotary_context {
|
||||
|
||||
#define ROTARY_MAX_ANGLE 300
|
||||
|
||||
/**
|
||||
* Rotary angle sensor initialization function
|
||||
*
|
||||
* @param pin analog pin to use
|
||||
* @param aRef reference voltage
|
||||
* @return sensor context
|
||||
*/
|
||||
rotary_context rotary_init(int pin, float aRef);
|
||||
|
||||
/**
|
||||
* Rotary destructor
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
*/
|
||||
void rotary_close(rotary_context dev);
|
||||
|
||||
/**
|
||||
* Gets the voltage value from the analog pin
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param volts sensor voltage value
|
||||
* @return result of the operation
|
||||
*/
|
||||
upm_result_t rotary_get_value_voltage(const rotary_context dev, float* volts);
|
||||
|
||||
// degrees only
|
||||
/**
|
||||
* Gets the position of the rotary angle sensor in degrees
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param rotval sensor position in degrees
|
||||
* @return result of the operation
|
||||
*/
|
||||
upm_result_t rotary_get_value_angle(rotary_context dev, float* rotval);
|
||||
|
||||
#endif /* ROTARY_H_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
namespace upm {
|
||||
|
||||
/**
|
||||
* @brief Rotary library
|
||||
* @brief Rotary Angle Sensor library
|
||||
* @defgroup rotary libupm-rotary
|
||||
* @ingroup seeed analog ainput gsk
|
||||
*/
|
||||
@ -43,7 +43,7 @@ namespace upm {
|
||||
* @library rotary
|
||||
* @sensor rotary
|
||||
* @comname Rotary Angle Sensor
|
||||
* @altname Rotary Potentiometer
|
||||
* @altname Rotary Potentiometer, Grove Rotary Angle Sensor
|
||||
* @type ainput
|
||||
* @man seeed
|
||||
* @web http://wiki.seeed.cc/Grove-Rotary_Angle_Sensor/
|
||||
@ -52,9 +52,9 @@ namespace upm {
|
||||
*
|
||||
* @brief API for the Rotary Angle Sensor (Knob)
|
||||
*
|
||||
* Basic UPM module for the rotary angle sensor (knob) on analog. Provides
|
||||
* a set of functions to read the absolute pin value, degrees or radians, and another set
|
||||
* to do the same relative to the center of the knob's range.
|
||||
* Basic UPM module for the rotary angle sensor (knob) on analog. Provides a
|
||||
* set of functions to read the absolute pin value, degrees or radians, and
|
||||
* another set to do the same relative to the center of the knob's range.
|
||||
*
|
||||
* @image html rotary.jpg
|
||||
* @snippet rotary.cxx Interesting
|
||||
@ -62,7 +62,7 @@ namespace upm {
|
||||
class Rotary{
|
||||
public:
|
||||
/**
|
||||
* Grove rotary angle sensor constructor
|
||||
* Rotary angle sensor constructor
|
||||
*
|
||||
* @param pin Number of the analog pin to use
|
||||
*/
|
||||
|
@ -90,7 +90,7 @@ namespace upm {
|
||||
* Installs an ISR to be called when
|
||||
* black is detected
|
||||
*
|
||||
* @param fptr Pointer to a function to be called on interrupt
|
||||
* @param isr Pointer to a function to be called on interrupt
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
|
@ -62,7 +62,6 @@ class SI1132 : public ILightSensor {
|
||||
* Instanciates a Si1132 object
|
||||
*
|
||||
* @param bus number of used bus
|
||||
* @param devAddr address of used i2c device
|
||||
*/
|
||||
SI1132 (int bus);
|
||||
|
||||
|
@ -65,8 +65,7 @@ class SI7005 : public ITemperatureSensor, public IHumiditySensor {
|
||||
* Instantiates a SI7005 object
|
||||
*
|
||||
* @param bus number of used bus
|
||||
* @param devAddr address of used i2c device
|
||||
* @param pin mraa gpio number for chip select pin
|
||||
* @param pin gpio number for chip select pin
|
||||
*/
|
||||
SI7005 (int bus, int pin);
|
||||
|
||||
|
@ -154,7 +154,8 @@ class SmartDrive {
|
||||
public:
|
||||
/**
|
||||
* Initialize the class with the i2c address of your SmartDrive
|
||||
* @param SmartDrive_address Address of your SmartDrive.
|
||||
* @param i2c_bus I2C bus to use.
|
||||
* @param address Address of your SmartDrive.
|
||||
*/
|
||||
SmartDrive(int i2c_bus, int address = SmartDrive_DefaultAddress);
|
||||
|
||||
@ -238,7 +239,6 @@ public:
|
||||
/**
|
||||
* Turns the specified motor(s) for given absolute tacheometer count
|
||||
* @param motor_id Number of the motor(s) you wish to turn.
|
||||
* @param direction The direction you wish to turn the motor(s).
|
||||
* @param speed The speed at which you wish to turn the motor(s).
|
||||
* @param tacho_count The absolute tacheometer count you wish to turn the motor(s).
|
||||
* @param wait_for_completion Tells the program when to handle the next line of code.
|
||||
|
@ -134,7 +134,7 @@ class StepMotor {
|
||||
* Sets the current position. Useful if the motor is not at 0 when the
|
||||
* driver is initialized.
|
||||
*
|
||||
* @param step Current position
|
||||
* @param pos Current position
|
||||
*/
|
||||
void setPosition (int pos);
|
||||
|
||||
|
@ -1577,7 +1577,7 @@ namespace upm {
|
||||
* @param chipRev chip revision, default is 0x12
|
||||
* @param bus spi bus to use
|
||||
* @param cs GPIO pin to use as SPI Chip Select
|
||||
* @param reset GPIO pin to use as reset (A0=GPIO14)
|
||||
* @param resetPin GPIO pin to use as reset (A0=GPIO14)
|
||||
* @param dio0 GPIO pin to use as reset DIO0 intr
|
||||
* @param dio1 GPIO pin to use as reset DIO1 intr
|
||||
* @param dio2 GPIO pin to use as reset DIO2 intr
|
||||
@ -1685,7 +1685,7 @@ namespace upm {
|
||||
*
|
||||
* @param modem One of the MODEM_T values
|
||||
* @param freq The channel to check
|
||||
* @param rssiThreshold The RSSI threshold, over which the channel
|
||||
* @param rssiThresh The RSSI threshold, over which the channel
|
||||
* os considerd in use.
|
||||
*/
|
||||
bool isChannelFree(RADIO_MODEM_T modem, uint32_t freq, int16_t rssiThresh);
|
||||
@ -1742,10 +1742,10 @@ namespace upm {
|
||||
* @param fixLen Fixed length packets [false: variable, true: fixed]
|
||||
* @param payloadLen Sets payload length when fixed length is used
|
||||
* @param crcOn Enables/Disables the CRC [false: OFF, true: ON]
|
||||
* @param FreqHopOn Enables disables the intra-packet frequency hopping
|
||||
* @param freqHopOn Enables disables the intra-packet frequency hopping
|
||||
* FSK : N/A ( set to 0 )
|
||||
* LoRa: [false: OFF, true: ON]
|
||||
* @param HopPeriod Number of symbols bewteen each hop
|
||||
* @param hopPeriod Number of symbols bewteen each hop
|
||||
* FSK : N/A ( set to 0 )
|
||||
* LoRa: Number of symbols
|
||||
* @param iqInverted Inverts IQ signals (LoRa only)
|
||||
@ -1789,10 +1789,10 @@ namespace upm {
|
||||
* 4 more symbols)
|
||||
* @param fixLen Fixed length packets [false: variable, true: fixed]
|
||||
* @param crcOn Enables disables the CRC [false: OFF, true: ON]
|
||||
* @param FreqHopOn Enables disables the intra-packet frequency hopping
|
||||
* @param freqHopOn Enables disables the intra-packet frequency hopping
|
||||
* FSK : N/A ( set to 0 )
|
||||
* LoRa: [false: OFF, true: ON]
|
||||
* @param HopPeriod Number of symbols bewteen each hop
|
||||
* @param hopPeriod Number of symbols bewteen each hop
|
||||
* FSK : N/A ( set to 0 )
|
||||
* LoRa: Number of symbols
|
||||
* @param iqInverted Inverts IQ signals (LoRa only)
|
||||
|
@ -48,12 +48,28 @@ typedef struct _temperature_context {
|
||||
int16_t m_aRes;
|
||||
} *temperature_context;
|
||||
|
||||
|
||||
/**
|
||||
* Analog temperature sensor initialization function
|
||||
*
|
||||
* @param pin analog pin to use
|
||||
* @return sensor context
|
||||
*/
|
||||
temperature_context temperature_init(int pin);
|
||||
|
||||
/**
|
||||
* Analog temperature sensor destructor
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
*/
|
||||
void temperature_close(temperature_context dev);
|
||||
|
||||
// Celsius
|
||||
/**
|
||||
* Gets the temperature in Celsius from the sensor
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param tempval temperature value in Celsius
|
||||
* @return result of the operation
|
||||
*/
|
||||
upm_result_t temperature_get_value(temperature_context dev,
|
||||
float* tempval);
|
||||
|
||||
|
@ -46,14 +46,14 @@ namespace upm {
|
||||
* @con analog
|
||||
* @kit gsk
|
||||
*
|
||||
* @brief API for the Grove Temperature Sensor
|
||||
* @brief API for NTC Temperature Sensors
|
||||
*
|
||||
* Basic UPM module for the Grove temperature sensor on analog. This sensor
|
||||
* uses a NTC thermistor to measure ambient temperature. The conversion formula
|
||||
* has been updated to work with versions 1.1 and 1.2 of the sensor. For the
|
||||
* older v1.0 sensor you will have to specify R0 and B values when initializing
|
||||
* the device. The range of this sensor is -40 to 125 C and accuracy is +/- 1.5
|
||||
* C.
|
||||
* Basic UPM module for analog temperature sensors. These sensors use a NTC
|
||||
* thermistor to measure ambient temperature. This driver was developed using
|
||||
* the Grove Temperature Sensor. The conversion formula has been updated
|
||||
* to work with versions 1.1 and 1.2 of the sensor. For the older v1.0
|
||||
* sensor you will have to specify R0 and B values when initializing the
|
||||
* device. The range of this sensor is -40 to 125 C and accuracy is +/- 1.5 C.
|
||||
*
|
||||
* @image html temp.jpg
|
||||
* @snippet temperature.cxx Interesting
|
||||
@ -61,7 +61,7 @@ namespace upm {
|
||||
class Temperature {
|
||||
public:
|
||||
/**
|
||||
* Grove analog temperature sensor constructor
|
||||
* Analog temperature sensor constructor
|
||||
*
|
||||
* @param pin Analog pin to use
|
||||
* @param scale Scaling factor for raw analog value from the ADC,
|
||||
@ -73,7 +73,7 @@ class Temperature {
|
||||
*/
|
||||
Temperature(unsigned int pin, float scale = 1.0, int r0 = 100000, int b = 4275);
|
||||
/**
|
||||
* Temperature destructor
|
||||
* Analog temperature sensor destructor
|
||||
*/
|
||||
~Temperature();
|
||||
/**
|
||||
@ -82,7 +82,7 @@ class Temperature {
|
||||
* @return Raw value from the ADC
|
||||
*/
|
||||
float raw_value();
|
||||
/* Provided for compatibility with old grove base class
|
||||
/** Provided for compatibility with old grove base class
|
||||
*
|
||||
* @return Sensor name
|
||||
*/
|
||||
|
@ -169,7 +169,7 @@ class TMP006 {
|
||||
*
|
||||
* @param rawv Object voltage value
|
||||
* @param rawt Raw die temperature value
|
||||
* @param tamp Converted ambient temperature
|
||||
* @param tamb Converted ambient temperature
|
||||
* @param tobj Converted object temperature
|
||||
*/
|
||||
void convert_data(int16_t rawv,int16_t rawt, float *tamb, float *tobj);
|
||||
|
@ -116,7 +116,7 @@ typedef struct _tsl2561_context {
|
||||
* @param bus I2C bus
|
||||
* @param dev_address I2C address
|
||||
* @param gain Gain associated with the driver
|
||||
* @param integration_time
|
||||
* @param integration_time Time to keep the shutter open
|
||||
* @return void* pointer to the sensor struct
|
||||
*/
|
||||
tsl2561_context tsl2561_init(int bus, uint8_t dev_address, uint8_t gain,
|
||||
|
@ -123,7 +123,7 @@ class TSL2561{
|
||||
* @param bus Number of the used bus
|
||||
* @param devAddr Address of the used I2C device
|
||||
* @param gain Correct gain to use
|
||||
* @param integration Time to use
|
||||
* @param integrationTime Time to keep the shutter open
|
||||
*/
|
||||
TSL2561(int bus=0, uint8_t devAddr=TSL2561_Address, uint8_t gain=GAIN_0X, uint8_t integrationTime=INTEGRATION_TIME1_101MS);
|
||||
|
||||
|
@ -75,15 +75,26 @@ void ttp223_close(ttp223_context dev);
|
||||
upm_result_t ttp223_is_pressed(ttp223_context dev, bool* value);
|
||||
|
||||
/**
|
||||
* Installs an interrupt service routine (ISR) to be called when
|
||||
* the button is activated or deactivated.
|
||||
*
|
||||
* @param dev pointer to the sensor struct
|
||||
* @param edge_level one of mraa_gpio_edge_t values
|
||||
* @param isr pointer to a function to be called on interrupt
|
||||
* @param arg pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
* @result upm_result_t UPM success/error code
|
||||
*/
|
||||
upm_result_t ttp223_install_isr(ttp223_context dev,
|
||||
mraa_gpio_edge_t edge_level,
|
||||
void (*isr)(void *), void *arg);
|
||||
|
||||
/**
|
||||
* Uninstall a previously installed interrupt handler
|
||||
*
|
||||
* @param dev pointer to the sensor struct
|
||||
* @result upm_result_t UPM success/error code
|
||||
*/
|
||||
upm_result_t ttp223_uninstall_isr(ttp223_context);
|
||||
upm_result_t ttp223_uninstall_isr(ttp223_context dev);
|
||||
|
||||
#endif /* TTP223_H_ */
|
||||
|
@ -91,7 +91,7 @@ class TTP223 {
|
||||
* Installs an interrupt service routine (ISR) to be called when
|
||||
* the button is activated or deactivated.
|
||||
*
|
||||
* @param fptr Pointer to a function to be called on interrupt
|
||||
* @param isr Pointer to a function to be called on interrupt
|
||||
* @param arg Pointer to an object to be supplied as an
|
||||
* argument to the ISR.
|
||||
*/
|
||||
|
@ -103,7 +103,7 @@ namespace upm {
|
||||
* Set the default time, in milliseconds, to wait for data to
|
||||
* arrive after sending a command.
|
||||
*
|
||||
* @param wait_ms The response delay to set, in milliseconds.
|
||||
* @param wait_time The response delay to set, in milliseconds.
|
||||
*/
|
||||
void setResponseWaitTime(unsigned int wait_time);
|
||||
|
||||
@ -192,7 +192,7 @@ namespace upm {
|
||||
* return ("\r").
|
||||
* @param resp_len The maximum number of characters to read from the
|
||||
* device.
|
||||
* @param wait_string The string to look for. If found, the
|
||||
* @param waitString The string to look for. If found, the
|
||||
* response will be returned immediately regardless of the
|
||||
* timeout setting.
|
||||
* @param millis The maximum number of milliseconds to wait
|
||||
|
@ -28,7 +28,7 @@
|
||||
namespace upm {
|
||||
|
||||
/**
|
||||
* @brief Grove Water Flow Sensor library
|
||||
* @brief Water Flow Sensor library
|
||||
* @defgroup wfs libupm-wfs
|
||||
* @ingroup seeed gpio liquid eak
|
||||
*/
|
||||
@ -44,7 +44,7 @@ namespace upm {
|
||||
* @con gpio
|
||||
* @kit eak
|
||||
|
||||
* @brief API for the Grove Water Flow Sensor
|
||||
* @brief API for the Water Flow Sensor
|
||||
*
|
||||
* This sensor is used to measure water flow in liters per
|
||||
* minute (LPM). It incorporates a Hall Effect sensor. The UPM module
|
||||
@ -65,7 +65,7 @@ namespace upm {
|
||||
class WFS {
|
||||
public:
|
||||
/**
|
||||
* Grove Water Flow sensor constructor
|
||||
* Water Flow Sensor constructor
|
||||
*
|
||||
* @param pin Digital pin to use
|
||||
*/
|
||||
|
@ -172,7 +172,7 @@ namespace upm {
|
||||
/**
|
||||
* Gets a command response and returns its validity
|
||||
*
|
||||
* @param index Opcode to verify
|
||||
* @param opcode Opcode to verify
|
||||
* @return True if successful
|
||||
*/
|
||||
bool checkResponse(WT5001_OPCODE_T opcode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user