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:
Mihai Tudor Panu 2017-04-10 16:59:39 -07:00
parent 39df7fd10f
commit 3aef2ea70e
94 changed files with 327 additions and 222 deletions

View File

@ -81,7 +81,7 @@ namespace upm {
* Installs an interrupt service routine (ISR) to be called when * Installs an interrupt service routine (ISR) to be called when
* the appropriate magnetic field is detected * 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 * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */

View File

@ -111,7 +111,7 @@ float abp_get_temperature(abp_context dev);
* value of 5 will be set. * value of 5 will be set.
* *
* @param dev abp_context pointer * @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); void abp_set_max_pressure(abp_context dev, int max);

View File

@ -105,7 +105,7 @@ namespace upm {
* not explicitly called to the set the min value, then a default max * not explicitly called to the set the min value, then a default max
* value of 5 will be set. * value of 5 will be set.
* *
* @param min int minimum pressure value possible * @param max int maximum pressure value possible
*/ */
void setMaxPressure(int max); void setMaxPressure(int max);

View File

@ -58,12 +58,28 @@ typedef struct _ad8232_context {
} *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); ad8232_context ad8232_init(int lo_plus, int lo_minus, int output, float a_ref);
/**
* Sensor destructor
*/
void ad8232_close(ad8232_context dev); 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); upm_result_t ad8232_get_value(ad8232_context dev, int* value);
#endif /* AD8232_H_ */ #endif /* AD8232_H_ */

View File

@ -80,6 +80,7 @@ namespace upm {
* @param loPlus Digital pin to use for LO+ * @param loPlus Digital pin to use for LO+
* @param loMinus Digital pin to use for LO- * @param loMinus Digital pin to use for LO-
* @param output Analog pin to read the data * @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); AD8232(int loPlus, int loMinus, int output, float aref=AD8232_DEFAULT_AREF);

View File

@ -120,8 +120,8 @@ namespace upm {
* to set gain so it matches full scale value of input * to set gain so it matches full scale value of input
* *
* @param bus i2c bus the sensor is attached to. * @param bus i2c bus the sensor is attached to.
* @param address. Optional device address. Default is 0x48. * @param address Optional device address. Default is 0x48.
* @param vref. Optional reference (i.e. half full swing) voltage. Default is 2.048V * @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); 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 * needs to be overridden in subclasses as the ADS1115 and
* ADS1015 have different sample rates. * ADS1015 have different sample rates.
* *
* @param ADSSAMPLERATE enum * @param rate ADSSAMPLERATE enum
*/ */
void setSPS(ADSSAMPLERATE rate = SPS_1600); void setSPS(ADSSAMPLERATE rate = SPS_1600);

View File

@ -119,7 +119,7 @@ namespace upm {
* ADS1X15 constructor * ADS1X15 constructor
* *
* @param bus i2c bus the sensor is attached to. * @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); ADS1115 (int bus, uint8_t address = 0x48);
@ -133,7 +133,7 @@ namespace upm {
* needs to be overridden in subclasses as the ADS1115 and * needs to be overridden in subclasses as the ADS1115 and
* ADS1015 have different sample rates. * ADS1015 have different sample rates.
* *
* @param ADSSAMPLERATE enum * @param rate ADSSAMPLERATE enum
*/ */
void setSPS(ADSDATARATE rate = ADS1115::SPS_128); void setSPS(ADSDATARATE rate = ADS1115::SPS_128);

View File

@ -212,7 +212,7 @@ namespace upm {
* ADS1X15 constructor * ADS1X15 constructor
* *
* @param bus i2c bus the sensor is attached to. * @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); ADS1X15(int bus, uint8_t address);

View File

@ -84,7 +84,6 @@ class AM2315 {
* *
* @param bus Number of the used bus * @param bus Number of the used bus
* @param devAddr Address of the used I2C device * @param devAddr Address of the used I2C device
* @param mode AM2315 oversampling
*/ */
AM2315 (int bus, int devAddr=AM2315_I2C_ADDRESS); AM2315 (int bus, int devAddr=AM2315_I2C_ADDRESS);

View File

@ -57,7 +57,7 @@ class APDS9930
/** /**
* APDS-9930 digital proximity and ambient light sensor constructor * APDS-9930 digital proximity and ambient light sensor constructor
* *
* @param iio device number * @param device iio device number
*/ */
APDS9930(int device); APDS9930(int device);
/** /**

View File

@ -477,7 +477,7 @@ namespace upm {
* BMA220 constructor * BMA220 constructor
* *
* @param bus i2c bus to use * @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); BMA220(int bus=BMA220_I2C_BUS, uint8_t addr=BMA220_DEFAULT_ADDR);
@ -494,7 +494,6 @@ namespace upm {
/** /**
* read a register * read a register
* *
* @param dev the device to access (XM or G)
* @param reg the register to read * @param reg the register to read
* @return the value of the register * @return the value of the register
*/ */
@ -503,7 +502,6 @@ namespace upm {
/** /**
* write to a register * write to a register
* *
* @param dev the device to access (XM or G)
* @param reg the register to write to * @param reg the register to write to
* @param val the value to write * @param val the value to write
* @return true if successful, false otherwise * @return true if successful, false otherwise

View File

@ -354,7 +354,7 @@ extern "C" {
* pin. See the datasheet for details. * pin. See the datasheet for details.
* *
* @param dev The device context. * @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. * @return UPM result.
*/ */
upm_result_t bma250e_set_interrupt_map0(const bma250e_context dev, upm_result_t bma250e_set_interrupt_map0(const bma250e_context dev,
@ -374,7 +374,7 @@ extern "C" {
* details. * details.
* *
* @param dev The device context. * @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. * @return UPM result.
*/ */
upm_result_t bma250e_set_interrupt_map1(const bma250e_context dev, upm_result_t bma250e_set_interrupt_map1(const bma250e_context dev,
@ -394,7 +394,7 @@ extern "C" {
* details. * details.
* *
* @param dev The device context. * @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. * @return UPM result.
*/ */
upm_result_t bma250e_set_interrupt_map2(const bma250e_context dev, upm_result_t bma250e_set_interrupt_map2(const bma250e_context dev,

View File

@ -327,7 +327,7 @@ namespace upm {
* to map specific interrupts to the interrupt 1 or interrupt 2 * to map specific interrupts to the interrupt 1 or interrupt 2
* pin. See the datasheet for details. * 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. * @throws std::runtime_error on failure.
*/ */
void setInterruptMap0(uint8_t bits); void setInterruptMap0(uint8_t bits);
@ -344,7 +344,7 @@ namespace upm {
* Set the Interrupt Map 1 register. See the datasheet for * Set the Interrupt Map 1 register. See the datasheet for
* details. * 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. * @throws std::runtime_error on failure.
*/ */
void setInterruptMap1(uint8_t bits); void setInterruptMap1(uint8_t bits);
@ -361,7 +361,7 @@ namespace upm {
* Set the Interrupt Map 2 register. See the datasheet for * Set the Interrupt Map 2 register. See the datasheet for
* details. * 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. * @throws std::runtime_error on failure.
*/ */
void setInterruptMap2(uint8_t bits); void setInterruptMap2(uint8_t bits);

View File

@ -284,7 +284,7 @@ extern "C" {
* pin. See the datasheet for details. * pin. See the datasheet for details.
* *
* @param dev The device context. * @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. * @return UPM result.
*/ */
upm_result_t bmg160_set_interrupt_map0(const bmg160_context dev, upm_result_t bmg160_set_interrupt_map0(const bmg160_context dev,
@ -304,7 +304,7 @@ extern "C" {
* details. * details.
* *
* @param dev The device context. * @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. * @return UPM result.
*/ */
upm_result_t bmg160_set_interrupt_map1(const bmg160_context dev, upm_result_t bmg160_set_interrupt_map1(const bmg160_context dev,

View File

@ -263,7 +263,7 @@ namespace upm {
* to map specific interrupts to the interrupt 1 or interrupt 2 * to map specific interrupts to the interrupt 1 or interrupt 2
* pin. See the datasheet for details. * 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. * @throws std::runtime_error on failure.
*/ */
void setInterruptMap0(uint8_t bits); void setInterruptMap0(uint8_t bits);
@ -280,7 +280,7 @@ namespace upm {
* Set the Interrupt Map 1 register. See the datasheet for * Set the Interrupt Map 1 register. See the datasheet for
* details. * 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. * @throws std::runtime_error on failure.
*/ */
void setInterruptMap1(uint8_t bits); void setInterruptMap1(uint8_t bits);

View File

@ -82,7 +82,7 @@ namespace upm {
* @param bus i2c bus to use * @param bus i2c bus to use
* @param address The address for this device if using I2C. If * @param address The address for this device if using I2C. If
* using SPI, supply -1 for this parameter. * 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 * only needed for SPI, and only if your SPI implementation
* requires it. Otherwise, just pass -1 if not using SPI, or your * requires it. Otherwise, just pass -1 if not using SPI, or your
* CS is handled automatically by your SPI implementation. * CS is handled automatically by your SPI implementation.

View File

@ -192,7 +192,7 @@ namespace upm {
* Set the operating mode of the device. See the datasheet for * Set the operating mode of the device. See the datasheet for
* details. * 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. * @throws std::runtime_error on failure.
*/ */
void setOpmode(BMM150_OPERATION_MODE_T opmode); void setOpmode(BMM150_OPERATION_MODE_T opmode);

View File

@ -75,7 +75,7 @@ namespace upm {
* operating mode is I2C. * operating mode is I2C.
* *
* @param bus I2C or SPI bus to use. * @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 * @param cs The gpio pin to use for the SPI Chip Select. Use -1
* for I2C, or for SPI with a hardware controlled pin. * for I2C, or for SPI with a hardware controlled pin.
* @throws std::runtime_error on failure. * @throws std::runtime_error on failure.
@ -104,7 +104,7 @@ namespace upm {
* suitable value by using one of the predefined modes for * suitable value by using one of the predefined modes for
* setUsageMode(). * 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); void setOversampleRateHumidity(BME280_OSRS_H_T rate);

View File

@ -236,7 +236,7 @@ extern "C" {
* bmp280_set_usage_mode(). * bmp280_set_usage_mode().
* *
* @param dev Device context. * @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, void bmp280_set_oversample_rate_temperature(const bmp280_context dev,
BMP280_OSRS_T_T rate); BMP280_OSRS_T_T rate);
@ -248,7 +248,7 @@ extern "C" {
* bmp280_set_usage_mode(). * bmp280_set_usage_mode().
* *
* @param dev Device context. * @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, void bmp280_set_oversample_rate_pressure(const bmp280_context dev,
BMP280_OSRS_P_T rate); BMP280_OSRS_P_T rate);
@ -260,7 +260,7 @@ extern "C" {
* predefined modes for bmp280_set_usage_mode(). * predefined modes for bmp280_set_usage_mode().
* *
* @param dev Device context. * @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, void bmp280_set_oversample_rate_humidity(const bmp280_context dev,
BME280_OSRS_H_T rate); BME280_OSRS_H_T rate);
@ -271,7 +271,7 @@ extern "C" {
* performing a measurement. See the data sheet for details. * performing a measurement. See the data sheet for details.
* *
* @param dev Device context. * @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, void bmp280_set_timer_standby(const bmp280_context dev,
BMP280_T_SB_T tsb); BMP280_T_SB_T tsb);
@ -283,7 +283,7 @@ extern "C" {
* bmp280_set_usage_mode(). * bmp280_set_usage_mode().
* *
* @param dev Device context. * @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); void bmp280_set_filter(const bmp280_context dev, BMP280_FILTER_T filter);

View File

@ -85,7 +85,7 @@ namespace upm {
* operating mode is I2C. * operating mode is I2C.
* *
* @param bus I2C or SPI bus to use. * @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 * @param cs The gpio pin to use for the SPI Chip Select. Use -1
* for I2C, or for SPI with a hardware controlled pin. * for I2C, or for SPI with a hardware controlled pin.
* @throws std::runtime_error on failure. * @throws std::runtime_error on failure.
@ -174,7 +174,7 @@ namespace upm {
* a suitable value by using one of the predefined modes for * a suitable value by using one of the predefined modes for
* setUsageMode(). * 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); void setOversampleRateTemperature(BMP280_OSRS_T_T rate);
@ -184,7 +184,7 @@ namespace upm {
* a suitable value by using one of the predefined modes for * a suitable value by using one of the predefined modes for
* setUsageMode(). * 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); void setOversampleRatePressure(BMP280_OSRS_P_T rate);
@ -193,7 +193,7 @@ namespace upm {
* this timer governs how long the chip will wait before * this timer governs how long the chip will wait before
* performing a measurement. See the data sheet for details. * 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); void setTimerStandby(BMP280_T_SB_T tsb);
@ -202,7 +202,7 @@ namespace upm {
* details. This value can be automatically set to a suitable * details. This value can be automatically set to a suitable
* value by using one of the predefined modes for setUsageMode(). * 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); void setFilter(BMP280_FILTER_T filter);

View File

@ -558,7 +558,7 @@ extern "C" {
* interrupts if they are enabled. * interrupts if they are enabled.
* *
* @param dev The device context. * @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. * mask register.
*/ */
void bno055_set_interrupt_mask(const bno055_context dev, uint8_t mask); void bno055_set_interrupt_mask(const bno055_context dev, uint8_t mask);

View File

@ -261,7 +261,7 @@ namespace upm {
* Write previously saved calibration data to the calibration * Write previously saved calibration data to the calibration
* registers. * 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(). * calibration data as returned by readCalibrationData().
* It's length must always be exactly BNO055_CALIBRATION_DATA_SIZE. * It's length must always be exactly BNO055_CALIBRATION_DATA_SIZE.
* @throws std::length_error if the vector size is not equal to * @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 * interrupt. The interrupt status register can still be used
* to detect masked interrupts if they are enabled. * 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. * the interrupt mask register.
*/ */
void setInterruptMask(uint8_t mask); void setInterruptMask(uint8_t mask);

View File

@ -68,7 +68,7 @@ typedef struct _button_context {
/** /**
* button init function * button init function
* *
* @param gpio Pin to use * @param pin Pin to use
*/ */
button_context button_init(int pin); button_context button_init(int pin);

View File

@ -59,7 +59,7 @@ class Button{
/** /**
* button constructor * button constructor
* *
* @param gpio Pin to use * @param pin Pin to use
*/ */
Button(unsigned int pin); Button(unsigned int pin);
/** /**

View File

@ -79,7 +79,7 @@ class CurieImu {
/** /**
* Instantiates a CurieImu object * Instantiates a CurieImu object
* *
* @param subplatformoffset Subplatform offset * @param subplatform_offset Subplatform offset
*/ */
CurieImu (int subplatform_offset=512); CurieImu (int subplatform_offset=512);

View File

@ -291,7 +291,7 @@ namespace upm {
* Set the Phase Loss Voltage Threshold. See the datasheet for * Set the Phase Loss Voltage Threshold. See the datasheet for
* details. This method will throw on error. * 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); void writePhaseLossVT(float phaseLoss);
@ -299,7 +299,7 @@ namespace upm {
* Set the Phase Loss Imbalance Threshold. See the datasheet for * Set the Phase Loss Imbalance Threshold. See the datasheet for
* details. This method will throw on error. * 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); void writePhaseLossIT(float phaseLoss);

View File

@ -126,20 +126,20 @@ extern "C" {
float enc03r_angular_velocity(const enc03r_context dev); 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. * before scaling. Default is 0.
* *
* @param dev Device context * @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); void enc03r_set_offset(const enc03r_context dev, float offset);
/** /**
* Set sensor scale. The return value is scaled by this value * 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 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); void enc03r_set_scale(const enc03r_context dev, float scale);

View File

@ -60,7 +60,7 @@ class ENC03R {
* ENC03R sensor constructor * ENC03R sensor constructor
* *
* @param pin Analog pin to use * @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); ENC03R(int pin, float aref=5.0);
@ -104,19 +104,18 @@ class ENC03R {
float angularVelocity(); 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. * before scaling. Default is 0.
* *
* @param scale Scale to apply to value * @param offset Offset to apply to value
*/ */
void setOffset(float offset); void setOffset(float offset);
/** /**
* Set sensor scale. The return value is scaled by this value * 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 Scale to apply to value
* @param scale Offset to apply to value
*/ */
void setScale(float scale); void setScale(float scale);

View File

@ -38,9 +38,9 @@ namespace upm {
* @kit hak * @kit hak
* @web http://wiki.seeed.cc/Grove-Gas_Sensor-MQ2/ * @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, * (in home and industry). It can detect LPG, i-butane, methane, alcohol,
* hydrogen, smoke, and other combustible gases. It's a medium-sensitivity * hydrogen, smoke, and other combustible gases. It's a medium-sensitivity
* sensor with a detection range of 300-10,000 ppm. * sensor with a detection range of 300-10,000 ppm.

View File

@ -39,7 +39,7 @@ namespace upm {
* *
* @brief API for the MQ3 Gas Sensor * @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 * 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 * highly sensitive but has a long warm-up time of about 1 minute. It's
* detection range is 0.04-4 mg/L Alcohol. * detection range is 0.04-4 mg/L Alcohol.

View File

@ -37,7 +37,7 @@ namespace upm {
* @con analog * @con analog
* @web https://www.dfrobot.com/index.php?route=product/product&product_id=683 * @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), * The MQ4 Gas Sensor module is useful for detecting CH4 (Methane),
* and natural gas concentrations in the air. It has a * and natural gas concentrations in the air. It has a

View File

@ -40,7 +40,7 @@ namespace upm {
* *
* @brief API for the MQ5 Gas Sensor * @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 * (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 * on. It is highly sensitive and has a detection range of
* 300-10,000 ppm. * 300-10,000 ppm.

View File

@ -37,7 +37,7 @@ namespace upm {
* @con analog * @con analog
* @web https://www.dfrobot.com/wiki/index.php/LPG_Gas_Sensor(MQ6)_(SKU:SEN0131) * @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, * The MQ6 Gas Sensor module is useful for detecting LPG,
* iso-butane, propane, and LNG concentrations in the air. It has a * iso-butane, propane, and LNG concentrations in the air. It has a

View File

@ -37,7 +37,7 @@ namespace upm {
* @con analog * @con analog
* @web https://www.dfrobot.com/wiki/index.php/Carbon_Monoxide_Gas_Sensor(MQ7)_(SKU:SEN0132) * @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 * The Grove MQ7 Gas Sensor module is useful for detecting Carbon
* Monoxide (CO) concentrations in the air. It has a detection * Monoxide (CO) concentrations in the air. It has a detection

View File

@ -37,7 +37,7 @@ namespace upm {
* @con analog * @con analog
* @web https://www.dfrobot.com/wiki/index.php/Hydrogen_Gas_Sensor(MQ8)_(SKU:SEN0133) * @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 * The MQ8 Gas Sensor module is useful for detecting Hydrogen gas
* concentrations in the air. It has a detection range of 100-10000 * concentrations in the air. It has a detection range of 100-10000

View File

@ -31,17 +31,17 @@ namespace upm {
/** /**
* @library gas * @library gas
* @sensor tp401 * @sensor tp401
* @comname Air Quality Sensor * @comname TP401 Gas Sensor
* @altname TP401 Gas Sensor * @altname Grove Air Quality Sensor
* @type gaseous * @type gaseous
* @man seeed * @man seeed
* @con analog * @con analog
* @web https://www.seeedstudio.com/Grove-Air-quality-sensor-p-1065.html * @web https://www.seeedstudio.com/Grove-Air-quality-sensor-p-1065.html
* @kit hak * @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 * 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 * range, it should be used only when qualitative results are needed. Example applications
* are air recirculation, ventilation systems, and refreshing sprayers. * are air recirculation, ventilation systems, and refreshing sprayers.

View File

@ -56,7 +56,7 @@ class GroveButton: public Grove {
/** /**
* Grove button constructor * Grove button constructor
* *
* @param gpio Pin to use * @param pin Pin to use
*/ */
GroveButton(unsigned int pin); GroveButton(unsigned int pin);
/** /**

View File

@ -61,7 +61,7 @@ class GroveLed: public Grove {
/** /**
* Grove LED constructor * Grove LED constructor
* *
* @param gpio Pin to use * @param pin Pin to use
*/ */
GroveLed(int pin); GroveLed(int pin);
/** /**

View File

@ -58,7 +58,7 @@ class GroveRelay: public Grove {
/** /**
* Grove relay constructor * Grove relay constructor
* *
* @param gpio Pin to use * @param pin Pin to use
*/ */
GroveRelay(unsigned int pin); GroveRelay(unsigned int pin);
/** /**

View File

@ -324,7 +324,7 @@ namespace upm {
/** /**
* Sets the output data rate * 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 * @return True if successful
*/ */
bool setDataRate(DR_BITS_T odr); bool setDataRate(DR_BITS_T odr);
@ -332,7 +332,7 @@ namespace upm {
/** /**
* Sets the power mode * 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 * @return True if successful
*/ */
bool setPowerMode(PM_BITS_T pm); bool setPowerMode(PM_BITS_T pm);

View File

@ -63,8 +63,6 @@ class HCSR04 {
* *
* @param triggerPin Pin to trigger the sensor for distance * @param triggerPin Pin to trigger the sensor for distance
* @param echoPin Pulse response to triggering * @param echoPin Pulse response to triggering
* @param fptr Function pointer to handle rising-edge and
* falling-edge interrupts
*/ */
HCSR04 (int triggerPin, int echoPin); HCSR04 (int triggerPin, int echoPin);
/** /**
@ -74,6 +72,8 @@ class HCSR04 {
/** /**
* Gets the distance from the sensor * Gets the distance from the sensor
*
* @param sys Selects units for measurement: 0 = inch, 1 = cm
*/ */
double getDistance (int sys); double getDistance (int sys);

View File

@ -104,7 +104,7 @@ namespace upm {
* range of 0C-50C. The constructor sets a default of * range of 0C-50C. The constructor sets a default of
* RANGE_MINUS40_50. * 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) void setRange(RANGE_T range=RANGE_MINUS40_50)
{ {

View File

@ -372,7 +372,7 @@ namespace upm
/** /**
* Prints a string to the screen. * Prints a string to the screen.
* *
* @param s Message to print * @param msg Message to print
*/ */
void print(std::string msg); void print(std::string msg);

View File

@ -70,7 +70,7 @@ namespace upm
/** /**
* Set brightness * Set brightness
* *
* @param brightness as percentage * @param percent brightness as percentage
* *
* @throws std::runtime_error * @throws std::runtime_error
*/ */

View File

@ -76,8 +76,8 @@ namespace upm
* Jhd1313m1 constructor * Jhd1313m1 constructor
* *
* @param bus I2C bus to use * @param bus I2C bus to use
* @param address Slave address the LCD is registered on * @param lcdAddress Slave address the LCD is registered on
* @param address Slave address the RGB backlight is registered on * @param rgbAddress Slave address the RGB backlight is registered on
*/ */
Jhd1313m1(int bus, int lcdAddress = 0x3E, int rgbAddress = 0x62); Jhd1313m1(int bus, int lcdAddress = 0x3E, int rgbAddress = 0x62);

View File

@ -57,7 +57,7 @@ class KXCJK1013
/** /**
* KXCJK1013 Tri-axis Digital Accelerometer * KXCJK1013 Tri-axis Digital Accelerometer
* *
* @param iio device number * @param device iio device number
*/ */
KXCJK1013(int device); KXCJK1013(int device);
@ -70,8 +70,7 @@ class KXCJK1013
* Installs an interrupt service routine (ISR) to be called when * Installs an interrupt service routine (ISR) to be called when
* an interrupt occurs * an interrupt occurs
* *
* @param interrupt channel * @param isr Pointer to a function to be called on interrupt
* @param fptr Pointer to a function to be called on interrupt
* @param arg Pointer to an object to be supplied as an * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */
@ -86,7 +85,7 @@ class KXCJK1013
/** /**
* Enable trigger buffer * Enable trigger buffer
* @param trigger buffer length in integer * @param length buffer length in integer
*/ */
bool enableBuffer(int length); bool enableBuffer(int length);
@ -105,7 +104,7 @@ class KXCJK1013
/** /**
* Set sampling frequency * 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, * Available sampling frequency are 0.781000, 1.563000, 3.125000, 6.250000, 12.500000, 25, 50,
* 100, 200, 400, 800, and 1600 * 100, 200, 400, 800, and 1600
* Default sampling frequency is 25 * Default sampling frequency is 25

View File

@ -442,7 +442,7 @@ class L3GD20
/** /**
* L3GD20 Tri-axis Digital Gyroscope Contructor for IIO operation * L3GD20 Tri-axis Digital Gyroscope Contructor for IIO operation
* *
* @param iio device number * @param device iio device number
*/ */
L3GD20(int device); L3GD20(int device);
@ -482,7 +482,7 @@ class L3GD20
/** /**
* Set the power mode of the device. I2C only. * 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); void setPowerMode(POWER_MODES_T mode);
@ -543,8 +543,7 @@ class L3GD20
* Installs an interrupt service routine (ISR) to be called when * Installs an interrupt service routine (ISR) to be called when
* an interrupt occurs. IIO only. * an interrupt occurs. IIO only.
* *
* @param interrupt channel * @param isr Pointer to a function to be called on interrupt
* @param fptr Pointer to a function to be called on interrupt
* @param arg Pointer to an object to be supplied as an * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */
@ -561,7 +560,7 @@ class L3GD20
/** /**
* Enable trigger buffer. IIO only. * Enable trigger buffer. IIO only.
* *
* @param trigger buffer length in integer * @param length buffer length in integer
*/ */
bool enableBuffer(int length); bool enableBuffer(int length);
@ -584,7 +583,7 @@ class L3GD20
* Set sampling frequency. IIO only. For I2C operation, use the * Set sampling frequency. IIO only. For I2C operation, use the
* setODR() method with the appropriate ODR_CUTOFF_T value. * 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 * Available sampling frequency are 95, 190, 380, and 760
* Default sampling frequency is 95 * Default sampling frequency is 95
*/ */

View File

@ -121,7 +121,6 @@ namespace upm
* @param spi spi bus to use * @param spi spi bus to use
* @param CD Command/Data select pin * @param CD Command/Data select pin
* @param reset reset 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, EBOLED(int spi=EBOLED_DEFAULT_SPI_BUS, int CD=EBOLED_DEFAULT_CD,
int reset=EBOLED_DEFAULT_RESET); int reset=EBOLED_DEFAULT_RESET);
@ -150,8 +149,8 @@ namespace upm
/** /**
* Set cursor to a coordinate * Set cursor to a coordinate
* *
* @param y Axis on the vertical scale. This device supports 6 rows. * @param row Axis on the vertical scale. This device supports 6 rows.
* @param x Axis on the horizontal scale This device supports 64 columns * @param column Axis on the horizontal scale This device supports 64 columns
* *
* @return result of operation * @return result of operation
*/ */
@ -185,7 +184,6 @@ namespace upm
* @param y Axis on the vertical scale * @param y Axis on the vertical scale
* @param data Character to write * @param data Character to write
* @param color Character color * @param color Character color
* @param bg Character background color
* @param size Size of the font * @param size Size of the font
*/ */
void drawChar (uint8_t x, uint8_t y, uint8_t data, uint8_t color, uint8_t size); 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 x the x position of the beginning of the line
* @param y the y 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 * @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); void drawLineVertical (int8_t x, int8_t y, uint8_t height, uint8_t color = COLOR_WHITE);

View File

@ -78,7 +78,7 @@ class SSD1327 : public LCD
/** /**
* Sets the gray level for the LCD panel * 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 * @return Result of the operation
*/ */
void setGrayLevel(uint8_t level); void setGrayLevel(uint8_t level);

View File

@ -64,7 +64,7 @@ class Led {
/** /**
* LED constructor * LED constructor
* *
* @param gpio Pin to use * @param pin Pin to use
*/ */
Led(int pin); Led(int pin);
/** /**

View File

@ -89,7 +89,6 @@ namespace upm {
/** /**
* Set ADC reference voltage * Set ADC reference voltage
* *
* @param dev sensor context pointer
* @param aref ADC reference voltage * @param aref ADC reference voltage
*/ */
void setAref(float aref); void setAref(float aref);
@ -98,7 +97,6 @@ namespace upm {
* Set sensor scale. This scale is applied to the return value: * Set sensor scale. This scale is applied to the return value:
* counts = counts * scale * counts = counts * scale
* *
* @param dev sensor context pointer
* @param scale count scale value used * @param scale count scale value used
*/ */
void setScale(float scale); void setScale(float scale);
@ -107,7 +105,6 @@ namespace upm {
* Set sensor offset. This offset is applied to the return value: * Set sensor offset. This offset is applied to the return value:
* value = value + offset * value = value + offset
* *
* @param dev sensor context pointer
* @param offset count offset value used * @param offset count offset value used
* @return Function result code * @return Function result code
*/ */

View File

@ -91,9 +91,10 @@ class LSM303 {
/** /**
* Instantiates an LSM303 object * Instantiates an LSM303 object
* *
* @param i2c bus * @param bus I2C bus to use
* @param addr Magnetometer * @param addrMag I2C address of the Magnetometer (default 0x1E)
* @param addr Accelerometer * @param addrAcc I2C address of the Accelerometer (default 0x19)
* @param accScale Accelerometer scale, can be 2, 4 or 8 (default 8)
*/ */
LSM303 (int bus, LSM303 (int bus,
int addrMag=LSM303_MAG, int addrMag=LSM303_MAG,

View File

@ -1060,7 +1060,8 @@ namespace upm {
* @param bus i2c bus to use * @param bus i2c bus to use
* @param raw bypass board definition file, set to true if using Sparkfun * @param raw bypass board definition file, set to true if using Sparkfun
* 9DOF Block on an Intel Edison Arduino board * 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, LSM9DS0(int bus=LSM9DS0_I2C_BUS,
bool raw=false, bool raw=false,

View File

@ -43,7 +43,7 @@
namespace upm { namespace upm {
/** /**
* @brief Grove NFC Tag * @brief M24LR64E NFC Tag library
* @defgroup m24lr64e libupm-m24lr64e * @defgroup m24lr64e libupm-m24lr64e
* @ingroup seeed i2c other * @ingroup seeed i2c other
*/ */
@ -52,15 +52,17 @@ namespace upm {
* @library m24lr64e * @library m24lr64e
* @sensor m24lr64e * @sensor m24lr64e
* @comname Dynamic NFC/RFID Tag Module * @comname Dynamic NFC/RFID Tag Module
* @altname Grove NFC Tag
* @type other * @type other
* @man seeed * @man seeed
* @web http://www.seeedstudio.com/wiki/Grove_-_NFC_Tag * @web http://www.seeedstudio.com/wiki/Grove_-_NFC_Tag
* @con i2c * @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) * The M24LR64E NFC tag is an 8KB electrically erasable programmable
* that can be written to or read from using I2C and NFC-equipped devices. * 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 * The user mode (default) allows read and write access to all 8KB
* of space, provided the sector security status (SSS) allows it. * of space, provided the sector security status (SSS) allows it.
@ -246,8 +248,8 @@ namespace upm {
* Writes bytes to the EEPROM * Writes bytes to the EEPROM
* *
* @param address Address to write to * @param address Address to write to
* @param data Data to write * @param buffer Data to write
* @param data Length of the data buffer * @param len Length of the data buffer
*/ */
mraa::Result writeBytes(unsigned int address, uint8_t* buffer, int len); mraa::Result writeBytes(unsigned int address, uint8_t* buffer, int len);

View File

@ -73,7 +73,7 @@ class MAX31723 {
* Instantiates an MAX31723 object * Instantiates an MAX31723 object
* *
* @param bus Number of the used bus * @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); MAX31723 (int csn);

View File

@ -302,7 +302,7 @@ extern "C" {
* *
* @param dev Device context. * @param dev Device context.
* @param pin GPIO pin to use as the interrupt pin. * @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 * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
* @return UPM result. * @return UPM result.

View File

@ -63,7 +63,7 @@ namespace upm {
* MCP2515 constructor. * MCP2515 constructor.
* *
* @param bus spi bus to use * @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 * pass -1 if your CS is handled automatically by your SPI
* implementation (Edison). * implementation (Edison).
*/ */
@ -335,7 +335,7 @@ namespace upm {
* an interrupt occurs. * an interrupt occurs.
* *
* @param pin GPIO pin to use as the interrupt pin. * @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 * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */

View File

@ -155,7 +155,7 @@ namespace upm {
* MCP9808 constructor * MCP9808 constructor
* *
* @param bus i2c bus the sensor is attached to. * @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); MCP9808 (int bus, uint8_t address = 0x18);
@ -180,14 +180,14 @@ namespace upm {
/** /**
* Will cause the devices to either sleep or wakeup. * 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); void shutDown(bool sleep = true);
/** /**
* setMode - sets temperature reporting mode. * 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. * temps will be reported in fahrenheit.
*/ */
void setMode(bool celsius = true) void setMode(bool celsius = true)
@ -275,7 +275,7 @@ namespace upm {
/** /**
* Sets hysteresis value. * 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 * HYST_3_0 or HYST_6_0
*/ */
void setHysteresis(MCP9808_CONFIG value); void setHysteresis(MCP9808_CONFIG value);

View File

@ -98,7 +98,7 @@ namespace upm {
* specify those voltages here for more accurate results. * specify those voltages here for more accurate results.
* *
* @param ppm400 The measured reference voltage at 400 ppm * @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); void setCalibration(float ppm400, float ppm1000);

View File

@ -50,10 +50,28 @@ typedef struct _mic_context {
uint16_t analog_pin; uint16_t analog_pin;
} *mic_context; } *mic_context;
/**
* Microphone sensor initialization function
*
* @param pin analog pin to use
* @return sensor context
*/
mic_context mic_init(int pin); mic_context mic_init(int pin);
/**
* Microphone sensor destructor
*
* @param dev sensor context pointer
*/
void mic_close(mic_context dev); 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); upm_result_t mic_get_value(mic_context dev, float* micval);
#endif /* MIC_H_ */ #endif /* MIC_H_ */

View File

@ -65,7 +65,7 @@ namespace upm {
* MICSV89 constructor * MICSV89 constructor
* *
* @param bus i2c bus the sensor is attached to. * @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); MICSV89 (int bus, uint8_t address = 0x70);

View File

@ -208,7 +208,7 @@ extern "C" {
* *
* @param dev Device context. * @param dev Device context.
* @param pin GPIO pin to use as the interrupt pin * @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 * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
* @return UPM result * @return UPM result

View File

@ -236,7 +236,7 @@ namespace upm {
* an interrupt occurs * an interrupt occurs
* *
* @param pin GPIO pin to use as the interrupt pin * @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 * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */

View File

@ -91,7 +91,7 @@ class MMC35240
/** /**
* MMC35240 Tri-axis Magnetic Sensor * MMC35240 Tri-axis Magnetic Sensor
* *
* @param iio device number * @param device iio device number
*/ */
MMC35240(int device); MMC35240(int device);
@ -104,8 +104,7 @@ class MMC35240
* Installs an interrupt service routine (ISR) to be called when * Installs an interrupt service routine (ISR) to be called when
* an interrupt occurs * an interrupt occurs
* *
* @param interrupt channel * @param isr Pointer to a function to be called on interrupt
* @param fptr Pointer to a function to be called on interrupt
* @param arg Pointer to an object to be supplied as an * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */
@ -120,7 +119,7 @@ class MMC35240
/** /**
* Enable trigger buffer * Enable trigger buffer
* @param trigger buffer length in integer * @param length buffer length in integer
*/ */
bool enableBuffer(int length); bool enableBuffer(int length);
@ -139,7 +138,7 @@ class MMC35240
/** /**
* Set sampling frequency * Set sampling frequency
* @param sampling frequency in float * @param sampling_frequency sampling frequency in float
* Available sampling frequency are 1.5, 13, 25, 50 * Available sampling frequency are 1.5, 13, 25, 50
* Default sampling frequency is 1.500000 * Default sampling frequency is 1.500000
*/ */

View File

@ -205,7 +205,7 @@ class MPL3115A2 {
/** /**
* Converts temperature from degC*1000 to degF*1000 * Converts temperature from degC*1000 to degF*1000
* *
* @param iTemp Temperature in degC * @param fTemp Temperature in degC
*/ */
float convertTempCtoF(float fTemp); float convertTempCtoF(float fTemp);
@ -214,7 +214,7 @@ class MPL3115A2 {
* This is set for 15degC (Pa = 0.0002961 in Hg) * This is set for 15degC (Pa = 0.0002961 in Hg)
* TODO: Change the function to add temperature calibration * TODO: Change the function to add temperature calibration
* *
* @param iPressure Pressure in Pa * @param fPressure Pressure in Pa
*/ */
float convertPaToinHg(float fPressure); float convertPaToinHg(float fPressure);

View File

@ -749,7 +749,7 @@ namespace upm {
* set the Low Pass Digital filter. This enables filtering (if * set the Low Pass Digital filter. This enables filtering (if
* non-0) of the accelerometer and gyro outputs. * 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 * @return true if successful, false otherwise
*/ */
bool setDigitalLowPassFilter(DLPF_CFG_T dlp); 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 * (DLPF) is 0 or 7 (DLPF_260_256 or DLPF_RESERVED), and 1Khz
* otherwise. * 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 * @return true if successful, false otherwise
*/ */
bool setSampleRateDivider(uint8_t div); bool setSampleRateDivider(uint8_t div);

View File

@ -121,7 +121,7 @@ extern "C" {
* precision supported: MS5803_OSR_4096 * precision supported: MS5803_OSR_4096
* *
* @param dev Device context. * @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, void ms5803_set_temperature_osr(const ms5803_context dev,
MS5803_OSR_T osr); MS5803_OSR_T osr);
@ -134,7 +134,7 @@ extern "C" {
* precision supported: MS5803_OSR_4096 * precision supported: MS5803_OSR_4096
* *
* @param dev Device context. * @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, void ms5803_set_pressure_osr(const ms5803_context dev,
MS5803_OSR_T osr); MS5803_OSR_T osr);

View File

@ -108,7 +108,7 @@ namespace upm {
* The default set at device intialization is the highest * The default set at device intialization is the highest
* precision supported: MS5803_OSR_4096 * 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); void setTemperatureOSR(MS5803_OSR_T osr);
@ -119,7 +119,7 @@ namespace upm {
* The default set at device intialization is the highest * The default set at device intialization is the highest
* precision supported: MS5803_OSR_4096 * 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); void setPressureOSR(MS5803_OSR_T osr);

View File

@ -218,7 +218,7 @@ class NRF24L01 {
/** /**
* Sends the buffer data * Sends the buffer data
* *
* @param *value Pointer to the buffer * @param value Pointer to the buffer
*/ */
void send (uint8_t * value); void send (uint8_t * value);
@ -285,7 +285,7 @@ class NRF24L01 {
/** /**
* Sinks all the arrived data into a provided buffer * 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); void getData (uint8_t * data);

View File

@ -67,7 +67,6 @@ namespace upm {
* NUNCHUCK constructor * NUNCHUCK constructor
* *
* @param bus I2C bus to use * @param bus I2C bus to use
* @param addr I2C address to use
*/ */
NUNCHUCK(int bus); NUNCHUCK(int bus);

View File

@ -143,7 +143,7 @@ extern "C" {
* Enable debugging output (linux platforms only). * Enable debugging output (linux platforms only).
* *
* @param dev Device context * @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); void otp538u_set_debug(const otp538u_context dev, bool enable);

View File

@ -156,7 +156,7 @@ namespace upm {
/** /**
* Enable debugging output. * 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) void setDebug(bool enable)
{ {

View File

@ -67,7 +67,6 @@ class P9813
* @param dataPin Data Pin * @param dataPin Data Pin
* @param batchMode (optional) Immediately write to the LED controllers (false, default) or wait for a pushState * @param batchMode (optional) Immediately write to the LED controllers (false, default) or wait for a pushState
* call (true) * call (true)
* @param csn (optional) Chip Select Pin
*/ */
P9813(uint16_t ledCount, uint16_t clkPin, uint16_t dataPin, bool batchMode = false); P9813(uint16_t ledCount, uint16_t clkPin, uint16_t dataPin, bool batchMode = false);

View File

@ -259,7 +259,7 @@ namespace upm {
/** /**
* waits for an ISO14443A target to enter the field * 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 * @param uid Pointer to the array that will be populated with the
* cards UID, up to 7 bytes * cards UID, up to 7 bytes
* @param uidLength Pointer to the variable that will hold the * @param uidLength Pointer to the variable that will hold the

View File

@ -48,16 +48,46 @@ typedef struct _relay_context{
mraa_gpio_context gpio; mraa_gpio_context gpio;
} *relay_context; } *relay_context;
/**
* relay init function
*
* @param pin Pin to use
*/
relay_context relay_init(int pin); relay_context relay_init(int pin);
/**
* relay destructor
*/
void relay_close(relay_context dev); 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); 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); 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); 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); bool relay_is_off(relay_context dev);
#endif /* RELAY_H_ */ #endif /* RELAY_H_ */

View File

@ -62,7 +62,7 @@ namespace upm {
/** /**
* relay constructor * relay constructor
* *
* @param gpio Pin to use * @param pin Pin to use
*/ */
Relay(unsigned int pin); Relay(unsigned int pin);
/** /**

View File

@ -51,13 +51,38 @@ typedef struct _rotary_context {
#define ROTARY_MAX_ANGLE 300 #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_context rotary_init(int pin, float aRef);
/**
* Rotary destructor
*
* @param dev sensor context pointer
*/
void rotary_close(rotary_context dev); 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); 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); upm_result_t rotary_get_value_angle(rotary_context dev, float* rotval);
#endif /* ROTARY_H_ */ #endif /* ROTARY_H_ */

View File

@ -34,7 +34,7 @@
namespace upm { namespace upm {
/** /**
* @brief Rotary library * @brief Rotary Angle Sensor library
* @defgroup rotary libupm-rotary * @defgroup rotary libupm-rotary
* @ingroup seeed analog ainput gsk * @ingroup seeed analog ainput gsk
*/ */
@ -43,7 +43,7 @@ namespace upm {
* @library rotary * @library rotary
* @sensor rotary * @sensor rotary
* @comname Rotary Angle Sensor * @comname Rotary Angle Sensor
* @altname Rotary Potentiometer * @altname Rotary Potentiometer, Grove Rotary Angle Sensor
* @type ainput * @type ainput
* @man seeed * @man seeed
* @web http://wiki.seeed.cc/Grove-Rotary_Angle_Sensor/ * @web http://wiki.seeed.cc/Grove-Rotary_Angle_Sensor/
@ -52,9 +52,9 @@ namespace upm {
* *
* @brief API for the Rotary Angle Sensor (Knob) * @brief API for the Rotary Angle Sensor (Knob)
* *
* Basic UPM module for the rotary angle sensor (knob) on analog. Provides * Basic UPM module for the rotary angle sensor (knob) on analog. Provides a
* a set of functions to read the absolute pin value, degrees or radians, and another set * set of functions to read the absolute pin value, degrees or radians, and
* to do the same relative to the center of the knob's range. * another set to do the same relative to the center of the knob's range.
* *
* @image html rotary.jpg * @image html rotary.jpg
* @snippet rotary.cxx Interesting * @snippet rotary.cxx Interesting
@ -62,7 +62,7 @@ namespace upm {
class Rotary{ class Rotary{
public: public:
/** /**
* Grove rotary angle sensor constructor * Rotary angle sensor constructor
* *
* @param pin Number of the analog pin to use * @param pin Number of the analog pin to use
*/ */

View File

@ -90,7 +90,7 @@ namespace upm {
* Installs an ISR to be called when * Installs an ISR to be called when
* black is detected * 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 * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */

View File

@ -62,7 +62,6 @@ class SI1132 : public ILightSensor {
* Instanciates a Si1132 object * Instanciates a Si1132 object
* *
* @param bus number of used bus * @param bus number of used bus
* @param devAddr address of used i2c device
*/ */
SI1132 (int bus); SI1132 (int bus);

View File

@ -65,8 +65,7 @@ class SI7005 : public ITemperatureSensor, public IHumiditySensor {
* Instantiates a SI7005 object * Instantiates a SI7005 object
* *
* @param bus number of used bus * @param bus number of used bus
* @param devAddr address of used i2c device * @param pin gpio number for chip select pin
* @param pin mraa gpio number for chip select pin
*/ */
SI7005 (int bus, int pin); SI7005 (int bus, int pin);

View File

@ -154,7 +154,8 @@ class SmartDrive {
public: public:
/** /**
* Initialize the class with the i2c address of your SmartDrive * 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); SmartDrive(int i2c_bus, int address = SmartDrive_DefaultAddress);
@ -238,7 +239,6 @@ public:
/** /**
* Turns the specified motor(s) for given absolute tacheometer count * Turns the specified motor(s) for given absolute tacheometer count
* @param motor_id Number of the motor(s) you wish to turn. * @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 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 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. * @param wait_for_completion Tells the program when to handle the next line of code.

View File

@ -134,7 +134,7 @@ class StepMotor {
* Sets the current position. Useful if the motor is not at 0 when the * Sets the current position. Useful if the motor is not at 0 when the
* driver is initialized. * driver is initialized.
* *
* @param step Current position * @param pos Current position
*/ */
void setPosition (int pos); void setPosition (int pos);

View File

@ -1577,7 +1577,7 @@ namespace upm {
* @param chipRev chip revision, default is 0x12 * @param chipRev chip revision, default is 0x12
* @param bus spi bus to use * @param bus spi bus to use
* @param cs GPIO pin to use as SPI Chip Select * @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 dio0 GPIO pin to use as reset DIO0 intr
* @param dio1 GPIO pin to use as reset DIO1 intr * @param dio1 GPIO pin to use as reset DIO1 intr
* @param dio2 GPIO pin to use as reset DIO2 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 modem One of the MODEM_T values
* @param freq The channel to check * @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. * os considerd in use.
*/ */
bool isChannelFree(RADIO_MODEM_T modem, uint32_t freq, int16_t rssiThresh); 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 fixLen Fixed length packets [false: variable, true: fixed]
* @param payloadLen Sets payload length when fixed length is used * @param payloadLen Sets payload length when fixed length is used
* @param crcOn Enables/Disables the CRC [false: OFF, true: ON] * @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 ) * FSK : N/A ( set to 0 )
* LoRa: [false: OFF, true: ON] * 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 ) * FSK : N/A ( set to 0 )
* LoRa: Number of symbols * LoRa: Number of symbols
* @param iqInverted Inverts IQ signals (LoRa only) * @param iqInverted Inverts IQ signals (LoRa only)
@ -1789,10 +1789,10 @@ namespace upm {
* 4 more symbols) * 4 more symbols)
* @param fixLen Fixed length packets [false: variable, true: fixed] * @param fixLen Fixed length packets [false: variable, true: fixed]
* @param crcOn Enables disables the CRC [false: OFF, true: ON] * @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 ) * FSK : N/A ( set to 0 )
* LoRa: [false: OFF, true: ON] * 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 ) * FSK : N/A ( set to 0 )
* LoRa: Number of symbols * LoRa: Number of symbols
* @param iqInverted Inverts IQ signals (LoRa only) * @param iqInverted Inverts IQ signals (LoRa only)

View File

@ -48,12 +48,28 @@ typedef struct _temperature_context {
int16_t m_aRes; int16_t m_aRes;
} *temperature_context; } *temperature_context;
/**
* Analog temperature sensor initialization function
*
* @param pin analog pin to use
* @return sensor context
*/
temperature_context temperature_init(int pin); temperature_context temperature_init(int pin);
/**
* Analog temperature sensor destructor
*
* @param dev sensor context pointer
*/
void temperature_close(temperature_context dev); 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, upm_result_t temperature_get_value(temperature_context dev,
float* tempval); float* tempval);

View File

@ -46,14 +46,14 @@ namespace upm {
* @con analog * @con analog
* @kit gsk * @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 * Basic UPM module for analog temperature sensors. These sensors use a NTC
* uses a NTC thermistor to measure ambient temperature. The conversion formula * thermistor to measure ambient temperature. This driver was developed using
* has been updated to work with versions 1.1 and 1.2 of the sensor. For the * the Grove Temperature Sensor. The conversion formula has been updated
* older v1.0 sensor you will have to specify R0 and B values when initializing * to work with versions 1.1 and 1.2 of the sensor. For the older v1.0
* the device. The range of this sensor is -40 to 125 C and accuracy is +/- 1.5 * sensor you will have to specify R0 and B values when initializing the
* C. * device. The range of this sensor is -40 to 125 C and accuracy is +/- 1.5 C.
* *
* @image html temp.jpg * @image html temp.jpg
* @snippet temperature.cxx Interesting * @snippet temperature.cxx Interesting
@ -61,7 +61,7 @@ namespace upm {
class Temperature { class Temperature {
public: public:
/** /**
* Grove analog temperature sensor constructor * Analog temperature sensor constructor
* *
* @param pin Analog pin to use * @param pin Analog pin to use
* @param scale Scaling factor for raw analog value from the ADC, * @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(unsigned int pin, float scale = 1.0, int r0 = 100000, int b = 4275);
/** /**
* Temperature destructor * Analog temperature sensor destructor
*/ */
~Temperature(); ~Temperature();
/** /**
@ -82,7 +82,7 @@ class Temperature {
* @return Raw value from the ADC * @return Raw value from the ADC
*/ */
float raw_value(); float raw_value();
/* Provided for compatibility with old grove base class /** Provided for compatibility with old grove base class
* *
* @return Sensor name * @return Sensor name
*/ */

View File

@ -169,7 +169,7 @@ class TMP006 {
* *
* @param rawv Object voltage value * @param rawv Object voltage value
* @param rawt Raw die temperature value * @param rawt Raw die temperature value
* @param tamp Converted ambient temperature * @param tamb Converted ambient temperature
* @param tobj Converted object temperature * @param tobj Converted object temperature
*/ */
void convert_data(int16_t rawv,int16_t rawt, float *tamb, float *tobj); void convert_data(int16_t rawv,int16_t rawt, float *tamb, float *tobj);

View File

@ -116,7 +116,7 @@ typedef struct _tsl2561_context {
* @param bus I2C bus * @param bus I2C bus
* @param dev_address I2C address * @param dev_address I2C address
* @param gain Gain associated with the driver * @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 * @return void* pointer to the sensor struct
*/ */
tsl2561_context tsl2561_init(int bus, uint8_t dev_address, uint8_t gain, tsl2561_context tsl2561_init(int bus, uint8_t dev_address, uint8_t gain,

View File

@ -123,7 +123,7 @@ class TSL2561{
* @param bus Number of the used bus * @param bus Number of the used bus
* @param devAddr Address of the used I2C device * @param devAddr Address of the used I2C device
* @param gain Correct gain to use * @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); TSL2561(int bus=0, uint8_t devAddr=TSL2561_Address, uint8_t gain=GAIN_0X, uint8_t integrationTime=INTEGRATION_TIME1_101MS);

View File

@ -75,15 +75,26 @@ void ttp223_close(ttp223_context dev);
upm_result_t ttp223_is_pressed(ttp223_context dev, bool* value); 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, upm_result_t ttp223_install_isr(ttp223_context dev,
mraa_gpio_edge_t edge_level, mraa_gpio_edge_t edge_level,
void (*isr)(void *), void *arg); 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_ */ #endif /* TTP223_H_ */

View File

@ -91,7 +91,7 @@ class TTP223 {
* Installs an interrupt service routine (ISR) to be called when * Installs an interrupt service routine (ISR) to be called when
* the button is activated or deactivated. * 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 * @param arg Pointer to an object to be supplied as an
* argument to the ISR. * argument to the ISR.
*/ */

View File

@ -103,7 +103,7 @@ namespace upm {
* Set the default time, in milliseconds, to wait for data to * Set the default time, in milliseconds, to wait for data to
* arrive after sending a command. * 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); void setResponseWaitTime(unsigned int wait_time);
@ -192,7 +192,7 @@ namespace upm {
* return ("\r"). * return ("\r").
* @param resp_len The maximum number of characters to read from the * @param resp_len The maximum number of characters to read from the
* device. * 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 * response will be returned immediately regardless of the
* timeout setting. * timeout setting.
* @param millis The maximum number of milliseconds to wait * @param millis The maximum number of milliseconds to wait

View File

@ -28,7 +28,7 @@
namespace upm { namespace upm {
/** /**
* @brief Grove Water Flow Sensor library * @brief Water Flow Sensor library
* @defgroup wfs libupm-wfs * @defgroup wfs libupm-wfs
* @ingroup seeed gpio liquid eak * @ingroup seeed gpio liquid eak
*/ */
@ -44,7 +44,7 @@ namespace upm {
* @con gpio * @con gpio
* @kit eak * @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 * This sensor is used to measure water flow in liters per
* minute (LPM). It incorporates a Hall Effect sensor. The UPM module * minute (LPM). It incorporates a Hall Effect sensor. The UPM module
@ -65,64 +65,64 @@ namespace upm {
class WFS { class WFS {
public: public:
/** /**
* Grove Water Flow sensor constructor * Water Flow Sensor constructor
* *
* @param pin Digital pin to use * @param pin Digital pin to use
*/ */
WFS(int pin); WFS(int pin);
/** /**
* WFS destructor * WFS destructor
*/ */
~WFS(); ~WFS();
/** /**
* Returns the number of milliseconds elapsed since initClock() * Returns the number of milliseconds elapsed since initClock()
* was last called. * was last called.
* *
* @return Elapsed milliseconds * @return Elapsed milliseconds
*/ */
uint32_t getMillis(); uint32_t getMillis();
/** /**
* Resets the clock * Resets the clock
* *
*/ */
void initClock(); void initClock();
/** /**
* Resets the flow counter to 0. The flow counter should be * Resets the flow counter to 0. The flow counter should be
* stopped via stopFlowCounter() prior to calling this function. * stopped via stopFlowCounter() prior to calling this function.
* *
*/ */
void clearFlowCounter() { wfs_clear_flow_counter(m_wfs); }; void clearFlowCounter() { wfs_clear_flow_counter(m_wfs); };
/** /**
* Starts the flow counter * Starts the flow counter
* *
*/ */
void startFlowCounter(); void startFlowCounter();
/** /**
* Stops the flow counter * Stops the flow counter
* *
*/ */
void stopFlowCounter(); void stopFlowCounter();
/** /**
* Gets the flow counter * Gets the flow counter
* *
* @return Flow counter * @return Flow counter
*/ */
uint32_t flowCounter() { return wfs_flow_counter(m_wfs); }; uint32_t flowCounter() { return wfs_flow_counter(m_wfs); };
/** /**
* Computes the flow rate in liters per minute (LPM). Note, this * Computes the flow rate in liters per minute (LPM). Note, this
* is for the Grove WFS. If you are using some other WFS, you * is for the Grove WFS. If you are using some other WFS, you
* should compute the flow rate on your own based on the data for * should compute the flow rate on your own based on the data for
* your sensor. * your sensor.
* *
* @return Computed flow rate * @return Computed flow rate
*/ */
float flowRate(); float flowRate();
protected: protected:

View File

@ -172,7 +172,7 @@ namespace upm {
/** /**
* Gets a command response and returns its validity * Gets a command response and returns its validity
* *
* @param index Opcode to verify * @param opcode Opcode to verify
* @return True if successful * @return True if successful
*/ */
bool checkResponse(WT5001_OPCODE_T opcode); bool checkResponse(WT5001_OPCODE_T opcode);