From 04edb9be04756627f0702106bcb44dc7922b6dd7 Mon Sep 17 00:00:00 2001 From: VadimPopov Date: Sun, 9 Aug 2015 22:51:25 +0300 Subject: [PATCH] docs: more header files edited Signed-off-by: Mihai Tudor Panu --- src/ad8232/ad8232.h | 4 +- src/adafruitms1438/adafruitms1438.h | 2 +- src/adxl345/adxl345.h | 6 +- src/at42qt1070/at42qt1070.h | 2 +- src/biss0001/biss0001.h | 10 +- src/bmpx8x/bmpx8x.h | 48 ++-- src/buzzer/buzzer.h | 26 +- src/cjq4435/cjq4435.h | 38 +-- src/ds1307/ds1307.h | 76 +++--- src/ecs1030/ecs1030.h | 22 +- src/enc03r/enc03r.h | 30 +-- src/flex/flex.h | 18 +- src/gas/gas.h | 40 +-- src/gas/mq2.h | 12 +- src/gas/mq3.h | 12 +- src/gas/mq5.h | 14 +- src/gas/mq9.h | 14 +- src/gas/tp401.h | 20 +- src/gp2y0a/gp2y0a.h | 18 +- src/grove/grove.h | 164 ++++++------- src/grove/grovebutton.h | 4 +- src/grove/groveled.h | 12 +- src/grove/grovelight.h | 6 +- src/grove/groverelay.h | 6 +- src/grove/groverotary.h | 6 +- src/grove/groveslide.h | 6 +- src/grove/grovetemp.h | 4 +- src/grovecircularled/grovecircularled.h | 24 +- src/grovecollision/grovecollision.h | 12 +- src/groveehr/groveehr.h | 34 +-- src/groveeldriver/groveeldriver.h | 18 +- src/groveelectromagnet/groveelectromagnet.h | 12 +- src/groveemg/groveemg.h | 20 +- src/grovegsr/grovegsr.h | 20 +- src/grovelinefinder/grovelinefinder.h | 16 +- src/groveloudness/groveloudness.h | 10 +- src/grovemd/grovemd.h | 78 +++--- src/grovemoisture/grovemoisture.h | 12 +- src/groveo2/groveo2.h | 14 +- src/grovescam/grovescam.h | 70 +++--- src/grovespeaker/grovespeaker.h | 22 +- src/grovevdiv/grovevdiv.h | 28 +-- src/grovewater/grovewater.h | 10 +- src/grovewfs/grovewfs.h | 44 ++-- src/guvas12d/guvas12d.h | 18 +- src/h3lis331dl/h3lis331dl.h | 258 ++++++++++---------- src/hcsr04/hcsr04.h | 30 +-- src/hm11/hm11.h | 48 ++-- src/hmc5883l/hmc5883l.h | 22 +- src/hmtrp/hmtrp.h | 138 +++++------ src/hp20x/hp20x.h | 136 +++++------ src/ht9170/ht9170.h | 26 +- src/htu21d/htu21d.h | 72 +++--- src/hx711/hx711.h | 60 ++--- src/ina132/ina132.h | 14 +- src/isd1820/isd1820.h | 24 +- src/itg3200/itg3200.h | 36 +-- src/joystick12/joystick12.h | 20 +- src/l298/l298.h | 66 ++--- src/lcd/jhd1313m1.h | 28 +-- src/lcd/lcd.h | 2 +- src/lcd/lcm1602.h | 58 ++--- src/lcd/ssd1308.h | 50 ++-- src/lcd/ssd1327.h | 54 ++-- src/ldt0028/ldt0028.h | 18 +- src/lol/lol.h | 30 +-- src/lpd8806/lpd8806.h | 32 +-- src/lsm303/lsm303.h | 40 +-- 68 files changed, 1172 insertions(+), 1172 deletions(-) diff --git a/src/ad8232/ad8232.h b/src/ad8232/ad8232.h index df796eda..c2f526e9 100644 --- a/src/ad8232/ad8232.h +++ b/src/ad8232/ad8232.h @@ -50,7 +50,7 @@ namespace upm { * * @brief UPM module for the AD8232 Heart Rate Monitor * - * Note: this sensor must be driven at 3.3v only. + * Note: this sensor must be driven at 3.3V only. * * This module simply spits out the ADC values reported by the sensor, with * the intent to send that data, via serial or network port, somewhere to @@ -58,7 +58,7 @@ namespace upm { * you, like an EKG. * * Processing (https://www.processing.org/) is software - * that should work, using information from the SparkFun website. + * that should work, using information from the SparkFun* website. * * This example just dumps the raw data: * diff --git a/src/adafruitms1438/adafruitms1438.h b/src/adafruitms1438/adafruitms1438.h index 7f28a52e..1f00ac93 100644 --- a/src/adafruitms1438/adafruitms1438.h +++ b/src/adafruitms1438/adafruitms1438.h @@ -58,7 +58,7 @@ namespace upm { * can be connected to this Motor Shield. * Note: the two servo connections are not controlled by the PCA9685 * controller (or this class). They are connected directly to digital - * PWM pins 9 and 10 on the Arduino breakout board. + * PWM pins 9 and 10 on the Arduino* breakout board. * * @image html adafruitms1438.jpg * An example using a DC motor connected to M3 diff --git a/src/adxl345/adxl345.h b/src/adxl345/adxl345.h index 656ea4e1..d4bef923 100644 --- a/src/adxl345/adxl345.h +++ b/src/adxl345/adxl345.h @@ -49,9 +49,9 @@ namespace upm { * ADXL345 is a 3-axis digital accelerometer. * (http://www.seeedstudio.com/wiki/images/2/2c/ADXL345_datasheet.pdf) * The sensor has configurable resolutions to measure ±2g, ±4g, ±8g, or ±16g. - * Note: the sensor is incompatible with and not detected on the I2C bus - * by the Intel(R) Edison using an Arduino breakout board at 5V (3V works - * fine). + * Note: The Grove* version of the sensor is incompatible with and not detected + * on the I2C bus by the Intel(R) Edison using an Arduino* breakout board at 5V + * (3V works fine). * * @image html adxl345.jpeg * @snippet adxl345.cxx Interesting diff --git a/src/at42qt1070/at42qt1070.h b/src/at42qt1070/at42qt1070.h index 826e0903..935a4bd3 100644 --- a/src/at42qt1070/at42qt1070.h +++ b/src/at42qt1070/at42qt1070.h @@ -35,7 +35,7 @@ namespace upm { /** - * @brief Atmel AT42QT1070 QTouch* Sensor library + * @brief Atmel* AT42QT1070 QTouch* Sensor library * @defgroup at42qt1070 libupm-at42qt1070 * @ingroup seeed i2c touch */ diff --git a/src/biss0001/biss0001.h b/src/biss0001/biss0001.h index ad44e96b..470f27b5 100644 --- a/src/biss0001/biss0001.h +++ b/src/biss0001/biss0001.h @@ -28,7 +28,7 @@ namespace upm { /** - * @brief BISS0001 motion sensor library + * @brief BISS0001 Motion Sensor library * @defgroup biss0001 libupm-biss0001 * @ingroup seeed gpio light tsk */ @@ -56,17 +56,17 @@ namespace upm { /** * BISS0001 motion sensor constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ BISS0001(int pin); /** - * BISS0001 Destructor + * BISS0001 destructor */ ~BISS0001(); /** - * Get the motion value from the sensor + * Gets the motion value from the sensor * - * @return the motion reading + * @return Motion reading */ bool value(); diff --git a/src/bmpx8x/bmpx8x.h b/src/bmpx8x/bmpx8x.h index 1275fbd0..546121a2 100644 --- a/src/bmpx8x/bmpx8x.h +++ b/src/bmpx8x/bmpx8x.h @@ -62,7 +62,7 @@ namespace upm { /** - * @brief Bosch BMP & GY65 atmospheric pressure sensor library + * @brief Bosch BMP & GY65 Atmospheric Pressure Sensor library * @defgroup bmpx8x libupm-bmpx8x * @ingroup seeed adafruit sparkfun i2c pressure */ @@ -76,11 +76,11 @@ namespace upm { * @man seeed adafruit sparkfun * @con i2c * - * @brief API for GY65/BMP085 and BMP180 chips (Atmospheric Pressure Sensor) + * @brief API for the GY65/BMP085 and BMP180 Atmospheric Pressure Sensors * - * The Bosch GY65/BMP085 and BMP180 are high precision, ultra-low - * power consumption pressure sensors. They have a range of between - * 30,000 and 110,000 Pa. + * Bosch GY65/BMP085 and BMP180 are high-precision, ultra-low + * power consumption pressure sensors. They operate in the range of + * 30,000-110,000 Pa. * * This module has been tested on the GY65/BMP085 and BMP180 sensors. * @@ -91,80 +91,80 @@ namespace upm { class BMPX8X { public: /** - * Instanciates a BMPX8X object + * Instantiates a BMPX8X object * - * @param bus number of used bus - * @param devAddr address of used i2c device + * @param bus Number of the used bus + * @param devAddr Address of the used I2C device * @param mode BMP085 mode */ BMPX8X (int bus, int devAddr=0x77, uint8_t mode=BMP085_ULTRAHIGHRES); /** - * BMPX8X object destructor, basicaly it close i2c connection. + * BMPX8X object destructor; basically, it closes the I2C connection. */ ~BMPX8X (); /** - * Return calculated pressure + * Returns the calculated pressure */ int32_t getPressure (); /** * - * Get raw pressure data + * Gets raw pressure data */ int32_t getPressureRaw (); /** - * Get raw temperature data from chip + * Gets raw temperature data from the sensor */ int16_t getTemperatureRaw (); /** - * Return calculated temperature + * Returns the calculated temperature */ float getTemperature (); /** - * With given absolute altitude sea level can be calculated + * With a given absolute altitude, sea level can be calculated * - * @param altitudeMeters altitude + * @param altitudeMeters Altitude */ int32_t getSealevelPressure(float altitudeMeters = 0); /** - * With given sea level altitude in meters can be calculated + * With a given sea level, altitude in meters can be calculated * * @param sealevelPressure Sea level */ float getAltitude (float sealevelPressure = 101325); /** - * Calculation of B5 (check spec for more information) + * Calculates B5 (check the spec for more information) * * @param UT */ int32_t computeB5 (int32_t UT); /** - * Read two bytes register + * Reads a two-byte register * - * @param reg address of a register + * @param reg Address of the register */ uint16_t i2cReadReg_16 (int reg); /** - * Write to one byte register + * Writes to a one-byte register * - * @param reg address of a register - * @param value byte to be written + * @param reg Address of the register + * @param value Byte to be written */ mraa_result_t i2cWriteReg (uint8_t reg, uint8_t value); /** - * Read one byte register + * Reads a one-byte register * - * @param reg address of a register + * @param reg Address of the register */ uint8_t i2cReadReg_8 (int reg); diff --git a/src/buzzer/buzzer.h b/src/buzzer/buzzer.h index 3aa0867e..46af0f33 100644 --- a/src/buzzer/buzzer.h +++ b/src/buzzer/buzzer.h @@ -51,7 +51,7 @@ namespace upm { * @con pwm * @kit gsk * - * @brief API for Buzzer component + * @brief API for the Buzzer component * * This file defines the Buzzer interface for libbuzzer. * This sensor can make different tones when connected to @@ -77,42 +77,42 @@ class Buzzer { ~Buzzer (); /** - * Play a tone for a certain amount of time or indefinitely. When delay + * Plays a tone for a certain amount of time or indefinitely. When delay * is not used, the sound can be stopped by calling stopSound(). * - * @param note the note to be played (DO, RE, MI, etc...) or frequency - * @param delay time in microseconds for playing the sound, a value of - * 0 plays the sound indefinitely + * @param note Note to play (C, D, E, etc.) or frequency + * @param delay Time in microseconds for which to play the sound; if the value is + * 0, the sound is played indefinitely * - * @return the note played + * @return Note played */ int playSound (int note, int delay); /** - * Stops the sound currently playing. Has to be called when playSound() - * does not set a delay value. + * Stops the sound currently playing. Should be called when playSound() + * does not have a delay value. */ void stopSound(); /** * Sets the volume for the buzzer, but may affect the sound timbre. - * Works best with halved values, e.g. 1.0, 0.5, 0.25, ... + * Works best with halved values; e.g., 1.0, 0.5, 0.25, etc. * - * @param vol the value to set the volume to from 0.0 to 1.0 + * @param vol Value to set the volume to, from 0.0 to 1.0 */ void setVolume(float vol); /** * Gets the buzzer volume. * - * @return the value the volume was set to + * @return Value the volume was set to */ float getVolume(); /** - * Return name of the component. + * Returns the name of the sensor. * - * @return name of the sensor + * @return Name of the sensor */ std::string name() { diff --git a/src/cjq4435/cjq4435.h b/src/cjq4435/cjq4435.h index 7ec3ccd8..025cafc4 100644 --- a/src/cjq4435/cjq4435.h +++ b/src/cjq4435/cjq4435.h @@ -44,11 +44,11 @@ namespace upm { * * @brief API for the CJQ4435 MOSFET * - * UPM module for the CJQ4435 MOSFET. It was developed using the + * UPM module for the CJQ4435 MOSFET. It was developed using the * Grove MOSFET module. A MOSFET is like a switch, but it can * switch much faster than a mechanical relay. Here, we implement - * support via MRAA's PWM (Pulse Width Modulation) functions. - * Please note, that the available periods will vary depending on + * support via MRAA pulse width modulation (PWM) functions. + * Note: available periods vary depending on * the capabilities of your device. * * @image html cjq4435.jpg @@ -59,60 +59,60 @@ namespace upm { /** * CJQ4435 constructor * - * @param pin digital pin to use - this pin must be PWM capable + * @param pin Digital pin to use; this pin must be PWM-capable */ CJQ4435(int pin); /** - * CJQ4435 Destructor + * CJQ4435 destructor */ ~CJQ4435(); /** - * set the period in microseconds + * Sets a period in microseconds * - * @param us period in microseconds + * @param us Period in microseconds */ void setPeriodUS(int us); /** - * set the period in milliseconds + * Sets a period in milliseconds * - * @param ms period in milliseconds + * @param ms Period in milliseconds */ void setPeriodMS(int ms); /** - * set the period in seconds + * Sets a period in seconds * - * @param seconds period in seconds + * @param seconds Period in seconds */ void setPeriodSeconds(float seconds); /** - * enable output + * Enables output * - * @param enable enable PWM output if true, disable if false + * @param enable Enables PWM output if true, disables otherwise */ void enable(bool enable); /** - * set the duty cycle. The duty cycle is a floating point number - * between 0.0 (always off) to 1.0 (always on). It represents how - * much time as a percentage, per period, that the output will be + * Sets a duty cycle. Duty cycle is a floating-point number + * between 0.0 (always off) and 1.0 (always on). It represents a + * proportion of time, per period, during which the output is * driven high. * - * @param dutyCycle the duty cycle to use + * @param dutyCycle Duty cycle to use */ void setDutyCycle(float dutyCycle); /** - * a shortcut for turning the output to continuous on (high) + * Shortcut to turn the output to continuous on (high) */ void on(); /** - * a shortcut for turning the output to continuous off (low) + * Shortcut to turn the output to continuous off (low) */ void off(); diff --git a/src/ds1307/ds1307.h b/src/ds1307/ds1307.h index ed61d0ff..be169bfd 100644 --- a/src/ds1307/ds1307.h +++ b/src/ds1307/ds1307.h @@ -43,7 +43,7 @@ namespace upm { /** - * @brief DS1307 real-time clock library + * @brief DS1307 Real-Time Clock library * @defgroup ds1307 libupm-ds1307 * @ingroup seeed i2c time */ @@ -57,11 +57,11 @@ namespace upm { * @man seeed * @con i2c * - * @brief API for the DS1307 Real Time CLock + * @brief API for the DS1307 Real-Time CLock * - * UPM module for the DS1307 based RTC. The clock can provide information - * about the seconds, minutes, hours, day of the week, day of the month, - * month, and year. It can operate in either 24-hour or 12-hour format. + * UPM module for the DS1307-based real-time clock. The clock can provide information + * about seconds, minutes, hours, day of the week, day of the month, + * month, and year. It can operate in either a 24-hour or a 12-hour format. * This device can also output a square wave at 1Khz, 4Khz, 8Khz, and 32Khz. * However, this capability is not implemented in this module. * @@ -71,41 +71,41 @@ namespace upm { class DS1307 { public: /** - * ds1307 Real Time Clock constructor + * DS1307 constructor * - * @param bus i2c bus to use + * @param bus I2C bus to use */ DS1307(int bus); /** - * DS1307 Destructor + * DS1307 destructor */ ~DS1307(); /** - * Load all of the time values + * Loads all the time values * * @return True if time data loaded successfully */ bool loadTime(); /** - * Set the time. You should call loadTime() beforehand to + * Sets the time. You should call loadTime() beforehand to * maintain consistency * - * @return True if time saved successfully + * @return True if time is set successfully */ bool setTime(); /** - * Enable the oscillator on the clock. + * Enables an oscillator on the clock. * * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise */ mraa_result_t enableClock(); /** - * Disable the oscillator on the clock. This will prevent the clock + * Disables the oscillator on the clock. This prevents the clock * from updating any time/date values * * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise @@ -113,80 +113,80 @@ namespace upm { mraa_result_t disableClock(); /** - * Write value(s) into registers + * Writes value(s) into registers * - * @param reg register location to start writing into - * @param buffer buffer for data storage - * @param len number of bytes to write + * @param reg Register location to start writing into + * @param buffer Buffer for data storage + * @param len Number of bytes to write * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise */ mraa_result_t writeBytes(uint8_t reg, uint8_t *buffer, unsigned int len); /** - * Read value(s) from registers + * Reads value(s) from registers * - * @param reg register location to start reading from - * @param buffer buffer for data storage - * @param len number of bytes to read - * @return number of bytes read + * @param reg Register location to start reading from + * @param buffer Buffer for data storage + * @param len Number of bytes to read + * @return Number of bytes read */ uint8_t readBytes(uint8_t reg, uint8_t *buffer, unsigned int len); /** - * Convert a BCD value into decimal + * Converts a BCD value into decimal * * @param val BCD value to convert - * @return the converted value in decimal + * @return Converted decimal value */ unsigned int bcdToDec(uint8_t val); /** - * Convert a decimal value into BCD + * Converts a decimal value into BCD * - * @param val decimal value to convert - * @return the converted value in BCD + * @param val Decimal value to convert + * @return Converted BCD value */ uint8_t decToBcd(unsigned int val); // These variables store the time data loaded with loadTime(), and - // will be the source of data when setTime() is called. It is a - // good idea call loadTime() to setup the current values before + // are the source of data when setTime() is called. It is a + // good idea to call loadTime() to set up the current values before // calling setTime() to ensure RTC data is consistent /** - * holds the seconds + * Holds seconds */ unsigned int seconds; /** - * holds the minutes + * Holds minutes */ unsigned int minutes; /** - * holds the hours, 1-12 in am/pm mode, 0-23 otherwise + * Holds hours; 1-12 in the am/pm format, 0-23 otherwise */ unsigned int hours; /** - * holds the day of the week, 1-7 where 1 is Sunday + * Holds a day of the week; 1-7, where 1 is Sunday */ unsigned int dayOfWeek; /** - * holds the day of the month, 1-31 + * Holds a day of the month, 1-31 */ unsigned int dayOfMonth; /** - * holds the month, 1-12 + * Holds a month, 1-12 */ unsigned int month; /** - * holds the year, 0-99 + * Holds a year, 0-99 */ unsigned int year; /** - * True if in AM/PM mode, false if 24h format. + * True if the am/pm format is used, false otherwise */ bool amPmMode; /** - * If in AmPmMode (12-hr), then this is true if it's PM, clear if AM + * For the am/pm format, it is true if it's pm, false otherwise */ bool pm; diff --git a/src/ecs1030/ecs1030.h b/src/ecs1030/ecs1030.h index ba4bde76..f4f684cc 100644 --- a/src/ecs1030/ecs1030.h +++ b/src/ecs1030/ecs1030.h @@ -61,12 +61,12 @@ namespace upm { * This non-invasive current sensor can be clamped around the supply line of * an electrical load to tell you how much current is passing through it. It * does this by acting as an inductor and responding to the magnetic field - * around a current-carrying conductor. This particular current sensor will - * measure a load up to 30 Amps which makes it great for building your own + * around a current-carrying conductor. This particular current sensor + * measures a load up to 30 A, which makes it great for building your own * energy monitors. * * @image html ecs1030.jpg - *
ECS1030 Sensor image provided by Sparkfun under + *
ECS1030 Sensor image provided by SparkFun* under * * CC BY-NC-SA-3.0. * @@ -79,39 +79,39 @@ class ECS1030 { static const uint8_t R_LOAD = 2000.0 / CURRENT_RATIO; /** - * Instanciates a ECS1030 (current sensor) object + * Instantiates an ECS1030 object * - * @param pinNumber number of the data pin + * @param pinNumber Number of the data pin */ ECS1030 (uint8_t pinNumber); /** - * ECS1030 object destructor, basicaly it close the GPIO. + * ECS1030 object destructor; basicaly, it closes the GPIO. */ ~ECS1030 (); /** - * Return currency data for the sampled period + * Returns electric current data for a sampled period */ double getCurrency_A (); /** - * Return power data for the sampled period + * Returns power data for a sampled period */ double getPower_A (); /** - * Return currency data for the sampled period + * Returns electric current data for a sampled period */ double getCurrency_B (); /** - * Return power data for the sampled period + * Returns power data for a sampled period */ double getPower_B (); /** - * Return name of the component + * Returns the name of the component */ std::string name() { return m_name; diff --git a/src/enc03r/enc03r.h b/src/enc03r/enc03r.h index e71c8c0d..8587ea01 100644 --- a/src/enc03r/enc03r.h +++ b/src/enc03r/enc03r.h @@ -46,8 +46,8 @@ namespace upm { * * @brief API for the ENC03R Single Axis Analog Gyro * - * UPM module for the ENC03R Single Axis Analog Gyro. - * This gyroscope measures the x-axis angular velocity; that is, + * UPM module for the ENC03R single axis analog gyro. + * This gyroscope measures x-axis angular velocity, that is * how fast the sensor is rotating around the x-axis. * Calibration of the sensor is necessary for accurate readings. * @@ -60,45 +60,45 @@ namespace upm { /** * ENC03R sensor constructor * - * @param pin analog pin to use - * @param vref the voltage reference to use, default 5.0 + * @param pin Analog pin to use + * @param vref Reference voltage to use; default is 5.0 V */ ENC03R(int pin, float vref=5.0); /** - * ENC03R Destructor + * ENC03R destructor */ ~ENC03R(); /** - * Calibrate the sensor by determining an analog reading over many - * samples with no movement of the sensor. This must be done + * Calibrates the sensor by determining an analog reading over many + * samples with no movement of the sensor. This must be done * before attempting to use the sensor. * - * @param samples the number of samples to use for calibration + * @param samples Number of samples to use for calibration */ void calibrate(unsigned int samples); /** - * Return the raw value of the sensor + * Returns the raw value of the sensor * - * @return raw value of sensor + * @return Raw value of the sensor */ unsigned int value(); /** - * Return the currently stored calibration value + * Returns the currently stored calibration value * - * @return current calibration value + * @return Current calibration value */ float calibrationValue() { return m_calibrationValue; }; /** - * Compute angular velocity based on value and stored calibration + * Computes angular velocity based on the value and stored calibration * reference. * - * @param val the value to use to compute the angular velocity - * @return computed angular velocity + * @param val Value to use to compute angular velocity + * @return Computed angular velocity */ double angularVelocity(unsigned int val); diff --git a/src/flex/flex.h b/src/flex/flex.h index fc2e391b..7ac4ad16 100644 --- a/src/flex/flex.h +++ b/src/flex/flex.h @@ -29,7 +29,7 @@ namespace upm { /** - * @brief Spectra Symbol Flex sensor library + * @brief Spectra Symbol Flex Sensor library * @defgroup flex libupm-flex * @ingroup sparkfun analog flexfor */ @@ -43,14 +43,14 @@ namespace upm { * @web https://www.sparkfun.com/products/8606 * @con analog * - * @brief API for the Spectra Symbol Flex sensor + * @brief API for the Spectra Symbol Flex Sensor * - * A simple flex sensor, the resistance across the sensor increases when - * bent. Patented technology by Spectra Symbol, these sensors were used in - * the original Nintendo Power Glove. + * A simple flex sensor. The resistance across the sensor increases when + * flexed. Patented technology by Spectra Symbol, these sensors were used in + * the original Nintendo* Power Glove. * * @image html flex.jpg - *
Flex Sensor image provided by SparkFun under + *
Flex Sensor image provided by SparkFun* under * * CC BY-NC-SA-3.0. * @@ -61,15 +61,15 @@ namespace upm { /** * Flex sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ Flex(int pin); /** - * Flex Destructor + * Flex sensor destructor */ ~Flex(); /** - * @return the analog flex value + * @return Analog flex value */ int value(); diff --git a/src/gas/gas.h b/src/gas/gas.h index 3783617e..13eb0b27 100644 --- a/src/gas/gas.h +++ b/src/gas/gas.h @@ -35,10 +35,10 @@ struct thresholdContext { namespace upm { /** - * @brief Gas sensor library + * @brief Gas Sensor library * - * Sensor Library for air quality and gas detecting sensors. Base class Gas provides buffered - * sampling, threshold checking, a basic printing function and a standard read function. + * Library for air quality and gas detecting sensors. Base class Gas provides buffered + * sampling, threshold checking, basic printing function, and standard read function. * * @defgroup gas libupm-gas * @ingroup seeed analog gaseous eak hak @@ -48,7 +48,7 @@ class Gas { /** * Instantiates a Gas object * - * @param gasPin pin where gas is connected + * @param gasPin Pin where gas is connected */ Gas(int gasPin); @@ -58,45 +58,45 @@ class Gas { ~Gas(); /** - * Get samples from gas sensor according to provided window and + * Gets samples from the gas sensor according to the provided window and * number of samples * - * @param freqMS time between each sample (in milliseconds) - * @param numberOfSamples number of sample to sample for this window - * @param buffer buffer with sampled data + * @param freqMS Time between each sample (in milliseconds) + * @param numberOfSamples Number of sample to sample for this window + * @param buffer Buffer with sampled data */ virtual int getSampledWindow (unsigned int freqMS, unsigned int numberOfSamples, uint16_t * buffer); /** - * Given sampled buffer this method will return TRUE/FALSE if threshold - * was reached + * Given the sampled buffer, this method returns TRUE/FALSE if the threshold + * is reached * - * @param ctx threshold context - * @param threshold sample threshold - * @param buffer buffer with samples - * @param len buffer length + * @param ctx Threshold context + * @param threshold Sample threshold + * @param buffer Buffer with samples + * @param len Buffer length */ virtual int findThreshold (thresholdContext* ctx, unsigned int threshold, uint16_t * buffer, unsigned int len); /** - * Return average data for the sampled window + * Returns average data for the sampled window * - * @param ctx threshold context + * @param ctx Threshold context */ virtual int getSampledData (thresholdContext* ctx); /** - * Return one sample from the sensor + * Returns one sample from the sensor * - * @param ctx threshold context + * @param ctx Threshold context */ virtual int getSample (); /** * - * Print running average of threshold context + * Prints a running average of the threshold context * - * @param ctx threshold context + * @param ctx Threshold context */ virtual void printGraph (thresholdContext* ctx, uint8_t resolution); diff --git a/src/gas/mq2.h b/src/gas/mq2.h index 3d09b88a..a30d7377 100644 --- a/src/gas/mq2.h +++ b/src/gas/mq2.h @@ -37,12 +37,12 @@ namespace upm { * @con analog * @kit hak * - * @brief API for MQ2 Gas Sensor + * @brief API for the Grove MQ2 Gas Sensor * - * The Grove - Gas Sensor (MQ2) module is useful for gas leakage detecting + * The Grove 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 detect concentration of 300-10000 ppm. + * hydrogen, smoke, and other combustible gases. It's a medium-sensitivity + * sensor with a detection range of 300-10,000 ppm. * * @image html mq2-5.jpeg * @snippet mq2.cxx Interesting @@ -52,7 +52,7 @@ namespace upm { /** * MQ2 constructor * - * @param gasPin analog pin where sensor is connected + * @param gasPin Analog pin where the sensor is connected */ MQ2 (int gasPin); @@ -62,7 +62,7 @@ namespace upm { ~MQ2 (); /** - * Return name of the component + * Returns the name of the sensor */ std::string name() { diff --git a/src/gas/mq3.h b/src/gas/mq3.h index d38a34e3..295e2aa6 100644 --- a/src/gas/mq3.h +++ b/src/gas/mq3.h @@ -36,12 +36,12 @@ namespace upm { * @man seeed * @con analog * - * @brief API for MQ3 Gas Sensor + * @brief API for the MQ3 Gas Sensor * - * The Grove MQ3 Gas Sensor module is useful for gas leakage detecting (in - * home and industry). It can detect Alcohol Vapour and Benzine. It's + * The Grove 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 - * detect rate is of 0.04-4 mg/L Alcohol. + * detection range is 0.04-4 mg/L Alcohol. * * @image html mq3-9.jpeg * @snippet mq3.cxx Interesting @@ -51,7 +51,7 @@ namespace upm { /** * MQ3 constructor * - * @param gasPin analog pin where sensor is connected + * @param gasPin Analog pin where the sensor is connected */ MQ3 (int gasPin); @@ -61,7 +61,7 @@ namespace upm { ~MQ3 (); /** - * Return name of the component + * Returns the name of the sensor */ std::string name() { diff --git a/src/gas/mq5.h b/src/gas/mq5.h index 46830864..ec176f7e 100644 --- a/src/gas/mq5.h +++ b/src/gas/mq5.h @@ -37,12 +37,12 @@ namespace upm { * @con analog * @kit eak * - * @brief API for MQ5 Gas Sensor + * @brief API for the MQ5 Gas Sensor * - * The Grove - Gas Sensor (MQ5) module is useful for gas leakage detecting - * (in home and industry). It can detect LPG, natural gas, town gas and so - * on. It is highly sensitive and has a detection concentration of - * 300-10000 ppm. + * The Grove 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. * * @image html mq2-5.jpeg * @snippet mq5.cxx Interesting @@ -52,7 +52,7 @@ namespace upm { /** * MQ5 constructor * - * @param gasPin analog pin where sensor is connected + * @param gasPin Analog pin where the sensor is connected */ MQ5 (int gasPin); @@ -62,7 +62,7 @@ namespace upm { ~MQ5 (); /** - * Return name of the component + * Returns the name of the sensor */ std::string name() { diff --git a/src/gas/mq9.h b/src/gas/mq9.h index 9046e135..dada03a3 100644 --- a/src/gas/mq9.h +++ b/src/gas/mq9.h @@ -36,11 +36,11 @@ namespace upm { * @man seeed * @con analog * - * @brief API for MQ9 Gas Sensor + * @brief API for the MQ9 Gas Sensor * - * The Grove MQ9 Gas Sensor module is useful for gas leakage detecting (in - * home and industry). It can detect Carbon Monoxide, Coal Gas and - * Liquefied Gas. It's sensitivity is 10-1000 ppm CO, 100-10000 ppm Gas. + * The Grove MQ9 Gas Sensor module is useful for gas leakage detection (in + * home and industry). It can detect carbon monoxide, coal gas, and + * liquefied gas. Its sensitivity is 10-1,000 ppm CO, and 100-10,000 ppm Gas. * * @image html mq3-9.jpeg * @snippet mq9.cxx Interesting @@ -48,9 +48,9 @@ namespace upm { class MQ9 : public Gas { public: /** - * Jhd1313m1 constructor + * MQ9 constructor * - * @param gasPin analog pin where sensor is connected + * @param gasPin Analog pin where the sensor is connected */ MQ9 (int gasPin); @@ -60,7 +60,7 @@ namespace upm { ~MQ9 (); /** - * Return name of the component + * Returns the name of the sensor */ std::string name() { diff --git a/src/gas/tp401.h b/src/gas/tp401.h index ae72eeca..494cbb58 100644 --- a/src/gas/tp401.h +++ b/src/gas/tp401.h @@ -38,14 +38,14 @@ namespace upm { * @con analog * @kit hak * - * @brief API for Grove TP401 Air Quality Sensor + * @brief API for the Grove TP401 Air Quality Sensor * * The Grove TP401 Air Quality Sensor module is useful for monitoring air purity indoors. - * It can detect CO and a wide range of other harmful gases, but due to limited sensing - * range should be used only when qualitative results are needed. Example applications + * 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. - * The sensor is linear and should be roughly sensitive to 0 ~ 20 ppm CO from 0 ~ 4V. - * Also note that the sensor requires 2-3 minutes to warm up initially and 48 hours of + * The sensor is linear and should be roughly sensitive to 0-20 ppm CO from 0-4 V. + * Note: the sensor requires 2-3 minutes to warm up initially and 48 hours of * operation to stabilize completely. * * @image html tp401.jpeg @@ -56,7 +56,7 @@ namespace upm { /** * TP401 constructor * - * @param gasPin analog pin where sensor was connected + * @param gasPin Analog pin where the sensor is connected */ TP401 (int gasPin); @@ -66,9 +66,9 @@ namespace upm { ~TP401 (); /** - * Return name of the component + * Returns the name of the sensor * - * @return a string with the name of the sensor + * @return Name of the sensor */ std::string name() { @@ -77,9 +77,9 @@ namespace upm { /** * Returns one sample in parts per million (ppm) of CO in the air based on - * the following sensor calibration: 0 ~ 4V is roughly 0 ~ 20 ppm CO + * the following sensor calibration: 0-4 V is roughly 0-20 ppm CO * - * @return a new sample converted to ppm CO + * @return New sample converted to ppm CO */ float getPPM(); diff --git a/src/gp2y0a/gp2y0a.h b/src/gp2y0a/gp2y0a.h index 1919111e..d3d4213d 100644 --- a/src/gp2y0a/gp2y0a.h +++ b/src/gp2y0a/gp2y0a.h @@ -29,7 +29,7 @@ namespace upm { /** - * @brief GP2Y0A based IR proximity sensor library + * @brief GP2Y0A-based IR Proximity Sensor library * @defgroup gp2y0a libupm-gp2y0a * @ingroup seeed analog light */ @@ -45,8 +45,8 @@ namespace upm { * * @brief API for the GP2Y0A family of IR Proximity Sensors * - * This sensor family returns an analog voltage corresponding to the distance - * of an object from the sensor. The voltage is lower when objects + * Sensors of this family return an analog voltage corresponding to the distance + * of an object from the sensor. The voltage is lower when objects * are far away; the voltage increases as objects get closer * to the sensor. * @@ -59,21 +59,21 @@ namespace upm { /** * GP2Y0A sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GP2Y0A(int pin); /** - * GP2Y0A Destructor + * GP2Y0A destructor */ ~GP2Y0A(); /** - * Get the averaged voltage value from the sensor + * Gets an average voltage value from the sensor * - * @param aref the reference voltage in use (5.0 or 3.3 usually) - * @param samples number of samples to average over - * @return the averaged voltage reading + * @param aref Reference voltage in use (usually 5.0V or 3.3V) + * @param samples Number of samples to average over + * @return Average voltage reading */ float value(float aref, uint8_t samples); diff --git a/src/grove/grove.h b/src/grove/grove.h index a42ca838..e7f0fb97 100644 --- a/src/grove/grove.h +++ b/src/grove/grove.h @@ -32,7 +32,7 @@ namespace upm { /** - * @brief generic library for basic grove sensors + * @brief Generic library for basic Grove sensors * @defgroup grove libupm-grove * @ingroup seeed gpio pwm ainput button led light relay temp touch gsk eak hak */ @@ -48,14 +48,14 @@ class Grove { }; /** - * @brief API for Grove LED + * @brief API for the Grove LED * - * UPM module for Grove LED (or other similar light-emitting diode). - * An LED is a small lightbulb that will emit light (turn on) in - * response to a small curent. The longer wire of an LED connects + * UPM module for the Grove LED (or other similar light-emitting diodes). + * An LED is a small lightbulb that emits light in + * response to a small current. The longer wire of an LED connects * to the positive seat (anode); the shorter wire connects to the - * negative seat (cathode). The flat side of the bulb corresponds - * to the cathode while the rounded side corresponds to the anode. + * negative seat (cathode). The flat side of the bulb corresponds + * to the cathode, while the rounded side corresponds to the anode. * * @ingroup grove gpio * @snippet groveled.cxx Interesting @@ -67,7 +67,7 @@ class GroveLed: public Grove { /** * Grove LED constructor * - * @param gpio pin to use + * @param gpio Pin to use */ GroveLed(int pin); /** @@ -75,27 +75,27 @@ class GroveLed: public Grove { */ ~GroveLed(); /** - * Turn the LED on or off, depending on the value. + * Turns the LED on or off, depending on the value. * If the value is positive (greater than or equal * to 1), the LED is turned on. Otherwise, for 0 * or negative values, the LED is turned off. * - * @param value tells the LED to turn on (for value >=1) - * or off (for value <1) + * @param value Tells the LED to turn on (for values >=1) + * or off (for values <1) * - * @return 0 on success; non-zero otherwise + * @return 0 if successful, non-zero otherwise */ mraa_result_t write(int value); /** - * Turn the LED off + * Turns the LED off * - * @return 0 on success; non-zero otherwise + * @return 0 if successful, non-zero otherwise */ mraa_result_t off(); /** - * Turn the LED on + * Turns the LED on * - * @return 0 on success; non-zero otherwise + * @return 0 if successful, non-zero otherwise */ mraa_result_t on(); private: @@ -103,12 +103,12 @@ class GroveLed: public Grove { }; /** - * @brief API for Grove Relay + * @brief API for the Grove Relay * - * UPM module for Grove relay switch. The Grove relay is a + * UPM module for the Grove relay switch. Grove relay is a * digital normally-open switch that uses low voltage or current to * control a higher voltage and/or higher current. When closed, - * the indicator LED will light up and current is allowed to flow. + * the indicator LED lights up and current is allowed to flow. * * @ingroup grove gpio * @snippet groverelay.cxx Interesting @@ -119,7 +119,7 @@ class GroveRelay: public Grove { /** * Grove relay constructor * - * @param gpio pin to use + * @param gpio Pin to use */ GroveRelay(unsigned int pin); /** @@ -127,29 +127,29 @@ class GroveRelay: public Grove { */ ~GroveRelay(); /** - * Set the relay switch to on (close). This allows current + * Sets the relay switch to on (closed). This allows current * to flow and lights up the indicator LED. * - * @return 0 on success; non-zero otherwise + * @return 0 if successful, non-zero otherwise */ mraa_result_t on(); /** - * Set the relay switch to off (open). This stops current - * from flowing and the indicator LED will not be lit. + * Sets the relay switch to off (open). This stops current + * from flowing and the indicator LED is not lit. * - * @return 0 on success; non-zero otherwise + * @return 0 if successful, non-zero otherwise */ mraa_result_t off(); /** - * Returns whether or not the relay switch is closed. + * Defines whether the relay switch is closed. * - * @return true if the switch is on (closed); false otherwise + * @return True if the switch is on (closed), false otherwise */ bool isOn(); /** - * Returns whether or not the relay switch is open. + * Defines whether the relay switch is open. * - * @return true if the switch is off (open); false otherwise + * @return True if the switch is off (open), false otherwise */ bool isOff(); private: @@ -157,9 +157,9 @@ class GroveRelay: public Grove { }; /** - * @brief API for Grove temperature sensor + * @brief API for the Grove Temperature Sensor * - * Very basic UPM module for Grove temperature sensor on analog + * Basic UPM module for the Grove temperature sensor on analog * * @ingroup grove analog * @snippet grovetemp.cxx Interesting @@ -170,7 +170,7 @@ class GroveTemp: public Grove { /** * Grove analog temperature sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GroveTemp(unsigned int pin); /** @@ -178,15 +178,15 @@ class GroveTemp: public Grove { */ ~GroveTemp(); /** - * Get raw value from AIO pin + * Gets the raw value from the AIO pin * - * @return the raw value from the ADC + * @return Raw value from the ADC */ float raw_value(); /** - * Get the temperature in Celsius from the sensor + * Gets the temperature in Celsius from the sensor * - * @return the normalized temperature in Celsius + * @return Normalized temperature in Celsius */ int value(); private: @@ -194,12 +194,12 @@ class GroveTemp: public Grove { }; /** - * @brief API for Grove light sensor + * @brief API for the Grove Light Sensor * * The Grove light sensor detects the intensity of the ambient light. * As the light intensity of the environment increases, the resistance - * of the sensor decreases. This means that the raw value from the - * analog pin will be larger in bright light and smaller in the dark. + * of the sensor decreases. This means the raw value from the + * analog pin is greater in bright light and smaller in the dark. * An approximate lux value can also be returned. * * @ingroup grove analog @@ -211,23 +211,23 @@ class GroveLight: public Grove { /** * Grove analog light sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GroveLight(unsigned int pin); /** - * GroveLight Destructor + * GroveLight destructor */ ~GroveLight(); /** - * Get raw value from AIO pin + * Gets the raw value from the AIO pin * - * @return the raw value from the ADC + * @return Raw value from the ADC */ float raw_value(); /** - * Get the approximate light value, in lux, from the sensor + * Gets an approximate light value, in lux, from the sensor * - * @return the normalized light reading in lux + * @return Normalized light reading in lux */ int value(); private: @@ -235,11 +235,11 @@ class GroveLight: public Grove { }; /** - * @brief API for Grove Rotary Angle Sensor (Knob) + * @brief API for the Grove Rotary Angle Sensor (Knob) * - * Very basic UPM module for Grove rotary angle sensor (knob) on analog. Provides - * a set of functions to read the absolute pin value, degrees or radians and another - * to do the same relative to the center of the knob's range. + * Basic UPM module for the Grove 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 range. * * @ingroup grove analog * @snippet groverotary.cxx Interesting @@ -250,47 +250,47 @@ class GroveRotary: public Grove { /** * Grove rotary angle sensor constructor * - * @param pin number of analog pin to use + * @param pin Number of the analog pin to use */ GroveRotary(unsigned int pin); /** - * GroveRotary Destructor + * GroveRotary destructor */ ~GroveRotary(); /** - * Get absolute raw value from AIO pin + * Gets the absolute raw value from the AIO pin * - * @return the unsigned value from the ADC + * @return Unsigned value from the ADC */ float abs_value(); /** - * Get absolute raw degrees from AIO pin + * Gets absolute raw degrees from the AIO pin * - * @return the unsigned degrees from the ADC + * @return Unsigned degrees from the ADC */ float abs_deg(); /** - * Get absolute raw radians from AIO pin + * Gets absolute raw radians from the AIO pin * - * @return the unsigned radians from the ADC + * @return Unsigned radians from the ADC */ float abs_rad(); /** - * Get the relative value from the pin + * Gets the relative value from the AIO pin * - * @return the signed value from the ADC + * @return Signed value from the ADC */ float rel_value(); /** - * Get relative degrees from AIO pin + * Gets relative degrees from the AIO pin * - * @return the signed degrees from the ADC + * @return Signed degrees from the ADC */ float rel_deg(); /** - * Get relative radians from AIO pin + * Gets relative radians from the AIO pin * - * @return the signed radians from the ADC + * @return Signed radians from the ADC */ float rel_rad(); private: @@ -299,10 +299,10 @@ class GroveRotary: public Grove { }; /** - * @brief API for Grove Slide Potentiometer + * @brief API for the Grove Slide Potentiometer * - * Very basic UPM module for Grove slide potentiometer on analog, - * returns either raw value or scaled voltage value. + * Basic UPM module for the Grove slide potentiometer on analog that + * returns either a raw value or a scaled voltage value. * * @ingroup grove analog * @snippet groveslide.cxx Interesting @@ -313,31 +313,31 @@ class GroveSlide: public Grove { /** * Grove analog slide potentiometer constructor * - * @param pin number of analog pin to use + * @param pin Number of the analog pin to use * - * @param ref_voltage the reference voltage the board is set to as float, e.g. 3.3 or 5.0 (default) + * @param ref_voltage Reference voltage the board is set to, as a floating-point value; default is 5.0V */ GroveSlide(unsigned int pin, float ref_voltage = 5.0); /** - * GroveSlide Destructor + * GroveSlide destructor */ ~GroveSlide(); /** - * Get raw value from AIO pin + * Gets the raw value from the AIO pin * - * @return the raw value from the ADC + * @return Raw value from the ADC */ float raw_value(); /** - * Get the voltage value from the pin + * Gets the voltage value from the pin * - * @return the voltage reading based on the reference voltage + * @return Voltage reading based on the reference voltage */ float voltage_value(); /** - * Get the board's reference voltage passed on object initialization + * Gets the board's reference voltage passed on object initialization * - * @return the reference voltage the class was set for + * @return Reference voltage the class was set for */ float ref_voltage(); private: @@ -346,9 +346,9 @@ class GroveSlide: public Grove { }; /** - * @brief API for Grove button + * @brief API for the Grove Button * - * Very basic UPM module for Grove button + * Basic UPM module for the Grove button * * @ingroup grove gpio * @snippet grovebutton.cxx Interesting @@ -359,7 +359,7 @@ class GroveButton: public Grove { /** * Grove button constructor * - * @param gpio pin to use + * @param gpio Pin to use */ GroveButton(unsigned int pin); /** @@ -367,15 +367,15 @@ class GroveButton: public Grove { */ ~GroveButton(); /** - * Get name of sensor + * Gets the name of the sensor * - * @return the name of this sensor + * @return Name of this sensor */ std::string name(); /** - * Get value from GPIO pin + * Gets the value from the GPIO pin * - * @return the value from the GPIO pin + * @return Value from the GPIO pin */ int value(); private: diff --git a/src/grove/grovebutton.h b/src/grove/grovebutton.h index b0e0d9d2..6f746ccb 100644 --- a/src/grove/grovebutton.h +++ b/src/grove/grovebutton.h @@ -33,9 +33,9 @@ * @con gpio * @kit gsk * - * @brief API for Grove Button + * @brief API for the Grove Button * - * Very basic UPM module for Grove button + * Basic UPM module for the Grove button * * @image html grovebutton.jpg * @snippet grovebutton.cxx Interesting diff --git a/src/grove/groveled.h b/src/grove/groveled.h index 3b5b0b9b..c35c653e 100644 --- a/src/grove/groveled.h +++ b/src/grove/groveled.h @@ -32,14 +32,14 @@ * @con gpio * @kit gsk * - * @brief API for Grove LED + * @brief API for the Grove LED * - * UPM module for Grove LED (or other similar light-emitting diode). - * An LED is a small lightbulb that will emit light (turn on) in - * response to a small curent. The longer wire of an LED connects + * UPM module for the Grove LED (or other similar light-emitting diodes). + * An LED is a small lightbulb that emits light in + * response to a small current. The longer wire of an LED connects * to the positive seat (anode); the shorter wire connects to the - * negative seat (cathode). The flat side of the bulb corresponds - * to the cathode while the rounded side corresponds to the anode. + * negative seat (cathode). The flat side of the bulb corresponds + * to the cathode, while the rounded side corresponds to the anode. * * @image html groveled.jpg * @snippet groveled.cxx Interesting diff --git a/src/grove/grovelight.h b/src/grove/grovelight.h index fbd3a806..b71d8adc 100644 --- a/src/grove/grovelight.h +++ b/src/grove/grovelight.h @@ -32,12 +32,12 @@ * @con analog * @kit gsk * - * @brief API for Grove Light Sensor + * @brief API for the Grove Light Sensor * * The Grove light sensor detects the intensity of the ambient light. * As the light intensity of the environment increases, the resistance - * of the sensor decreases. This means that the raw value from the - * analog pin will be larger in bright light and smaller in the dark. + * of the sensor decreases. This means the raw value from the + * analog pin is larger in bright light and smaller in the dark. * An approximate lux value can also be returned. * * @image html grovelight.jpg diff --git a/src/grove/groverelay.h b/src/grove/groverelay.h index e108d2b8..6edc77dc 100644 --- a/src/grove/groverelay.h +++ b/src/grove/groverelay.h @@ -32,12 +32,12 @@ * @con gpio * @kit gsk eak hak * - * @brief API for Grove Relay + * @brief API for the Grove Relay * - * UPM module for Grove relay switch. The Grove relay is a + * UPM module for the Grove relay switch. The Grove relay is a * digital normally-open switch that uses low voltage or current to * control a higher voltage and/or higher current. When closed, - * the indicator LED will light up and current is allowed to flow. + * the indicator LED lights up and current is allowed to flow. * * @image html groverelay.jpg * @snippet groverelay.cxx Interesting diff --git a/src/grove/groverotary.h b/src/grove/groverotary.h index a6334ca6..ee989781 100644 --- a/src/grove/groverotary.h +++ b/src/grove/groverotary.h @@ -33,10 +33,10 @@ * @con analog * @kit gsk * - * @brief API for Grove Rotary Angle Sensor (Knob) + * @brief API for the Grove Rotary Angle Sensor (Knob) * - * Very basic UPM module for Grove rotary angle sensor (knob) on analog. Provides - * a set of functions to read the absolute pin value, degrees or radians and another + * Basic UPM module for the Grove 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 groverotary.jpeg diff --git a/src/grove/groveslide.h b/src/grove/groveslide.h index bc57db37..e3cbba19 100644 --- a/src/grove/groveslide.h +++ b/src/grove/groveslide.h @@ -31,10 +31,10 @@ * @man seeed * @con analog * - * @brief API for Grove Slide Potentiometer + * @brief API for the Grove Slide Potentiometer * - * Very basic UPM module for Grove slide potentiometer on analog, - * returns either raw value or scaled voltage value. + * Basic UPM module for the Grove slide potentiometer on analog that + * returns either a raw value or a scaled voltage value. * * @image html groveslide.jpeg * @snippet groveslide.cxx Interesting diff --git a/src/grove/grovetemp.h b/src/grove/grovetemp.h index c6fe7b51..d85ac3e8 100644 --- a/src/grove/grovetemp.h +++ b/src/grove/grovetemp.h @@ -32,9 +32,9 @@ * @con analog * @kit gsk * - * @brief API for Grove Temperature Sensor + * @brief API for the Grove Temperature Sensor * - * Very basic UPM module for Grove temperature sensor on analog + * Basic UPM module for the Grove temperature sensor on analog * * @image html grovetemp.jpg * @snippet grovetemp.cxx Interesting diff --git a/src/grovecircularled/grovecircularled.h b/src/grovecircularled/grovecircularled.h index 44c8bdfa..5db22b9d 100644 --- a/src/grovecircularled/grovecircularled.h +++ b/src/grovecircularled/grovecircularled.h @@ -55,7 +55,7 @@ namespace upm { * @web http://www.seeedstudio.com/wiki/Grove_-_Circular_LED * @con gpio * - * @brief API for Grove Circular LED module + * @brief API for the Grove Circular LED module * * This is a circular LED ring based on the MY9221 chip. It is often used * with a rotary encoder and has 24 controllable LEDs. @@ -66,10 +66,10 @@ namespace upm { class GroveCircularLED { public: /** - * Instantiates a MY9221 object + * Instantiates an MY9221 object * - * @param di data pin - * @param dcki clock pin + * @param di Data pin + * @param dcki Clock pin */ GroveCircularLED (uint8_t di, uint8_t dcki); @@ -79,29 +79,29 @@ namespace upm { ~GroveCircularLED (); /** - * Set the lighting status + * Sets the lighting status * - * @param level selected level for the circular led (0 - 24) - * @param direction up or down, true is up and is the default + * @param level Selected level for the circular LED (0-24) + * @param direction Up or down; up is true and default */ mraa_result_t setLevel (uint8_t level, bool direction=true); /** - * Set the spinner (light up one but all the other LEDs) + * Sets the spinner (lights up all the other LEDs but one) * - * @param position selected position for the spinner (0 - 23) + * @param position Selected position for the spinner (0-23) */ mraa_result_t setSpinner (uint8_t position); /** - * Set the lighting status + * Sets the lighting status * - * @param status boolean array (24 elements) + * @param status Boolean array (24 elements) */ mraa_result_t setStatus (bool status[24]); /** - * Return name of the component + * Returns the name of the component */ std::string name() { diff --git a/src/grovecollision/grovecollision.h b/src/grovecollision/grovecollision.h index a68df72d..57b93f61 100644 --- a/src/grovecollision/grovecollision.h +++ b/src/grovecollision/grovecollision.h @@ -27,7 +27,7 @@ namespace upm { /** - * @brief Grove Collision sensor library + * @brief Grove Collision Sensor library * @defgroup grovecollision libupm-grovecollision * @ingroup seeed gpio accelerometer */ @@ -44,7 +44,7 @@ namespace upm { * * The Grove Collision Sensor can detect whether any * collision movement or vibration happens. - * It will output a low pulse signal when vibration is detected. + * It outputs a low pulse signal when vibration is detected. * * @image html grovecollision.jpg * @snippet grovecollision.cxx Interesting @@ -52,17 +52,17 @@ namespace upm { class GroveCollision { public: /** - * Grove Collision Constructor + * Grove collision sensor constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ GroveCollision(int pin); /** - * Grove Collision Destructor + * GroveCollision destructor */ ~GroveCollision(); /** - * @return bool returns whether something is colliding with sensor + * @return bool Defines whether something is colliding with sensor */ bool isColliding(); diff --git a/src/groveehr/groveehr.h b/src/groveehr/groveehr.h index 02f9642b..94ac5b48 100644 --- a/src/groveehr/groveehr.h +++ b/src/groveehr/groveehr.h @@ -30,7 +30,7 @@ namespace upm { /** - * @brief Grove Ear-clip Heart Rate sensor library + * @brief Grove Ear-clip Heart Rate Sensor library * @defgroup groveehr libupm-groveehr * @ingroup seeed gpio medical */ @@ -43,10 +43,10 @@ namespace upm { * @man seeed * @con gpio * - * @brief API for the Grove Ear-clip Heart Rate sensor + * @brief API for the Grove Ear-clip Heart Rate Sensor * - * UPM module for the GroveEHR sensor. It is used to measure your - * heartbeat. + * UPM module for the Grove ear-clip heart rate sensor. It is used to measure your + * heart rate. * * @image html groveehr.jpg * @snippet groveehr.cxx Interesting @@ -56,63 +56,63 @@ namespace upm { /** * GroveEHR constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ GroveEHR(int pin); /** - * GroveEHR Destructor + * GroveEHR destructor */ ~GroveEHR(); /** - * Return the number of milliseconds elapsed since initClock() + * Returns the time of milliseconds elapsed since initClock() * was last called. * - * @return elapsed milliseconds + * @return Elapsed milliseconds */ uint32_t getMillis(); /** - * Reset the Clock + * Resets the clock * */ void initClock(); /** - * Reset the beat counter to 0. The beat Counter should be + * Resets the beat counter to 0. The beat counter should be * stopped via stopBeatCounter() prior to calling this function. * */ void clearBeatCounter(); /** - * Start the beat counter + * Starts the beat counter * */ void startBeatCounter(); /** - * Stop the beat counter + * Stops the beat counter * */ void stopBeatCounter(); /** - * Get the beat Counter + * Gets the beat Counter * - * @return the beat counter + * @return Beat counter */ uint32_t beatCounter(); /** - * Beat Interrupt Service Routine + * Beat interrupt service routine (ISR) * */ static void beatISR(void *ctx); /** - * Compute the heart rate + * Computes the heart rate * - * @return the computed heart rate + * @return Computed heart rate */ int heartRate(); diff --git a/src/groveeldriver/groveeldriver.h b/src/groveeldriver/groveeldriver.h index a76e1f72..7ed7963b 100644 --- a/src/groveeldriver/groveeldriver.h +++ b/src/groveeldriver/groveeldriver.h @@ -30,7 +30,7 @@ namespace upm { /** - * @brief Grove El Driver module library + * @brief Grove EL Driver Module library * @defgroup groveeldriver libupm-groveeldriver * @ingroup seeed gpio electric */ @@ -38,15 +38,15 @@ namespace upm { /** * @library groveeldriver * @sensor groveeldriver - * @comname Grove El Driver + * @comname Grove EL Driver * @type electric * @man seeed * @con gpio * - * @brief API for the Grove El Driver Module + * @brief API for the Grove EL Driver Module * * The Grove EL Driver allows you to easily light up an - * EL Wire with just one single Grove cable. + * EL wire with just one single Grove cable. * * @image html groveeldriver.jpg * @snippet groveeldriver.cxx Interesting @@ -54,21 +54,21 @@ namespace upm { class GroveElDriver { public: /** - * Grove El Driver Constructor + * Grove EL Driver constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ GroveElDriver(int pin); /** - * Grove El Driver Destructor + * Grove EL Driver destructor */ ~GroveElDriver(); /** - * Turn el wire on + * Turns the EL wire on */ void on(); /** - * Turn el wire off + * Turns the EL wire off */ void off(); diff --git a/src/groveelectromagnet/groveelectromagnet.h b/src/groveelectromagnet/groveelectromagnet.h index dc2b4103..c39ae4ca 100644 --- a/src/groveelectromagnet/groveelectromagnet.h +++ b/src/groveelectromagnet/groveelectromagnet.h @@ -45,7 +45,7 @@ namespace upm { * * @brief API for the Grove Electromagnet * - * The Grove Electromagnet can hold up to 1 KG (approximately 2.2 lbs) + * The Grove Electromagnet can hold up to 1 kg (approximately 2.2 lbs) * * @image html groveelectromagnet.jpg * @snippet groveelectromagnet.cxx Interesting @@ -53,21 +53,21 @@ namespace upm { class GroveElectromagnet { public: /** - * Grove Electromagnet Constructor + * Grove Electromagnet constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ GroveElectromagnet(int pin); /** - * Grove Electromagnet Destructor + * Grove Electromagnet destructor */ ~GroveElectromagnet(); /** - * Turn magnet on + * Turns the magnet on */ void on(); /** - * Turn magnet off + * Turns the magnet off */ void off(); diff --git a/src/groveemg/groveemg.h b/src/groveemg/groveemg.h index 783f3247..eef5fa34 100644 --- a/src/groveemg/groveemg.h +++ b/src/groveemg/groveemg.h @@ -28,7 +28,7 @@ namespace upm { /** - * @brief GroveEMG Muscle Signal reader sensor library + * @brief Grove EMG Muscle Signal Reader library * @defgroup groveemg libupm-groveemg * @ingroup seeed analog electric */ @@ -41,10 +41,10 @@ namespace upm { * @man seeed * @con analog * - * @brief API for the GroveEMG Muscle Signal Reader Sensor + * @brief API for the Grove EMG Muscle Signal Reader * - * GroveEMG Muscle Signal reader gathers small muscle signals, - * then processes and returns the result + * Grove EMG muscle signal reader gathers small muscle signals, + * then processes them, and returns the result * * @image html groveemg.jpg * @snippet groveemg.cxx Interesting @@ -52,25 +52,25 @@ namespace upm { class GroveEMG { public: /** - * GroveEMG sensor constructor + * Grove EMG reader constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GroveEMG(int pin); /** - * GroveEMG Destructor + * GroveEMG destructor */ ~GroveEMG(); /** - * Calibrate the GroveEMG Sensor + * Calibrates the Grove EMG reader */ void calibrate(); /** - * Measure the muscle signals from the sensor + * Measures muscle signals from the reader * - * @return the muscle output as analog voltage + * @return Muscle output as analog voltage */ int value(); diff --git a/src/grovegsr/grovegsr.h b/src/grovegsr/grovegsr.h index b023b46f..32666abf 100644 --- a/src/grovegsr/grovegsr.h +++ b/src/grovegsr/grovegsr.h @@ -28,7 +28,7 @@ namespace upm { /** - * @brief GroveGSR Galvanic Skin Response sensor library + * @brief Grove GSR Galvanic Skin Response Sensor library * @defgroup grovegsr libupm-grovegsr * @ingroup seeed analog electric */ @@ -41,10 +41,10 @@ namespace upm { * @man seeed * @con analog * - * @brief API for the GroveGSR Galvanic Skin Response Sensor + * @brief API for the Grove GSR Galvanic Skin Response Sensor * - * Measure the electrical conductance of skin in order - * to measure strong emotional reaction. + * Measures the electrical conductance of skin + * to measure strong emotional reactions. * In other words, it measures sweat on your fingers * as an indicator of strong emotional reactions. * @@ -54,25 +54,25 @@ namespace upm { class GroveGSR { public: /** - * GroveGSR sensor constructor + * Grove GSR sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GroveGSR(int pin); /** - * GroveGSR Destructor + * GroveGSR destructor */ ~GroveGSR(); /** - * Calibrate the GroveGSR Sensor + * Calibrates the Grove GSR sensor */ void calibrate(); /** - * Measure the electrical conductance of the skin from the sensor + * Gets the electrical conductance of the skin from the sensor * - * @return the electrical conductance of the skin + * @return Electrical conductance of the skin */ int value(); diff --git a/src/grovelinefinder/grovelinefinder.h b/src/grovelinefinder/grovelinefinder.h index e63cebaf..5e662a2e 100644 --- a/src/grovelinefinder/grovelinefinder.h +++ b/src/grovelinefinder/grovelinefinder.h @@ -28,7 +28,7 @@ namespace upm { /** - * @brief Grove Line Finder sensor library + * @brief Grove Line Finder Sensor library * @defgroup grovelinefinder libupm-grovelinefinder * @ingroup seeed gpio color robok */ @@ -42,7 +42,7 @@ namespace upm { * @con gpio * @kit robok * - * @brief API for the Grove Line Finder sensor + * @brief API for the Grove Line Finder Sensor * * UPM module for the Grove Line Finder sensor. It outputs a * digital signal indicating whether it is detecting black on a @@ -56,23 +56,23 @@ namespace upm { /** * Grove Line Finder digital sensor constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ GroveLineFinder(int pin); /** - * GroveLineFinder Destructor + * GroveLineFinder destructor */ ~GroveLineFinder(); /** - * Determine whether white has been detected + * Determines whether white has been detected * - * @return True if white is being detected + * @return True if white is detected */ bool whiteDetected(); /** - * Determine whether black has been detected + * Determines whether black has been detected * - * @return True if black is being detected + * @return True if black is detected */ bool blackDetected(); diff --git a/src/groveloudness/groveloudness.h b/src/groveloudness/groveloudness.h index 2e5ff21f..835d8df5 100644 --- a/src/groveloudness/groveloudness.h +++ b/src/groveloudness/groveloudness.h @@ -43,7 +43,7 @@ namespace upm { * * @brief API for the Grove Loudness Sensor * - * UPM module for the Grove Loudness Sensor. This sensor + * UPM module for the Grove Loudness Sensor. This sensor * detects how loud the surrounding environment is. * The higher the output analog value, the louder the sound. * @@ -55,17 +55,17 @@ namespace upm { /** * Grove analog loudness sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GroveLoudness(int pin); /** - * GroveLoudness Destructor + * GroveLoudness destructor */ ~GroveLoudness(); /** - * Get the loudness value from the sensor + * Gets the loudness value from the sensor * - * @return the loudness reading + * @return Loudness reading */ int value(); diff --git a/src/grovemd/grovemd.h b/src/grovemd/grovemd.h index c5301029..cec4d01a 100644 --- a/src/grovemd/grovemd.h +++ b/src/grovemd/grovemd.h @@ -34,7 +34,7 @@ namespace upm { /** - * @brief Grove I2C motor driver library + * @brief Grove I2C Motor Driver library * @defgroup grovemd libupm-grovemd * @ingroup seeed i2c motor robok */ @@ -51,13 +51,13 @@ namespace upm { * @brief API for the Grove I2C Motor Driver * * This class implements support for the Grove I2C Motor Driver. - * This device can support a single 4-wire stepper motor, OR two - * 2-wire DC motors. The device contains an Atmel ATmega8L + * This device can support a single 4-wire stepper motor, or two + * 2-wire DC motors. The device contains an Atmel* ATmega8L * microcontroller that manages an L298N H-bridge driver chip. * - * This device supports an i2c bus speed of 100Khz only. + * This device supports an I2C bus speed of 100Khz only. * - * The module does not provide any telemetry or status -- it only + * The module does not provide any telemetry or status - it only * accepts I2C commands for its various operations. * * This module was tested with version 1.3 of the Grove I2C Motor @@ -91,82 +91,82 @@ namespace upm { } DC_DIRECTION_T; /** - * grovemd constructor + * GroveMD constructor * - * @param bus i2c bus to use - * @param address i2c address to use + * @param bus I2C bus to use + * @param address I2C address to use */ GroveMD(int bus=GROVEMD_I2C_BUS, uint8_t address=GROVEMD_DEFAULT_I2C_ADDR); /** - * GroveMD Destructor + * GroveMD destructor */ ~GroveMD(); /** - * Compose and write a 3-byte packet to the controller + * Composes and writes a 3-byte packet to the controller * - * @param reg register location - * @param data1 first byte of data - * @param data2 second byte of data - * @return true if write successful + * @param reg Register location + * @param data1 First byte of data + * @param data2 Second byte of data + * @return True if successful */ bool writePacket(REG_T reg, uint8_t data1, uint8_t data2); /** - * For controlling DC motors, set the speeds of motors A & B. + * To control DC motors, sets the speed of motors A & B. * Valid values are 0-255. * - * @param speedA speed of motor A - * @param speedB speed of motor B - * @return true if command successful + * @param speedA Speed of motor A + * @param speedB Speed of motor B + * @return True if successful */ bool setMotorSpeeds(uint8_t speedA, uint8_t speedB); /** - * For controlling DC motors, set the PWM frequency prescale - * factor. Note this register is not ducumented other than to say - * that the default value is 0x03. Presumably this is the timer - * pre-scale factor used on the ATMega MCU timer driving the PWM. + * To control DC motors, sets the PWM frequency prescale + * factor. Note: this register is not ducumented other than to say + * the default value is 0x03. Presumably, this is the timer + * prescale factor used on the ATMega MCU timer driving the PWM. * - * @param freq PWM prescale frequency, default 0x03 - * @return true if command successful + * @param freq PWM prescale frequency; default is 0x03 + * @return True if successful */ bool setPWMFrequencyPrescale(uint8_t freq=0x03); /** - * For controlling DC motors, set the directions of motors A & B + * To control DC motors, sets the directions of motors A & B * - * @param dirA direction for motor A, DIR_CW or DIR_CCW - * @param dirB direction for motor B, DIR_CW or DIR_CCW - * @return true if command successful + * @param dirA Direction for motor A, DIR_CW or DIR_CCW + * @param dirB Direction for motor B, DIR_CW or DIR_CCW + * @return True if successful */ bool setMotorDirections(DC_DIRECTION_T dirA, DC_DIRECTION_T dirB); /** - * For controlling a stepper motor, set a direction, speed and - * then enable. + * To control a stepper motor, sets its direction and speed, and + * then enables it. * - * @param dir direction, STEP_DIR_CW or STEP_DIR_CCW - * @param speed motor speed. Valid range is 1-255, higher is slower. - * @return true if command successful + * @param dir Direction, STEP_DIR_CW or STEP_DIR_CCW + * @param speed Motor speed. Valid range is 1-255, higher is slower. + * @return True if successful */ bool enableStepper(STEP_DIRECTION_T dir, uint8_t speed); /** - * For controlling a stepper motor, stop the stepper motor. + * To control a stepper motor, stops the stepper motor. * - * @return true if command successful + * @return True if successful */ bool disableStepper(); /** - * For controlling a stepper motor, specify the number of steps to - * execute. Valid values are 1-255, 255 means to rotate continuously. + * To control a stepper motor, specifies the number of steps to + * execute. Valid values are 1-255, 255 means continuous rotation. * - * @param steps number of steps to execute. 255 means rotate continously. - * @return true if command successful + * @param steps Number of steps to execute. 255 means continuous rotation. + * @return True if successful */ bool setStepperSteps(uint8_t steps); diff --git a/src/grovemoisture/grovemoisture.h b/src/grovemoisture/grovemoisture.h index 8ae2fd7a..2b08170e 100644 --- a/src/grovemoisture/grovemoisture.h +++ b/src/grovemoisture/grovemoisture.h @@ -28,7 +28,7 @@ namespace upm { /** - * @brief Grove Moisture sensor library + * @brief Grove Moisture Sensor library * @defgroup grovemoisture libupm-grovemoisture * @ingroup seeed analog liquid eak hak */ @@ -48,7 +48,7 @@ namespace upm { * This sensor can be used to detect the moisture content * of soil or whether there is water around the sensor. * As the moisture content increases, so does the value that is read. - * Note that this sensor is not designed to be left in soil + * Note: this sensor is not designed to be left in soil * nor to be used outdoors. * * @image html grovemoisture.jpg @@ -59,17 +59,17 @@ namespace upm { /** * Grove analog moisture sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GroveMoisture(int pin); /** - * GroveMoisture Destructor + * GroveMoisture destructor */ ~GroveMoisture(); /** - * Get the moisture value from the sensor + * Gets the moisture value from the sensor * - * @return the moisture reading + * @return Moisture reading */ int value(); diff --git a/src/groveo2/groveo2.h b/src/groveo2/groveo2.h index 2efcb4ff..16081d23 100644 --- a/src/groveo2/groveo2.h +++ b/src/groveo2/groveo2.h @@ -28,7 +28,7 @@ namespace upm { /** - * @brief GroveO2 Oxygen Gas Sensor library + * @brief Grove O2 Oxygen Gas Sensor library * @defgroup groveo2 libupm-groveo2 * @ingroup seeed analog gaseous */ @@ -41,9 +41,9 @@ namespace upm { * @man seeed * @con analog * - * @brief API for the GroveO2 Oxygen Gas Sensor + * @brief API for the Grove O2 Oxygen Gas Sensor * - * The Grove O2 sensor measures the oxygen concentration in the air + * The Grove O2 Oxygen Gas sensor measures the oxygen concentration in the air * * @image html groveo2.jpg * @snippet groveo2.cxx Interesting @@ -51,19 +51,19 @@ namespace upm { class GroveO2 { public: /** - * GroveO2 sensor constructor + * Grove O2 Oxygen Gas sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GroveO2(int pin); /** - * GroveO2 Destructor + * GroveO2 destructor */ ~GroveO2(); /** * Measures O2 from the sensor * - * @return the Oxygen concentration as voltage + * @return Oxygen concentration as voltage */ float voltageValue(); diff --git a/src/grovescam/grovescam.h b/src/grovescam/grovescam.h index afe869a2..da65e448 100644 --- a/src/grovescam/grovescam.h +++ b/src/grovescam/grovescam.h @@ -1,4 +1,4 @@ -/* +/* * Author: Jon Trulson * Copyright (c) 2015 Intel Corporation. * @@ -64,12 +64,12 @@ namespace upm { * * @brief API for the Grove Serial Camera * - * The driver was tested with the Grove Serial Camera. There is + * The driver was tested with the Grove Serial Camera. There is * no protocol documentation currently available, so this module - * was developed based completely on the Seeed Studio Arduino + * was developed based completely on the Seeed Studio* Arduino* * sketch. * - * It is connected via a UART at 115200 baud. + * It is connected via a UART at 115,200 baud. * * @image html grovescam.jpg * @snippet grovescam.cxx Interesting @@ -87,95 +87,95 @@ namespace upm { } PIC_FORMATS_T; /** - * GROVESCAM module constructor + * Grove Serial Camera constructor * - * @param uart default uart to use (0 or 1) - * @param camAddr the 3-bit address identifier of the camera, default 0 + * @param uart Default UART to use (0 or 1) + * @param camAddr 3-bit address identifier of the camera; default is 0 */ GROVESCAM(int uart, uint8_t camAddr=GROVESCAM_DEFAULT_CAMERA_ADDR); /** - * GROVESCAM module Destructor + * GROVESCAM destructor */ ~GROVESCAM(); /** - * check to see if there is data available for reading + * Checks to see if there is data available for reading * - * @param millis number of milliseconds to wait, 0 means no wait. - * @return true if there is data available to be read + * @param millis Number of milliseconds to wait; 0 means no waiting. + * @return True if there is data available for reading */ bool dataAvailable(unsigned int millis); /** - * read any available data into a user-supplied buffer. Note, the - * call will block until data is available to be read. Use + * Reads any available data into a user-supplied buffer. Note: the + * call blocks until data is available to be read. Use * dataAvailable() to determine whether there is data available * beforehand, to avoid blocking. * - * @param buffer the buffer to hold the data read - * @param len the length of the buffer - * @return the number of bytes read + * @param buffer Buffer to hold the data read + * @param len Length of the buffer + * @return Number of bytes read */ int readData(uint8_t *buffer, size_t len); /** - * write the data in buffer to the device + * Writes the data in the buffer to the device * - * @param buffer the buffer to hold the data read - * @param len the length of the buffer - * @return the number of bytes written + * @param buffer Buffer to hold the data read + * @param len Length of the buffer + * @return Number of bytes written */ int writeData(uint8_t *buffer, size_t len); /** - * setup the proper tty i/o modes and the baudrate. The default - * baud rate is 9600 (B9600) for this device. + * Sets up proper tty I/O modes and the baud rate. For this device, the default + * baud rate is 9,600 (B9600). * - * @param baud the desired baud rate. - * @return true if successful + * @param baud Desired baud rate + * @return True if successful */ bool setupTty(speed_t baud=B115200); /** - * read serial input and discard until no more characters are available + * Reads serial input and discards until no more characters are available * */ void drainInput(); /** - * initialize the camera + * Initializes the camera * */ bool init(); /** - * tell camera to prepare for a capture + * Tells the camera to prepare for a capture * - * @param fmt one of the PIC_FORMATS_T values + * @param fmt One of the PIC_FORMATS_T values */ bool preCapture(PIC_FORMATS_T fmt=FORMAT_VGA); /** - * start the capture + * Starts the capture * - * @return true if successful + * @return True if successful */ bool doCapture(); /** - * store the captured image in a file + * Stores the captured image in a file * - * @param fname the name of the file to write - * @return true if successful + * @param fname Name of the file to write + * @return True if successful */ bool storeImage(char *fname); /** - * return the picture length. Note, this is only valid after + * Returns the picture length. Note: this is only valid after * doCapture() has run successfully. * - * @return the image length + * @return Image length */ int getImageSize() { return m_picTotalLen; }; diff --git a/src/grovespeaker/grovespeaker.h b/src/grovespeaker/grovespeaker.h index fd000a85..535dc484 100644 --- a/src/grovespeaker/grovespeaker.h +++ b/src/grovespeaker/grovespeaker.h @@ -55,9 +55,9 @@ typedef struct * @con gpio * @kit hak * - * @brief API for the GroveSpeaker speaker + * @brief API for the Grove Speaker * - * UPM module for the GroveSpeaker. + * UPM module for the Grove Speaker. * This sensor can generate different tones and sounds depending on the * frequency of the input signal. * @@ -67,28 +67,28 @@ typedef struct class GroveSpeaker { public: /** - * GroveSpeaker Constructor + * Grove Speaker constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ GroveSpeaker(int pin); /** - * GroveSpeaker Destructor + * GroveSpeaker destructor */ ~GroveSpeaker(); /** - * Play all alto notes (lowest notes) + * Plays all alto notes (lowest notes) * */ void playAll(); /** - * Play a sound and note whether it's sharp or not + * Plays a sound and a note whether it's sharp or not * - * @param letter character name of note + * @param letter Character name of the note * ('a', 'b', 'c', 'd', 'e', 'f', or 'g') - * @param sharp if true, play sharp version of note; otherwise, do not - * @param vocalWeight string to determine whether to play low ("low"), - * medium ("med"), or high ("high") note + * @param sharp If true, plays a sharp version of the note; otherwise, does not play the note + * @param vocalWeight String to determine whether to play a low ("low"), + * a medium ("med"), or a high ("high") note */ void playSound(char letter, bool sharp, std::string vocalWeight); diff --git a/src/grovevdiv/grovevdiv.h b/src/grovevdiv/grovevdiv.h index f02649cd..5fa3bc34 100644 --- a/src/grovevdiv/grovevdiv.h +++ b/src/grovevdiv/grovevdiv.h @@ -28,15 +28,15 @@ #include #include -// ref voltage in millivolts +// reference voltage in millivolts #define GROVEVDIV_VREF 4980 -// default ADC resolution. +// default ADC resolution #define GROVEVDIV_ADC_RES 1024 namespace upm { /** - * @brief Grove Voltage Divider sensor library + * @brief Grove Voltage Divider Sensor library * @defgroup grovevdiv libupm-grovevdiv * @ingroup seeed analog electric robok */ @@ -52,7 +52,7 @@ namespace upm { * * @brief API for the Grove Voltage Divider Sensor * - * UPM module for the Grove Voltage Divider Sensor + * UPM module for the Grove Voltage Divider sensor * * @image html grovevdiv.jpg * @snippet grovevdiv.cxx Interesting @@ -62,32 +62,32 @@ namespace upm { /** * Grove Voltage Divider sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GroveVDiv(int pin); /** - * Grove Voltage Divider Destructor + * Grove Voltage Divider destructor */ ~GroveVDiv(); /** - * Get the conversion value from the sensor + * Gets the conversion value from the sensor * - * @param samples specifies how many samples to average over - * @return the averaged ADC conversion value + * @param samples Specifies how many samples to average over + * @return Average ADC conversion value */ unsigned int value(unsigned int samples); /** - * Compute the measured voltage + * Computes the measured voltage * - * @param gain gain switch, either 3 or 10 for grove - * @param val measured voltage (from value()) - * @param vref reference voltage in millivolts + * @param gain Gain switch, either 3 or 10 for Grove + * @param val Measured voltage (from value()) + * @param vref Reference voltage in millivolts * @param res ADC resolution * - * @return the measured voltage + * @return Measured voltage */ float computedValue(uint8_t gain, uint16_t val, int vref=GROVEVDIV_VREF, int res=GROVEVDIV_ADC_RES); diff --git a/src/grovewater/grovewater.h b/src/grovewater/grovewater.h index 6227153a..50e74b4e 100644 --- a/src/grovewater/grovewater.h +++ b/src/grovewater/grovewater.h @@ -28,7 +28,7 @@ namespace upm { /** - * @brief Grove Water sensor library + * @brief Grove Water Sensor library * @defgroup grovewater libupm-grovewater * @ingroup seeed gpio liquid eak */ @@ -44,7 +44,7 @@ namespace upm { * * @brief API for the Grove Water Sensor * - * UPM module for the Grove Water Sensor + * UPM module for the Grove Water sensor * * @image html grovewater.jpg * @snippet grovewater.cxx Interesting @@ -54,15 +54,15 @@ namespace upm { /** * Grove digital water sensor constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ GroveWater(int pin); /** - * GroveWater Destructor + * GroveWater destructor */ ~GroveWater(); /** - * Get the water (wet/not wet) value from the sensor + * Gets the water (wet/not wet) value from the sensor * * @return True if the sensor is wet, false otherwise */ diff --git a/src/grovewfs/grovewfs.h b/src/grovewfs/grovewfs.h index 2581d243..382ecbf7 100644 --- a/src/grovewfs/grovewfs.h +++ b/src/grovewfs/grovewfs.h @@ -31,7 +31,7 @@ namespace upm { /** - * @brief Grove Water Flow sensor library + * @brief Grove Water Flow Sensor library * @defgroup grovewfs libupm-grovewfs * @ingroup seeed gpio liquid eak */ @@ -48,17 +48,17 @@ namespace upm { * @brief API for the Grove Water Flow Sensor * - * This sensor is used to measure water flow, in LPM (Liters Per - * Minute). It incorporates a Hall Effect Sensor. The UPM module + * This sensor is used to measure water flow in liters per + * minute (LPM). It incorporates a Hall Effect sensor. The UPM module * defines an interrupt routine to be triggered on each low pulse, - * keeping count. This device requires a 10K pullup resistor for - * the signal line (yellow wire). There is a schematic diagram on - * the seeedstudio site (3/2015): + * keeping count. This device requires a 10K pull-up resistor for + * the signal line (yellow wire). There is a schematic diagram on + * the SeeedStudio site (3/2015): * http://www.seeedstudio.com/wiki/index.php?title=G1/2_Water_Flow_sensor * - * However, be careful in wiring this up - the schematic appears to + * However, be careful when wiring this up - the schematic appears to * have a bug in it: the lower left connection of the signal line - * (yellow) to Vcc (red) should not be there. The sensor may work + * (yellow) to Vcc (red) should not be there. The sensor can work * with this connection, but probably not for very long. * * @image html grovewfs.jpg @@ -67,65 +67,65 @@ namespace upm { class GroveWFS { public: /** - * GroveWFS constructor + * Grove Water Flow sensor constructor * - * @param pin digital pin to use + * @param pin Digital pin to use */ GroveWFS(int pin); /** - * GroveWFS Destructor + * GroveWFS destructor */ ~GroveWFS(); /** - * Return the number of milliseconds elapsed since initClock() + * Returns the number of milliseconds elapsed since initClock() * was last called. * - * @return elapsed milliseconds + * @return Elapsed milliseconds */ uint32_t getMillis(); /** - * Reset the Clock + * Resets the clock * */ void initClock(); /** - * Reset 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. * */ void clearFlowCounter() { m_flowCounter = 0; }; /** - * Start the flow counter + * Starts the flow counter * */ void startFlowCounter(); /** - * Stop the flow counter + * Stops the flow counter * */ void stopFlowCounter(); /** - * Get the flow Counter + * Gets the flow counter * - * @return the flow counter + * @return Flow counter */ uint32_t flowCounter() { return m_flowCounter; }; /** - * Flow Interrupt Service Routine + * Flow interrupt service routine (ISR) * */ static void flowISR(void *ctx); /** - * Compute the flow rate in liters per minute (LPM) + * Computes the flow rate in liters per minute (LPM) * - * @return the computed flow rate + * @return Computed flow rate */ float flowRate(); diff --git a/src/guvas12d/guvas12d.h b/src/guvas12d/guvas12d.h index 7b3b2cea..9ca2f5c1 100644 --- a/src/guvas12d/guvas12d.h +++ b/src/guvas12d/guvas12d.h @@ -43,9 +43,9 @@ namespace upm { * @con analog * @kit eak * - * @brief API for the GUVAS12D UV sensor module + * @brief API for the GUVA-S12D UV Sensor * - * UPM module for the GUVAS12D UV Sensor + * UPM module for the GUVA-S12D UV sensor * * @image html guvas12d.jpg * @snippet guvas12d.cxx Interesting @@ -53,21 +53,21 @@ namespace upm { class GUVAS12D { public: /** - * GUVAS12D sensor constructor + * GUVA-S12D UV sensor constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ GUVAS12D(int pin); /** - * GUVAS12D Destructor + * GUVAS12D destructor */ ~GUVAS12D(); /** - * Get the averaged voltage value from the sensor + * Gets the average voltage value from the sensor * - * @param aref the reference voltage in use (5.0 or 3.3 usually) - * @param samples number of samples to average over - * @return the averaged voltage reading + * @param aref Reference voltage in use (usually 5.0 V or 3.3 V) + * @param samples Number of samples to average over + * @return Average voltage reading */ float value(float aref, unsigned int samples); diff --git a/src/h3lis331dl/h3lis331dl.h b/src/h3lis331dl/h3lis331dl.h index d1a1e9b8..2e319ed8 100644 --- a/src/h3lis331dl/h3lis331dl.h +++ b/src/h3lis331dl/h3lis331dl.h @@ -32,7 +32,7 @@ namespace upm { /** - * @brief H3LIS331DL I2C accelerometer (400g) library + * @brief H3LIS331DL I2C Accelerometer (400g) library * @defgroup h3lis331dl libupm-h3lis331dl * @ingroup seeed i2c accelerometer */ @@ -47,9 +47,9 @@ namespace upm { * @web http://www.seeedstudio.com/depot/Grove-3Axis-Digital-Accelerometer400g-p-1897.html * @con i2c * - * @brief API for the H3LIS331DL based Grove 3-axis I2C (400G) + * @brief API for the H3LIS331DL-based Grove 3-Axis Digital Accelerometer (400g) * - * This is a high performance, high range accelerometer for extreme applications. + * This is a high-performance, high-range accelerometer for extreme applications. * * @image html h3lis331dl.jpg * @snippet h3lis331dl.cxx Interesting @@ -62,7 +62,7 @@ namespace upm { */ typedef enum { // Reserved bytes must not be written into as they contain - // factory calibration data. Changing those values may lead to + // factory calibration data. Changing those values may lead to // improper functioning of the device. // 0x00-0x0E reserved @@ -108,7 +108,7 @@ namespace upm { * REG1 bits */ typedef enum { - REG1_XEN = 0x01, // X axis enable + REG1_XEN = 0x01, // X-axis enable REG1_YEN = 0x02, REG1_ZEN = 0x04, @@ -133,7 +133,7 @@ namespace upm { } DR_BITS_T; /** - * REG1 PM (Power mode) bits + * REG1 PM (power mode) bits */ typedef enum { PM_POWERDWN = 0x0, @@ -165,7 +165,7 @@ namespace upm { } REG2_BITS_T; /** - * REG2 HPCF (High Pass Cutoff Frequency) bits + * REG2 HPCF (high-pass cutoff frequency) bits */ typedef enum { HPCF_8 = 0x0, @@ -175,7 +175,7 @@ namespace upm { } HPCF_BITS_T; /** - * REG2 HPM (High Pass Filter Mode) bits + * REG2 HPM (high-pass filter mode) bits */ typedef enum { HPM_NORMAL0 = 0x0, @@ -224,12 +224,12 @@ namespace upm { REG4_FS1 = 0x20, REG4_FS_SHIFT = 4, - REG4_BLE = 0x40, // big/little endian + REG4_BLE = 0x40, // big/little-endian REG4_BDU = 0x80 // Block data update } REG4_BITS_T; /** - * REG4 FS (Full Scale) bits + * REG4 FS (full scale) bits */ typedef enum { FS_100 = 0x0, // 100g scale @@ -241,7 +241,7 @@ namespace upm { * REG5 TURNON (sleep to wake) bits */ typedef enum { - REG5_TURNON0 = 0x01, // turnon mode for sleep-to-wake + REG5_TURNON0 = 0x01, // turn-on mode for sleep-to-wake REG5_TURNON1 = 0x02 // bits 04-80 reserved @@ -290,314 +290,314 @@ namespace upm { } INT_SRC_BITS_T; /** - * h3lis331dl constructor + * H3LIS331DL constructor * - * @param bus i2c bus to use - * @param address the address for this device + * @param bus I2C bus to use + * @param address Address for this device */ H3LIS331DL(int bus, uint8_t address = H3LIS331DL_DEFAULT_I2C_ADDR); /** - * H3LIS331DL Destructor + * H3LIS331DL destructor */ ~H3LIS331DL(); /** - * set up initial values and start operation + * Sets up initial values and starts operation * - * @param odr the data rate: one of the DR_BITS_T values - * @param pm the power mode: one of the PM_BITS_T values - * @param fs the FullScale: one of the FS_BITS_T values - * @return true if successful + * @param odr Data rate: one of the DR_BITS_T values + * @param pm Power mode: one of the PM_BITS_T values + * @param fs FullScale: one of the FS_BITS_T values + * @return True if successful */ bool init(DR_BITS_T odr=DR_50_37, PM_BITS_T pm=PM_NORMAL, FS_BITS_T fs=FS_100); /** - * read and return the Chip ID (WHO_AM_I register) + * Reads and returns the chip ID (WHO_AM_I register) * - * @return true if successful + * @return True if successful */ uint8_t getChipID(); /** - * set the output data rate + * Sets the output data rate * - * @param one of the DR_BITS_T values - * @return true if successful + * @param One of the DR_BITS_T values + * @return True if successful */ bool setDataRate(DR_BITS_T odr); /** - * set the power mode + * Sets the power mode * - * @param one of the PM_BITS_T values - * @return true if successful + * @param One of the PM_BITS_T values + * @return True if successful */ bool setPowerMode(PM_BITS_T pm); /** - * enable one or more of the 3 axes. The arguement is a bitmsk - * composed of REG1_XEN, REG1_YEN and/or REG1_ZEN corresponding + * Enables one or more of the 3 axes. The arguement is a bitmask + * composed of REG1_XEN, REG1_YEN, and/or REG1_ZEN corresponding to * the axes you want enabled. * - * @param axisEnable bitmask of axes to enable + * @param axisEnable Bitmask of axes to enable * (REG1_XEN | REG1_YEN | REG1_ZEN) - * @return true if successful + * @return True if successful */ bool enableAxis(uint8_t axisEnable); /** - * set the scaling factor to 100, 200, or 400G's + * Sets the scaling factor to 100g, 200g, or 400g * - * @param fs one of the FS_BITS_T values - * @return true if successful + * @param fs One of the FS_BITS_T values + * @return True if successful */ bool setFullScale(FS_BITS_T fs); /** - * set high pass cutoff filter + * Sets a high-pass cutoff filter * - * @param val one of the HPCF_BITS_T values - * @return true if successful + * @param val One of the HPCF_BITS_T values + * @return True if successful */ bool setHPCF(HPCF_BITS_T val); /** - * set high pass filter mode + * Sets a high-pass filter mode * - * @param val one of the HPM_BITS_T values - * @return true if successful + * @param val One of the HPM_BITS_T values + * @return True if successful */ bool setHPM(HPM_BITS_T val); /** - * boot the device. Booting the device causes internal flash - * calibration values to be reloaded into the visible registers, - * in the event they have been corrupted. This function will - * return when boot is complete. + * Boots the device. Booting the device causes internal flash + * calibration values to be reloaded into the visible registers + * in case they have been corrupted. This function + * returns when the booting is complete. * - * @return true if successful + * @return True if successful */ bool boot(); /** - * enable high pass filter for interrupt 1 source + * Enables a high-pass filter for interrupt 1 source * - * @param enable true to enable the filter, false otherwise - * @return true if successful + * @param enable True to enable the filter, false otherwise + * @return True if successful */ bool enableHPF1(bool enable); /** - * enable high pass filter for interrupt 2 source + * Enables a high-pass filter for interrupt 2 source * - * @param enable true to enable the filter, false otherwise - * @return true if successful + * @param enable True to enable the filter, false otherwise + * @return True if successful */ bool enableHPF2(bool enable); /** - * enable filtered data selection + * Enables filtered data selection * - * @param enable true to enable, false otherwise - * @return true if successful + * @param enable True to enable, false otherwise + * @return True if successful */ bool enableFDS(bool enable); /** - * set interrupts to be active low instead of high + * Sets interrupts to be active low instead of high * - * @param enable true to enable, false otherwise - * @return true if successful + * @param enable True to enable, false otherwise + * @return True if successful */ bool setInterruptActiveLow(bool enable); /** - * set interrupt output mode to open drain rather than push/pull + * Sets an interrupt output mode to open drain rather than push/pull * - * @param enable true to enable, false otherwise - * @return true if successful + * @param enable True to enable, false otherwise + * @return True if successful */ bool setInterruptOpenDrain(bool enable); /** - * set interrupt 1 latch enable + * Enables interrupt 1 latch * - * @param enable true to enable, false otherwise - * @return true if successful + * @param enable True to enable, false otherwise + * @return True if successful */ bool setInterrupt1Latch(bool enable); /** - * set interrupt 2 latch enable + * Enables interrupt 2 latch * - * @param enable true to enable, false otherwise - * @return true if successful + * @param enable True to enable, false otherwise + * @return True if successful */ bool setInterrupt2Latch(bool enable); /** - * set the interrupt 1 pad configuration + * Sets the interrupt 1 pad configuration * - * @param val one fo the I_CFG_BITS_T values - * @return true if successful + * @param val One fo the I_CFG_BITS_T values + * @return True if successful */ bool setInterrupt1PadConfig(I_CFG_BITS_T val); /** - * set the interrupt 2 pad configuration + * Sets the interrupt 2 pad configuration * - * @param val one fo the I_CFG_BITS_T values - * @return true if successful + * @param val One fo the I_CFG_BITS_T values + * @return True if successful */ bool setInterrupt2PadConfig(I_CFG_BITS_T val); /** - * enable block data update. When enabled, low/high output - * registers are not update until both low and high values have + * Enables block data update. When enabled, low/high output + * registers are not updated until both low and high values have * been read. * - * @param enable true to enable, false otherwise - * @return true if successful + * @param enable True to enable, false otherwise + * @return True if successful */ bool enableBDU(bool enable); /** - * enable big endian output for 16b reads + * Enables big-endian output for 16b reads * - * @param enable true to enable, false otherwise - * @return true if successful + * @param enable True to enable, false otherwise + * @return True if successful */ bool enableBLE(bool enable); /** - * enable sleep to wake functionality. + * Enables sleep-to-wake functionality * - * @param enable true to enable, false otherwise - * @return true if successful + * @param enable True to enable, false otherwise + * @return True if successful */ bool enableSleepToWake(bool enable); /** - * return the contents of the REG_STATUS register + * Returns the contents of the REG_STATUS register * - * @return the contents of the REG_STATUS register + * @return Contents of the REG_STATUS register */ uint8_t getStatus(); /** - * setup the interrupt 1 config register + * Sets up the interrupt 1 config register * - * @param val a bitmask of desired INT_CFG_BITS_T bits - * @return true if successful + * @param val Bitmask of desired INT_CFG_BITS_T bits + * @return True if successful */ bool setInterrupt1Config(uint8_t val); /** - * setup the interrupt 2 config register + * Sets up the interrupt 2 config register * - * @param val a bitmask of desired INT_CFG_BITS_T bits - * @return true if successful + * @param val Bitmask of desired INT_CFG_BITS_T bits + * @return True if successful */ bool setInterrupt2Config(uint8_t val); /** - * setup the interrupt 1 source register + * Sets up the interrupt 1 source register * - * @param val a bitmask of desired INT_SRC_BITS_T bits - * @return true if successful + * @param val Bitmask of desired INT_SRC_BITS_T bits + * @return True if successful */ bool setInterrupt1Source(uint8_t val); /** - * setup the interrupt 2 source register + * Sets up the interrupt 2 source register * - * @param val a bitmask of desired INT_SRC_BITS_T bits - * @return true if successful + * @param val Bitmask of desired INT_SRC_BITS_T bits + * @return True if successful */ bool setInterrupt2Source(uint8_t val); /** - * setup the interrupt 1 threshold register + * Sets up the interrupt 1 threshold register * - * @param val the threshhold to set - * @return true if successful + * @param val Threshhold to set + * @return True if successful */ bool setInterrupt1Threshold(uint8_t val); /** - * setup the interrupt 2 threshold register + * Sets up the interrupt 2 threshold register * - * @param val the threshhold to set - * @return true if successful + * @param val Threshhold to set + * @return True if successful */ bool setInterrupt2Threshold(uint8_t val); /** - * setup the interrupt 1 duration register + * Sets up the interrupt 1 duration register * - * @param val the duration to set - * @return true if successful + * @param val Duration to set + * @return True if successful */ bool setInterrupt1Duration(uint8_t val); /** - * setup the interrupt 2 duration register + * Sets up the interrupt 2 duration register * - * @param val the duration to set - * @return true if successful + * @param val Duration to set + * @return True if successful */ bool setInterrupt2Duration(uint8_t val); /** - * read the sensor and store current values internally + * Reads the sensor and stores current values internally */ void update(); /** - * set adjustment offsets for each of the axes. This can be used - * for calibration. The values supplied here will be subtracted + * Sets adjustment offsets for each of the axes. This can be used + * for calibration. The values supplied here are subtracted * from the axis data read from the device. * - * @param adjX the amount by which to correct the X axis measurement - * @param adjY the amount by which to correct the Y axis measurement - * @param adjZ the amount by which to correct the Z axis measurement + * @param adjX Amount by which to correct the X-axis measurement + * @param adjY Amount by which to correct the Y-axis measurement + * @param adjZ Amount by which to correct the Z-axis measurement */ void setAdjustmentOffsets(int adjX, int adjY, int adjZ); /** - * get the acceleration values for each of the axes + * Gets acceleration values for each of the axes * - * @param aX the returned X acceleration - * @param aY the returned Y acceleration - * @param aZ the returned Z acceleration + * @param aX Returned X-axis acceleration + * @param aY Returned Y-axis acceleration + * @param aZ Returned Z-axis acceleration */ void getAcceleration(float *aX, float *aY, float *aZ); /** - * get the raw axis values + * Gets raw axis values * - * @param x the returned raw X value - * @param y the returned raw Y value - * @param z the returned raw Z value + * @param x Returned raw X-axis value + * @param y Returned raw Y-axis value + * @param z Returned raw Z-axis value */ void getRawXYZ(int *x, int *y, int *z); /** - * get the adjusted axis values + * Gets adjusted axis values * - * @param x the returned X value - * @param y the returned Y value - * @param z the returned Z value + * @param x Returned X-axis value + * @param y Returned Y-axis value + * @param z Returned Z-axis value */ void getXYZ(int *x, int *y, int *z); /** - * provide public access to the class's MRAA i2C context for + * Provides public access to the MRAA I2C context of the class for * direct user access * - * @return a reference to the class i2c context + * @return Reference to the class I2C context */ mraa::I2c& i2cContext() { return m_i2c; }; diff --git a/src/hcsr04/hcsr04.h b/src/hcsr04/hcsr04.h index d985b08a..2e7f01ef 100644 --- a/src/hcsr04/hcsr04.h +++ b/src/hcsr04/hcsr04.h @@ -37,7 +37,7 @@ namespace upm { /** - * @brief HC-SR04 ultrasonic sensor library + * @brief HC-SR04 Ultrasonic Sensor library * @defgroup hcsr04 libupm-hcsr04 * @ingroup generic gpio sound */ @@ -45,50 +45,50 @@ namespace upm { /** * @library hcsr04 * @sensor hcsr04 - * @comname HCSR04 Ultrasonic Sensor + * @comname HC-SR04 Ultrasonic Sensor * @type sound * @man generic * @con gpio * - * @brief API for HCSR04 (ultrasonic ranging module) component + * @brief API for the HC-SR04 Ultrasonic Sensor * - * This file defines the HCSR04 interface for libhcsr04 + * This file defines the HC-SR04 interface for libhcsr04 * * @snippet hcsr04.cxx Interesting */ class HCSR04 { public: /** - * Instanciates a HCSR04 object + * Instantiates an HCSR04 object * - * @param triggerPin pin for triggering the sensor for distance - * @param echoPin pulse response to triggering - * @param fptr function pointer for handling raising and - * falling interrupts + * @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 (uint8_t triggerPin, uint8_t echoPin, void (*fptr)(void *)); /** - * HCSR04 object destructor. + * HCSR04 object destructor */ ~HCSR04 (); /** - * Get the distance from the sensor. + * Gets the distance from the sensor */ int getDistance (); /** - * On each interrupt this function will detect if the interrupt - * was falling edge or rising. + * On each interrupt, this function detects if the interrupt + * was falling-edge or rising-edge. * Should be called from the interrupt handler. */ void ackEdgeDetected (); - uint8_t m_doWork; /**< Flag to controll blocking function while waiting for falling edge interrupt */ + uint8_t m_doWork; /**< Flag to control blocking function while waiting for a falling-edge interrupt */ /** - * Return name of the component + * Returns the name of the sensor */ std::string name() { diff --git a/src/hm11/hm11.h b/src/hm11/hm11.h index b62f8514..59aef369 100644 --- a/src/hm11/hm11.h +++ b/src/hm11/hm11.h @@ -47,7 +47,7 @@ namespace upm { /** - * @brief HM-11 Bluetooth 4.0 Low Energy module library + * @brief HM-11 Bluetooth 4.0 Low Energy Module library * @defgroup hm11 libupm-hm11 * @ingroup seeed uart wifi */ @@ -63,16 +63,16 @@ namespace upm { * @con uart * @web http://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf * - * @brief API HM-11 4.0 Bluetooth Low Energy Module + * @brief API for the HM-11 4.0 Bluetooth Low Energy Module * - * The driver was tested with the Grove BLE module. Its an HM-11 + * The driver was tested with the Grove BLE module. It's an HM-11 * BLE 4.0 module based on a TI CC2541 chip. It operates using a * standard 'AT' command set. See the datasheet for a full list - * of available commands and their possible responses. + * of available commands and their possible responses: * * http://www.seeedstudio.com/wiki/images/c/cd/Bluetooth4_en.pdf * - * It is connected via a UART at 9600 baud. + * It is connected via a UART at 9,600 baud. * * @image html hm11.jpg * @snippet hm11.cxx Interesting @@ -82,52 +82,52 @@ namespace upm { public: /** - * HM11 module constructor + * HM11 object constructor * - * @param uart default uart to use (0 or 1) + * @param uart Default UART to use (0 or 1) */ HM11(int uart); /** - * HM11 module Destructor + * HM11 object destructor */ ~HM11(); /** - * check to see if there is data available for reading + * Checks to see if there is data available for reading * - * @param millis number of milliseconds to wait, 0 means no wait. - * @return true if there is data available to be read + * @param millis Number of milliseconds to wait; 0 means no waiting + * @return True if there is data available for reading */ bool dataAvailable(unsigned int millis); /** - * read any available data into a user-supplied buffer. Note, the - * call will block until data is available to be read. Use + * Reads any available data into a user-supplied buffer. Note: the + * call blocks until data is available for reading. Use * dataAvailable() to determine whether there is data available * beforehand, to avoid blocking. * - * @param buffer the buffer to hold the data read - * @param len the length of the buffer - * @return the number of bytes read + * @param buffer Buffer to hold the data read + * @param len Length of the buffer + * @return Number of bytes read */ int readData(char *buffer, size_t len); /** - * write the data in buffer to the device + * Writes the data in the buffer to the device * - * @param buffer the buffer to hold the data read - * @param len the length of the buffer - * @return the number of bytes written + * @param buffer Buffer to hold the data read + * @param len Length of the buffer + * @return Number of bytes written */ int writeData(char *buffer, size_t len); /** - * setup the proper tty i/o modes and the baudrate. The default - * baud rate is 9600 (B9600) for this device. + * Sets up proper tty I/O modes and the baud rate. For this device, the default + * baud rate is 9,600 (B9600). * - * @param baud the desired baud rate. - * @return true if successful + * @param baud Desired baud rate. + * @return True if successful */ bool setupTty(speed_t baud=B9600); diff --git a/src/hmc5883l/hmc5883l.h b/src/hmc5883l/hmc5883l.h index 50aad40c..68ea3308 100644 --- a/src/hmc5883l/hmc5883l.h +++ b/src/hmc5883l/hmc5883l.h @@ -31,7 +31,7 @@ namespace upm { /** - * @brief Hmc5883l magnometer library + * @brief HMC5883L Magnometer library * @defgroup hmc5883l libupm-hmc5883l * @ingroup seeed i2c compass robok */ @@ -46,13 +46,13 @@ namespace upm { * @con i2c * @kit robok * - * @brief API for Hmc5883l (3-axis digital compass) + * @brief API for the HMC5883L 3-Axis Digital Compass * - * The Honeywell [HMC5883L] + * Honeywell [HMC5883L] * (http://www.adafruit.com/datasheets/HMC5883L_3-Axis_Digital_Compass_IC.pdf) - * is a 3-axis digital compass. Communication with the HMC5883L is simple and - * all done through an I2C interface. Different breakout boards are available, - * typically a 3V supply is all that is needed to power the sensor. + * is a 3-axis digital compass. Communication with HMC5883L is simple and + * all done through an I2C interface. Different breakout boards are available. + * Typically, a 3V supply is all that is needed to power the sensor. * * @image html hmc5883l.jpeg * @snippet hmc5883l.cxx Interesting @@ -60,9 +60,9 @@ namespace upm { class Hmc5883l { public: /** - * Creates a Hmc5883l object + * Creates an Hmc5883l object * - * @param bus number of used i2c bus + * @param bus Number of the used I2C bus */ Hmc5883l(int bus); @@ -84,9 +84,9 @@ public: int16_t* coordinates(); /** - * Updates the values by reading from i2c + * Updates the values by reading from I2C * - * @return 0 for success + * @return 0 if successful */ mraa_result_t update(); @@ -98,7 +98,7 @@ public: /** * Gets the current magnetic declination value * - * @return magnetic declination as a float + * @return Magnetic declination as a floating-point value */ float get_declination(); private: diff --git a/src/hmtrp/hmtrp.h b/src/hmtrp/hmtrp.h index 611b379a..9aa7b3d7 100644 --- a/src/hmtrp/hmtrp.h +++ b/src/hmtrp/hmtrp.h @@ -58,10 +58,10 @@ namespace upm { * @man seeed * @con uart * - * @brief API for the HMTRP Serial RF Pro + * @brief API for the HM-TRP Serial RF Pro transceiver * - * UPM support for the HMTRP Serial RF Pro. This was tested - * specifically with the Grove Serial RF Pro module. In theory, + * UPM support for the HM-TRP Serial RF Pro transceiver. This was tested + * specifically with the Grove Serial RF Pro transceiver. In theory, * this class should work with the following devices: * * HM-TRP-433: 414000000-454000000Hz @@ -69,12 +69,12 @@ namespace upm { * HM-TRP-868: 849000000-889000000Hz * HM-TRP-915: 895000000-935000000Hz * - * The only difference being the transmit and receive frequencies + * The only difference is the transmit and receive frequencies * supported. * - * By default, the device will simply send and receive any data - * presented on it's UART interface. It can be placed into a - * configuration mode by grounding the CONFIG pin on the module. + * By default, the device simply sends and receives any data + * presented on its UART interface. It can be put into a + * configuration mode by grounding the CONFIG pin on the transceiver. * * @image html hmtrp.jpg * @snippet hmtrp.cxx Interesting @@ -96,150 +96,150 @@ namespace upm { } HMTRP_OPCODE_T; /** - * HMTRP Serial RF Pro module constructor + * HMTRP Serial RF Pro transceiver constructor * - * @param uart default uart to use (0 or 1) + * @param uart Default UART to use (0 or 1) */ HMTRP(int uart=HMTRP_DEFAULT_UART); /** - * HMTRP Serial RF Pro module Destructor + * HMTRP destructor */ ~HMTRP(); /** - * Check to see if there is data available for reading + * Checks to see if there is data available for reading * - * @param millis number of milliseconds to wait, 0 means no wait (default). - * @return true if there is data available to be read + * @param millis Number of milliseconds to wait; 0 means no waiting (default). + * @return True if there is data available for reading */ bool dataAvailable(unsigned int millis=0); /** - * read any available data into a user-supplied buffer. + * Reads any available data in a user-supplied buffer * - * @param buffer the buffer to hold the data read - * @param len the length of the buffer - * @param millis maxim time in milliseconds to wait for input. -1 means - * wait forever (default). - * @return the number of bytes read, 0 if timed out and millis >= 0 + * @param buffer Buffer to hold the data read + * @param len Length of the buffer + * @param millis Maximum time in milliseconds to wait for input. -1 means + * waiting forever (default). + * @return Number of bytes read; 0 if timed out and millis is >= 0 */ int readData(char *buffer, size_t len, int millis=-1); /** - * write the data in buffer to the device + * Writes the data in the buffer to the device * - * @param buffer the buffer to hold the data read - * @param len the length of the buffer - * @return the number of bytes written + * @param buffer Buffer to hold the data read + * @param len Length of the buffer + * @return Number of bytes written */ int writeData(char *buffer, size_t len); /** - * setup the proper tty i/o modes and the baudrate. The default - * baud rate is 9600 (B9600). + * Sets up proper tty I/O modes and the baud rate. The default + * baud rate is 9,600 (B9600). * - * @param baud the desired baud rate. - * @return true if successful + * @param baud Desired baud rate. + * @return True if successful */ bool setupTty(speed_t baud=B9600); /** - * Look for and verify an OK response. This will look like "OK\r\n" + * Looks for and verifies an OK response. This looks like "OK\r\n" * - * @return true if OK received + * @return True if OK received */ bool checkOK(); /** - * reset the device to default parameters, except for UART baud rate + * Resets the device to default parameters, except for the UART baud rate * - * @return true if successful + * @return True if successful */ bool reset(); /** - * Query the radio to determine it's configuration + * Queries the radio to determine its configuration * - * @param freq operating frequency - * @param dataRate tx/rx bit rate - * @param rxBandwidth receiving bandwidth in Khz - * @param modulation modulation frequency in Khz - * @param txPower transmission power (1-7) + * @param freq Operating frequency + * @param dataRate TX/RX bit rate + * @param rxBandwidth Receiving bandwidth in Khz + * @param modulation Modulation frequency in Khz + * @param txPower Transmission power (1-7) * @param uartBaud UART baud rate - * @return true if successful + * @return True if successful */ bool getConfig(uint32_t *freq, uint32_t *dataRate, uint16_t *rxBandwidth, uint8_t *modulation, uint8_t *txPower, uint32_t *uartBaud); /** - * set the frequency. Note, this is limited depending on which - * HM-TRP device you are using. Consult the datasheet. + * Sets the frequency. Note: this is limited depending on which + * HM-TRP device you are using. Consult the datasheet. * - * @param freq operating frequency - * @return true if successful + * @param freq Operating frequency + * @return True if successful */ bool setFrequency(uint32_t freq); /** - * set the RF data transmission rate. Valid values are between - * 1200-115200. + * Sets the RF data transmission rate. Valid values are between + * 1,200 and 115,200. * - * @param rate radio transmission rate in baud (1200-115200) - * @return true if successful + * @param rate Radio transmission rate in baud (1,200-115,200) + * @return True if successful */ bool setRFDataRate(uint32_t rate); /** - * set the RX bandwidth. Valid values are between 30-620 (in Khz) + * Sets the RX bandwidth. Valid values are between 30 and 620 (in Khz) * - * @param rxBand set receive bandwidth (30-620) Khz - * @return true if successful + * @param rxBand RX bandwidth in Khz (30-620) + * @return True if successful */ bool setRXBandwidth(uint16_t rxBand); /** - * set the frequency modulation. Valid values are between 10-160 (in Khz) + * Sets the frequency modulation. Valid values are between 10 and 160 (in Khz) * - * @param modulation frequency modulation to use (10-160) Khz - * @return true if successful + * @param modulation Frequency modulation to use, in Khz (10-160) + * @return True if successful */ bool setFrequencyModulation(uint8_t modulation); /** - * set the transmit power level. Valid values are between 0-7, - * with 7 being maximum power. + * Sets the transmit power level. Valid values are between 0 and 7, + * 7 being the maximum power. * - * @param power power level to use during transmit. Vaild values - * are between 0-7. - * @return true if successful + * @param power Power level to use during transmission. Valid values + * are between 0 and 7. + * @return True if successful */ bool setTransmitPower(uint8_t power); /** - * set the configured baud rate of the UART. It is strongly - * recommended that you do not change this or you may lose the - * ability to communicate with the module. Valid values are 1200-115200. + * Sets the configured baud rate of the UART. It is strongly + * recommended you do not change this, or you may lose the + * ability to communicate with the transceiver. Valid values are 1,200-115,200. * - * @param speed desired baud rate to configure the device to use. - * Valid values are between 1200-115200. - * @return true if successful + * @param speed Desired baud rate to configure the device to use + * Valid values are between 1,200 and 115,200. + * @return True if successful */ bool setUARTSpeed(uint32_t speed); /** - * get the RF signal strength. + * Gets the RF signal strength * - * @param strength the returned strength - * @return true if successful + * @param strength Returned strength + * @return True if successful */ bool getRFSignalStrength(uint8_t *strength); /** - * get the Modulation signal strength. + * Gets the modulation signal strength. * - * @param strength the returned strength - * @return true if successful + * @param strength Returned strength + * @return True if successful */ bool getModSignalStrength(uint8_t *strength); diff --git a/src/hp20x/hp20x.h b/src/hp20x/hp20x.h index 2b3775c8..6562b5d2 100644 --- a/src/hp20x/hp20x.h +++ b/src/hp20x/hp20x.h @@ -32,7 +32,7 @@ namespace upm { /** - * @brief HP20X I2C Barometer (high accuracy) library + * @brief HP20X I2C Barometer (High-Accuracy) library * @defgroup hp20x libupm-hp20x * @ingroup seeed i2c pressure */ @@ -40,21 +40,21 @@ namespace upm { /** * @library hp20x * @sensor hp20x - * @comname Grove Barometer (high accuracy) - * @altname HP20X Barometer (high accuracy) + * @comname Grove Barometer (High-Accuracy) + * @altname HP20X Barometer (High-Accuracy) * @type pressure * @man seeed * @web http://www.seeedstudio.com/depot/Grove-Barometer-HighAccuracy-p-1865.html * @con i2c * - * @brief API for the HP20X based Grove Barometer (high accuracy) + * @brief API for the HP20X-based Grove Barometer (High-Accuracy) * - * This is a high accuracy barometer providing pressure, altitude - * and temperature data. It can be calabrated for a given altitude + * This is a high-accuracy barometer providing pressure, altitude, + * and temperature data. It can be calibrated for a given altitude * offset, and a wide range of interrupt generating capabilities are - * supported. As usual, see the HP20x datasheet for more detail. + * supported. As usual, see the HP20X datasheet for more details. * - * This module was developed using a Grove Barometer (High Accuracy) + * This module was developed using a Grove Barometer (High-Accuracy) * based on an HP206C chip. * * @image html hp20x.jpg @@ -183,7 +183,7 @@ namespace upm { INT_SRC_DEV_RDY = 0x40, // device is ready - INT_SRC_TH_ERR = 0x80 // threshhold error + INT_SRC_TH_ERR = 0x80 // threshold error } INT_SRC_BITS_T; /** @@ -195,178 +195,178 @@ namespace upm { } PARA_BITS_T; /** - * hp20x constructor + * HP20X constructor * - * @param bus i2c bus to use - * @param address the address for this device + * @param bus I2C bus to use + * @param address Address for this device */ HP20X(int bus=HP20X_I2C_BUS, uint8_t address=HP20X_DEFAULT_I2C_ADDR); /** - * HP20X Destructor + * HP20X destructor */ ~HP20X(); /** - * set up initial values and start operation + * Sets up initial values and starts operation * - * @param dsr the data sampling rate: one of the DSR_BITS_T values - * @return true if successful + * @param dsr Data sampling rate; one of the DSR_BITS_T values + * @return True if successful */ bool init(DSR_BITS_T dsr=DSR_4096); /** - * send a command to the device + * Sends a command to the device * - * @param cmd command to send, one of the HP20X_CMD_T values, usually - * @return true if successful + * @param cmd Command to send; usually, one of the HP20X_CMD_T values + * @return True if successful */ bool writeCmd(uint8_t cmd); /** - * write a value to a register + * Writes a value to a register * - * @param reg register to write, one of the HP20X_REG_T values - * @param data value to write - * @return true if successful + * @param reg Register to write to; one of the HP20X_REG_T values + * @param data Value to write + * @return True if successful */ bool writeReg(HP20X_REG_T reg, uint8_t data); /** - * read a register and return it's value + * Reads a register and returns its value * - * @param reg register to read, one of the HP20X_REG_T values - * @return value of specified register + * @param reg Register to read; one of the HP20X_REG_T values + * @return Value of a specified register */ uint8_t readReg(HP20X_REG_T reg); /** - * read 3 bytes of data in response to a conversion request, and - * convert to an integer + * Reads 3 bytes of data in response to a conversion request, and + * converts it to an integer * - * @return value read back (temperature, pressure, etc) + * @return Value read back (temperature, pressure, etc.) */ int readData(); /** - * check to see if the DR_RDY bit is set, indicating the device + * Checks to see if the DR_RDY bit is set, indicating the device * can accept commands * - * @return true if device is ready, false otherwise + * @return True if the device is ready, false otherwise */ bool isReady(); /** - * check to see if device is ready and sleep/retry if not. - * Returns once device indicates it's ready. + * Checks to see if the device is ready, and sleeps/retries if not. + * Returns once the device indicates it's ready. * - * @return true if device is ready, false if retries exhausted + * @return True if the device is ready; false if retries are exhausted */ bool waitforDeviceReady(); /** - * return the temperature in celcius + * Returns the temperature in Celsius * - * @return the temperature + * @return Temperature */ float getTemperature(); /** - * return the pressure in millibars + * Returns the pressure in millibars * - * @return the pressure + * @return Pressure */ float getPressure(); /** - * return the computed altitude in meters + * Returns the computed altitude in meters * - * @return the altitude + * @return Altitude */ float getAltitude(); /** - * enable or disable the on-chip compensator. This allows the + * Enables or disables the on-chip compensator. This allows the * chip to filter and clean up the output data. * - * @param enable true to enable, false otherwise + * @param enable True to enable, false otherwise */ void compensationEnable(bool enable); /** - * setup the interrupt enable register. This register defines + * Sets up the interrupt enable register. This register defines * which events can cause a hardware interrupt pin to be pulled high * (active). * - * @param bits one or more of the INT_EN_BITS_T bits - * @return true if successful, false otherwise + * @param bits One or more of the INT_EN_BITS_T bits + * @return True if successful, false otherwise */ bool setInterruptEnable(uint8_t bits); /** - * setup the interrupt configuration register. This register + * Sets up the interrupt configuration register. This register * defines which events can cause an interrupt to be indicated. * - * @param bits one or more of the INT_EN_BITS_T bits - * @return true if successful, false otherwise + * @param bits One or more of the INT_EN_BITS_T bits + * @return True if successful, false otherwise */ bool setInterruptConfig(uint8_t bits); /** - * get the interrupt source register. This register indicates - * which interrupts have been triggered. In addition, it + * Gets the interrupt source register. This register indicates + * which interrupts have been triggered. In addition, it * indicates when certain operations have been completed. * - * @return one of more of the INT_SRC_BITS_T values + * @return One of more of the INT_SRC_BITS_T values */ uint8_t getInterruptSource(); /** - * set the data sampling rate. Higher rates are more precise, but + * Sets the data sampling rate. Higher rates are more precise, but * take more time per measurement. * - * @param dsr one of the DSR_BITS_T values + * @param dsr One of the DSR_BITS_T values */ void setDSR(DSR_BITS_T dsr); /** - * start an internal recalibration of the analog blocks. This is + * Starts an internal recalibration of analog blocks. This is * faster than a soft reset. */ void recalibrateInternal(); /** - * execute a soft reset. All register values are reset to power - * on defaults. This function will return when the reset is - * complete and the device reports that it is ready. + * Executes a soft reset. All register values are reset to power-on + * defaults. This function returns when the reset is + * complete and the device reports it is ready. */ void softReset(); /** - * Set the altitude offset for your region. See the datasheet for - * more details. Setting this correctly for your region is + * Sets the altitude offset for your region. See the datasheet for + * more details. Setting this correctly for your region is * required for accurate altitude data. * - * @param off the offset + * @param off Offset */ void setAltitudeOffset(int16_t off); /** - * set the pressure/altitude thresholds for interrupt generation. + * Sets pressure/altitude thresholds for interrupt generation * - * @param low the low threshold for generating an interrupt - * @param med the medium threshold for generating an interrupt - * @param high the high threshold for generating an interrupt + * @param low Low threshold to generate an interrupt + * @param med Medium threshold to generate an interrupt + * @param high High threshold to generate an interrupt */ void setPAThreshholds(int16_t low, int16_t med, int16_t high); /** - * set the temperature thresholds for interrupt generation. + * Sets temperature thresholds for interrupt generation * - * @param low the low threshold for generating an interrupt - * @param med the medium threshold for generating an interrupt - * @param high the high threshold for generating an interrupt + * @param low Low threshold to generate an interrupt + * @param med Medium threshold to generate an interrupt + * @param high High threshold to generate an interrupt */ void setTemperatureThreshholds(int8_t low, int8_t med, int8_t high); diff --git a/src/ht9170/ht9170.h b/src/ht9170/ht9170.h index 720e01c8..a16f6eac 100644 --- a/src/ht9170/ht9170.h +++ b/src/ht9170/ht9170.h @@ -29,7 +29,7 @@ namespace upm { /** - * @brief HT9170 DTMF decoder library + * @brief HT9170 DTMF Decoder library * @defgroup ht9170 libupm-ht9170 * @ingroup seeed gpio other */ @@ -46,9 +46,9 @@ namespace upm { * * @brief API for the HT9170 DTMF Decoder * - * This driver was developed using the Seeed DTMF (Dual Tone - * Multi-Frequency) Shield. It can decode DTMF signals presented at - * it's audio input. It does not generate DTMF signals. + * This driver was developed using the DTMF (Dual-Tone + * Multi-Frequency) Shield by Seeed Studio*. It can decode DTMF signals presented at + * its audio input. It does not generate DTMF signals. * * @image html ht9170.jpg * @snippet ht9170.cxx Interesting @@ -59,28 +59,28 @@ namespace upm { /** * HT9170 constructor * - * @param dr data ready pin - * @param o1 digital pin for data output 1 - * @param o2 digital pin for data output 2 - * @param o3 digital pin for data output 3 - * @param o4 digital pin for data output 4 + * @param dr Data ready pin + * @param o1 Digital pin for data output 1 + * @param o2 Digital pin for data output 2 + * @param o3 Digital pin for data output 3 + * @param o4 Digital pin for data output 4 */ HT9170(int dr, int o1, int o2, int o3, int o4); /** - * HT9170 Destructor + * HT9170 destructor */ ~HT9170(); /** - * check to see if a DTMF number is ready to be read + * Checks to see if a DTMF number is ready to be read * - * @return true if there is a digit available to decode + * @return True if there is a digit available to decode */ bool digitReady(); /** - * decode a digit and return it + * Decodes a digit and returns it * */ char decodeDigit(); diff --git a/src/htu21d/htu21d.h b/src/htu21d/htu21d.h index b22eb86a..987219f7 100644 --- a/src/htu21d/htu21d.h +++ b/src/htu21d/htu21d.h @@ -49,7 +49,7 @@ namespace upm { /** - * @brief HTU21D humidity sensor library + * @brief HTU21D Humidity Sensor library * @defgroup htu21d libupm-htu21d * @ingroup seeed adafruit sparkfun i2c temp */ @@ -63,17 +63,17 @@ namespace upm { * @web http://www.meas-spec.com/downloads/HTU21D.pdf * @con i2c * - * @brief API for HTU21D chip (Atmospheric Pressure Sensor) + * @brief API for the HTU21D Temperature & Humidity Sensor * - * Measurement Specialties [HTU21D] is a digital humidity sensor with + * HTU21D by Measurement Specialties is a digital humidity sensor with * temperature output. - * RH will report between 0 and 100% and temperature range is - * -40 to +125 degC. Note that the getCompRH is the preferred - * function below (passing true to cause a measurement cycle). If - * the actual values used for the compensated ready are necessary, use + * RH reports between 0 and 100%, and the temperature range is + * -40 to +125 degC. Note: getCompRH is the preferred + * function below (passing true to cause a measurement cycle). If + * actual values used for the compensated ready are necessary, use * the getHumidity(false) and getTemperature(false) functions following * the getCompRH call. - * Also note that the sensor should not perform more than a couple of + * Also note the sensor should not perform more than a couple of * measurements per second to limit the heating of the sensor. * * @image html htu21d.jpeg @@ -82,98 +82,98 @@ namespace upm { class HTU21D { public: /** - * Instanciates a HTU21D object + * Instantiates an HTU21D object * - * @param bus number of used bus - * @param devAddr address of used i2c device + * @param bus Number of the used bus + * @param devAddr Address of the used I2C device * @param mode HTU21D oversampling */ HTU21D (int bus, int devAddr=HTU21D_I2C_ADDRESS); /** - * HTU21D object destructor, basicaly it close i2c connection. + * HTU21D object destructor; basically, it closes the I2C connection. */ ~HTU21D (); /** - * Initiate a temp/pressure mesasurement and wait for function - * to complete. The humidity and temp registers can be read + * Initiates a temperature/pressure mesasurement and waits for the function + * to complete. The humidity and temperature registers can be read * after this call. */ int sampleData(void); /** - * Get the current measured humidity [RH] + * Gets the current measured humidity [RH] */ float getHumidity(int bSampleData = false); /** - * Get the humidity cell temperature [degC] + * Gets the humidity cell temperature [degC] */ float getTemperature(int bSampleData = false); /** - * Using the current humidity and temperature the function - * will calculate the compensated RH using the equation from + * Using the current humidity and temperature, the function + * calculates the compensated RH using the equation from * the datasheet. */ float getCompRH(int bSampleData = true); /** - * Set the heater state. The heater is used to either test - * the sensor functionality since the temp should increase - * 0.5 to 1.5 degC and the humidity should decrease. The - * testSensor() function below will use the heater. + * Sets the heater state. The heater is used to test + * the sensor functionality since the temperature should increase + * 0.5 to 1.5 degC, and the humidity should decrease. The + * testSensor() function below uses the heater. * - * @param bEnable Set to non-zero to turn on heater + * @param bEnable Sets to non-zero to turn the heater on */ int setHeater(int bEnable = false); /** - * Perform a soft RESET of the MPL3115A2 device to ensure - * it is in a known state. This function can be used to reset + * Performs a soft reset of the MPL3115A2 device to ensure + * it is in a known state. This function can be used to reset * the min/max temperature and pressure values. */ void resetSensor(void); /** - * Function intended to test the device and verify it - * is correctly operating. + * Tests the device and verifies it + * is operating correctly. * */ int testSensor(void); /** - * Write to one byte register + * Writes to a one-byte register * - * @param reg address of a register - * @param value byte to be written + * @param reg Address of the register + * @param value Byte to be written */ mraa_result_t i2cWriteReg (uint8_t reg, uint8_t value); /** - * Read two bytes register + * Reads a two-byte register * - * @param reg address of a register + * @param reg Address of the register */ uint16_t i2cReadReg_16 (int reg); /** - * Read one byte register + * Reads a one-byte register * - * @param reg address of a register + * @param reg Address of the register */ uint8_t i2cReadReg_8 (int reg); private: /** - * Convert temp register to degC * 1000 + * Converts the temperature register to degC * 1000 */ int32_t convertTemp(int32_t regval); /** - * Convert RH register to %RH * 1000 + * Converts the RH register to %RH * 1000 */ int32_t convertRH(int32_t regval); diff --git a/src/hx711/hx711.h b/src/hx711/hx711.h index e81bfdb9..4047fbc9 100644 --- a/src/hx711/hx711.h +++ b/src/hx711/hx711.h @@ -29,7 +29,7 @@ namespace upm { /** - * @brief HX711 24bit ADC library + * @brief HX711 24-bit ADC library * @defgroup hx711 libupm-hx711 * @ingroup generic gpio electric */ @@ -43,12 +43,12 @@ namespace upm { * @web http://www.dfrobot.com/image/data/SEN0160/hx711_english.pdf * @con gpio * - * @brief API for HX711 + * @brief API for the HX711 Analog-to-Digital Converter * - * The HX711 is a precision 24-bit analog-to-digital converter (ADC) - * designed for weigh scales and industrial control applications to + * HX711 is a precision 24-bit analog-to-digital converter (ADC) + * designed for weight scales and industrial control applications to * interface directly with a bridge sensor. This module was tested on - * the Intel Galileo Gen2. + * the Intel(R) Galileo Gen 2 board. * * @image html hx711.jpeg * @snippet hx711.cxx Interesting @@ -56,66 +56,66 @@ namespace upm { class HX711 { public: /** - * HX711 module constructor + * HX711 constructor * - * @param data define the data pin - * @param sck define the clock pin - * @param gain define the gain factor - * Valid values are 128 or 64 for channel A; channel B works with 32 gain factor only + * @param data Defines the data pin + * @param sck Defines the clock pin + * @param gain Defines the gain factor + * Valid values are 128 or 64 for channel A; channel B works with a 32-gain factor only */ HX711(uint8_t data, uint8_t sck, uint8_t gain = 128); /** - * HX711 module Destructor + * HX711 destructor */ ~HX711(); /** * Waits for the chip to be ready and returns a reading * - * @return raw adc read + * @return Raw ADC reading */ unsigned long read(); /** - * Set the gain factor; takes effect only after a call to read() - * channel A can be set for a 128 or 64 gain; channel B has a fixed 32 gain - * depending on the parameter, the channel is also set to either A or B - * @param gain define the gain factor + * Sets the gain factor; takes effect only after a call to read() + * channel A can be set for a 128 or 64 gain; channel B has a fixed 32-gain + * factor depending on the parameter; the channel is also set to either A or B + * @param gain Defines the gain factor */ void setGain(uint8_t gain = 128); /** * Returns an average reading - * @param times define how many times to read - * @return the avarage reading + * @param times Defines how many reading to do + * @return Average reading */ unsigned long readAverage(uint8_t times = 10); /** * Returns (readAverage() - OFFSET) - * @param times define how many readings to do - * @return the current value without the tare weight + * @param times Defines how many readings to do + * @return Current value without the tare weight */ double getValue(uint8_t times = 10); /** * Returns getValue() divided by SCALE - * @param times define how many readings to do - * @return the raw value divided by a value obtained via calibration + * @param times Defines how many readings to do + * @return Raw value divided by a value obtained via calibration */ float getUnits(uint8_t times = 1); /** - * Set the OFFSET value for tare weight - * @param times define how many times to read the tare value + * Sets the OFFSET value for the tare weight + * @param times Defines how many times to read the tare value */ void tare(uint8_t times = 10); /** - * Set the SCALE value - * This value is used to convert the raw data to "human readable" data (measure units) - * @param scale value obtained via calibration + * Sets the SCALE value + * This value is used to convert the raw data to human-readable data (measurement units) + * @param scale Value obtained via calibration */ void setScale(float scale = 1.f); private: @@ -128,9 +128,9 @@ namespace upm { /** - * Set the OFFSET value - * The value that's subtracted from the actual reading (tare weight) - * @param scale value obtained via calibration + * Sets the OFFSET value + * This value is subtracted from the actual reading (tare weight) + * @param scale Value obtained via calibration */ void setOffset(long offset = 0); }; diff --git a/src/ina132/ina132.h b/src/ina132/ina132.h index 2774a46c..56d32d32 100644 --- a/src/ina132/ina132.h +++ b/src/ina132/ina132.h @@ -28,7 +28,7 @@ namespace upm { /** - * @brief INA132 differential amplifier sensor library + * @brief INA132 Differential Amplifier Sensor library * @defgroup ina132 libupm-ina132 * @ingroup seeed analog electric */ @@ -47,7 +47,7 @@ namespace upm { * for precise differential-input amplification. * * This sensor was tested amplifying the signal - * from a Weight Sensor (Load Cell)0-500g + * from a Weight Sensor (Load Cell) 0-500g * * @image html ina132.jpg * @snippet ina132.cxx Interesting @@ -55,20 +55,20 @@ namespace upm { class INA132 { public: /** - * INA132 sensor constructor + * INA132 constructor * - * @param pin analog pin to use + * @param pin Analog pin to use */ INA132(int pin); /** - * INA132 Destructor + * INA132 destructor */ ~INA132(); /** - * Measure precise differential-input amplification from the sensor + * Measures precise differential-input amplification from the sensor * - * @return precise differential-input amplification + * @return Precise differential-input amplification */ float value(); diff --git a/src/isd1820/isd1820.h b/src/isd1820/isd1820.h index bdea3347..a4f785a1 100644 --- a/src/isd1820/isd1820.h +++ b/src/isd1820/isd1820.h @@ -29,7 +29,7 @@ namespace upm { /** - * @brief ISD1820 recorder module library + * @brief ISD1820 Voice Recorder Module library * @defgroup isd1820 libupm-isd1820 * @ingroup seeed gpio sound */ @@ -43,10 +43,10 @@ namespace upm { * @man seeed * @con gpio * - * @brief API support for the ISD1820 based Grove Recorder + * @brief API support for the ISD1820-based Grove Voice Recorder * - * This class implements support for the Grove Recorder. There - * are two digital pins, one that enables recording, and the other + * This class implements support for the Grove Voice Recorder. There + * are two digital pins: one that enables recording, and the other * that plays back what was previously recorded. * * @image html isd1820.jpg @@ -56,29 +56,29 @@ namespace upm { public: /** - * ISD1820 module constructor + * ISD1820 constructor * - * @param recPin the pin to use for recording - * @param playPin the pin to use for playback + * @param recPin Pin to use for recording + * @param playPin Pin to use for playback */ ISD1820(int playPin, int recPin); /** - * ISD1820 module Destructor + * ISD1820 destructor */ ~ISD1820(); /** - * Start or stop playback + * Starts or stops playback * - * @param enable start playback if true, stop if false + * @param enable Starts playback if true, stops if false */ void play(bool enable); /** - * Start or stop recording + * Starts or stops recording * - * @param enable start recording if true, stop if false + * @param enable Starts recording if true, stops if false */ void record(bool enable); diff --git a/src/itg3200/itg3200.h b/src/itg3200/itg3200.h index c51c89fe..587a8902 100644 --- a/src/itg3200/itg3200.h +++ b/src/itg3200/itg3200.h @@ -30,7 +30,7 @@ namespace upm { /** - * @brief ITG3200 gyroscope library + * @brief ITG-3200 Gyroscope library * @defgroup itg3200 libupm-itg3200 * @ingroup seeed i2c compass */ @@ -38,19 +38,19 @@ namespace upm { /** * @library itg3200 * @sensor itg3200 - * @comname ITG3200 3-Axis Digital Gyroscope + * @comname ITG-3200 3-Axis Digital Gyroscope * @altname Grove 3-Axis Digital Gyroscope * @type compass * @man seeed * @con i2c * - * @brief API for Itg3200 (3-Axis Digital Gyroscope) + * @brief API for the ITG-3200 3-Axis Digital Gyroscope * - * The InvenSense Itg3200 is a 3-axis digital gyroscope. + * InvenSense* ITG-3200 is a 3-axis digital gyroscope. * (https://www.sparkfun.com/datasheets/Sensors/Gyro/PS-ITG-3200-00-01.4.pdf) - * This sensor has been tested and can run at either 3V3 or 5V on the Intel Galileo.
- * However, it is incompatible and will not be detected on the I2C bus - * by the Intel Edison using the Arduino breakout board. + * This sensor has been tested and can run at either 3.3V or 5V on Intel(R) Galileo.
+ * However, it is incompatible with and not detected on the I2C bus + * by Intel(R) Edison using the Arduino* breakout board. * * @image html itg3200.jpeg * @snippet itg3200.cxx Interesting @@ -60,7 +60,7 @@ public: /** * Creates an Itg3200 object * - * @param bus number of used i2c bus + * @param bus Number of the used I2C bus */ Itg3200(int bus); @@ -70,28 +70,28 @@ public: ~Itg3200(); /** - * Calibrates the sensor to 0 on all axes. Sensor needs to be resting for accurate calibration. - * Takes about 3 seconds and is also called by constructor on object creation. + * Calibrates the sensor to 0 on all axes. The sensor needs to be resting for accurate calibration. + * It takes about 3 seconds and is also called by the constructor on object creation. * */ void calibrate(); /** - * Returns the temperature reading from the integrated temperature sensor in Celsius degrees + * Returns the temperature reading, in Celsius, from the integrated temperature sensor * - * @return float temperature in Celsius degrees + * @return float Temperature in Celsius */ float getTemperature(); /** - * Returns a pointer to an float[3] that contains computed rotational speeds (angular velocities) + * Returns a pointer to a float[3] that contains computed rotational speeds (angular velocities) * - * @return float* to an float[3] + * @return float* to a float[3] */ float* getRotation(); /** - * Returns a pointer to an int[3] that contains the raw register values for X, Y and Z + * Returns a pointer to an int[3] that contains raw register values for X, Y, and Z * * @return int* to an int[3] */ @@ -100,14 +100,14 @@ public: /** * Returns an int that contains the raw register value for the temperature * - * @return int raw temperature + * @return int Raw temperature */ int16_t getRawTemp(); /** - * Updates the rotational values and temperature by reading from i2c bus + * Updates the rotational values and temperature by reading from the I2C bus * - * @return 0 for success + * @return 0 if successful */ mraa_result_t update(); private: diff --git a/src/joystick12/joystick12.h b/src/joystick12/joystick12.h index 588aed65..28e35e56 100644 --- a/src/joystick12/joystick12.h +++ b/src/joystick12/joystick12.h @@ -44,12 +44,12 @@ namespace upm { * @con analog * @kit robok * - * @brief API for Elecfreaks Joystick v 1.2-1.4 breakout + * @brief API for the ElecFreaks* Joystick v 1.2-1.4 Breakout * - * This file defines the Joystick API and implementation for X, Y - * button could be treated as normal GPIO, this enables easier + * This file defines the Joystick API, and implementation for the X and Y + * buttons could be treated as normal GPIO - this enables easier * interrupt support. This driver should be compatible with any - * 2 axis analog joystick. + * 2-axis analog joystick. * * @image html joystick12.jpg * @snippet joystick12-example.cxx Interesting @@ -59,8 +59,8 @@ class Joystick12 { /** * Instantiates a Joystick object * - * @param pinX analog pin where X input is connected - * @param pinY analog pin where Y input is connected + * @param pinX Analog pin where the X input is connected + * @param pinY Analog pin where the Y input is connected */ Joystick12(int pinX, int pinY); @@ -70,15 +70,15 @@ class Joystick12 { ~Joystick12(); /** - * Get X input - * @return float X value, range from -1 to 1. 0 is mid + * Gets the X input + * @return float X value, ranging from -1 to 1; 0 is mid */ float getXInput(); /** - * Get Y input + * Gets the Y input * - * @return float Y value, range from -1 to 1. 0 is mid + * @return float Y value, ranging from -1 to 1; 0 is mid */ float getYInput(); diff --git a/src/l298/l298.h b/src/l298/l298.h index 40bddcc7..985a07cc 100644 --- a/src/l298/l298.h +++ b/src/l298/l298.h @@ -34,7 +34,7 @@ namespace upm { /** - * @brief L298 dual H-bridge motor driver library + * @brief L298 Dual H-Bridge Motor Driver library * @defgroup l298 libupm-l298 * @ingroup seeed sparkfun gpio pwm motor */ @@ -48,16 +48,16 @@ namespace upm { * @web https://www.sparkfun.com/products/9670 * @con gpio pwm * - * @brief API for the L298 Dual H-Bridge module + * @brief API for the L298 Dual H-Bridge Motor Driver * * It was developed using the RobotBase Dual H-Bridge module. * - * This module can support 2 DC motors, or 1 2-phase stepper motor. - * It requires 3 pins per DC motor (or h-bridge), or 4 pins for - * the stepper (uses both h-bridges). + * This module can support 2 DC motors, or one 2-phase stepper motor. + * It requires 3 pins per DC motor (or H-bridge), or 4 pins for + * the stepper motor (uses both H-bridges). * * @image html l298.jpg - *
L298 Dual H-Bridge Motor Driver image provided by SparkFun under + *
L298 Dual H-Bridge Motor Driver image provided by SparkFun* under * * CC BY-NC-SA-3.0. * @@ -81,77 +81,77 @@ namespace upm { /** * L298 constructor for DC motor(s) connected. * - * @param pwm digital pin to use for DC motor - must be PWM capable - * @param dir1 digital pin to use for motor direction pin 1 - * @param dir2 digital pin to use for motor direction pin 2 + * @param pwm Digital pin to use for a DC motor - must be PWM-capable + * @param dir1 Digital pin to use for motor direction pin 1 + * @param dir2 Digital pin to use for motor direction pin 2 */ L298(int pwm, int dir1, int dir2); /** - * L298 constructor for 4-wire stepper motor + * L298 constructor for a 4-wire stepper motor * - * @param stepsPerRev number of steps per full revolution - * @param en enable pin - * @param i1 digital pin to use for stepper input 1 - * @param i2 digital pin to use for stepper input 2 - * @param i3 digital pin to use for stepper input 3 - * @param i4 digital pin to use for stepper input 4 + * @param stepsPerRev Number of steps per full revolution + * @param en Enables the pin + * @param i1 Digital pin to use for stepper input 1 + * @param i2 Digital pin to use for stepper input 2 + * @param i3 Digital pin to use for stepper input 3 + * @param i4 Digital pin to use for stepper input 4 */ L298(int stepsPerRev, int en, int i1, int i2, int i3, int i4); /** - * L298 Destructor + * L298 destructor */ ~L298(); /** - * Return the number of milliseconds elapsed since initClock() + * Returns the number of milliseconds elapsed since initClock() * was last called. * - * @return elapsed milliseconds + * @return Elapsed milliseconds */ uint32_t getMillis(); /** - * Reset the Clock + * Resets the clock * */ void initClock(); /** - * set the period in milliseconds + * Sets the period in milliseconds * - * @param ms period in milliseconds + * @param ms Period in milliseconds */ void setPeriodMS(int ms); /** - * enable PWM output for a motor + * Enables the PWM output for a motor * - * @param enable enable PWM output if true, disable if false + * @param enable Enables the PWM output if true, disables if false */ void enable(bool enable); /** - * set the speed of a DC or stepp motor. For a DC motor, Values - * can range from 0 (off) to 100 (full speed). For a stepper + * Sets the speed of a DC or stepper motor. For a DC motor, values + * can range from 0 (off) to 100 (full speed). For a stepper * motor, specify the desired RPM. * - * @param speed speed to set the motor to + * @param speed Speed to set the motor to */ void setSpeed(int speed); /** - * set the direction of the motor, clockwise or counter clockwise + * Sets the direction of the motor, clockwise or counterclockwise * - * @param dir direction to set the motor to + * @param dir Direction to set the motor to */ void setDirection(L298_DIRECTION_T dir); /** - * step the stepper motor a specified number of steps + * Steps the stepper motor a specified number of steps * - * @param steps number of steps to move the stepper motor + * @param steps Number of steps to move the stepper motor */ void stepperSteps(unsigned int steps); @@ -181,12 +181,12 @@ namespace upm { uint32_t m_stepDelay; /** - * step the motor one tick + * Steps the motor one tick * */ void stepperStep(); - // step direction - 1 = forward, -1 = backward + // step direction: - 1 = forward, -1 = backward int m_stepDirection; }; } diff --git a/src/lcd/jhd1313m1.h b/src/lcd/jhd1313m1.h index 41349807..3742369b 100644 --- a/src/lcd/jhd1313m1.h +++ b/src/lcd/jhd1313m1.h @@ -41,13 +41,13 @@ namespace upm * @con i2c * @kit gsk * - * @brief API for Jhd1313m1 i2c controller for HD44780 based displays with - * an RGB backlight such as the Grove RGB i2c LCD display + * @brief API for the JHD1313M1 I2C controller for HD44780-based displays with + * an RGB backlight, such as a Grove RGB I2C LCD display * - * The Jhd1313m1 has two i2c addreses, one belongs to a controller very similar - * to the upm::Lcm1602 LCD driver which controls the HD44780 based display and the - * other controls solely the backlight. This module was tested with the Seed - * Grove LCD RGB Backlight v2.0 display which requires 5V to operate. + * JHD1313M1 has two I2C addreses: one belongs to a controller, very similar + * to the upm::Lcm1602 LCD driver, that controls the HD44780-based display, and the + * other controls only the backlight. This module was tested with the Seeed + * Grove LCD RGB Backlight v2.0 display that requires 5V to operate. * * @image html grovergblcd.jpg * @snippet jhd1313m1-lcd.cxx Interesting @@ -58,9 +58,9 @@ class Jhd1313m1 : public Lcm1602 /** * Jhd1313m1 constructor * - * @param bus i2c bus to use - * @param address the slave address the lcd is registered on - * @param address the slave address the rgb backlight is on + * @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 */ Jhd1313m1(int bus, int lcdAddress = 0x3E, int rgbAddress = 0x62); /** @@ -68,19 +68,19 @@ class Jhd1313m1 : public Lcm1602 */ ~Jhd1313m1(); /** - * Make the LCD scroll text + * Makes the LCD scroll text * - * @param direction, true is typical scrolling to the right - * @return Result of operation + * @param direction True if scrolling to the right + * @return Result of the operation */ mraa_result_t scroll(bool direction); /** - * Set the color of the backlight + * Sets the color of the backlight * * @param r 0-255 value for red * @param g 0-255 value for green * @param b 0-255 value for blue - * @return Result of operation + * @return Result of the operation */ mraa_result_t setColor(uint8_t r, uint8_t g, uint8_t b); diff --git a/src/lcd/lcd.h b/src/lcd/lcd.h index 271e7e64..77fa8945 100644 --- a/src/lcd/lcd.h +++ b/src/lcd/lcd.h @@ -29,7 +29,7 @@ namespace upm { /** - * @brief I2C LCD display library + * @brief I2C LCD Display library * @defgroup i2clcd libupm-i2clcd * @ingroup seeed sparkfun adafruit i2c display gsk */ diff --git a/src/lcd/lcm1602.h b/src/lcd/lcm1602.h index 9975971e..0757047d 100644 --- a/src/lcd/lcm1602.h +++ b/src/lcd/lcm1602.h @@ -48,13 +48,13 @@ namespace upm * @web https://www.adafruit.com/datasheets/TC1602A-01T.pdf * @con i2c * - * @brief API for LCM1602 i2c controller for HD44780 based displays + * @brief API for the LCM1602 I2C controller for HD44780-based displays * - * This supports all sizes of HD44780 displays from 16x2 to 4x20, the - * controller has no idea of the actual display hardware so will let you write - * further than you can see. These displays with such controllers are available - * from various manufacturers with different i2c addresses. The adafruit - * TC1602A-01T seems to be a well documented example. + * This supports all sizes of HD44780 displays, from 16x2 to 4x20. The + * controller has no idea of the actual display hardware, so it lets you write + * farther than you can see. These displays with such controllers are available + * from various manufacturers with different I2C addresses. Adafruit* + * TC1602A-01T seems to be a well-documented example. * * @image html lcm1602.jpeg * @snippet lcm1602-lcd.cxx Interesting @@ -63,11 +63,11 @@ class Lcm1602 : public LCD { public: /** - * Lcm1602 Constructor, calls libmraa initialisation functions + * Lcm1602 constructor; calls libmraa initialisation functions * - * @param bus i2c bus to use - * @param address the slave address the lcd is registered on - * @param isExpander true if we are dealing with an I2C expander, + * @param bus I2C bus to use + * @param address Slave address the LCD is registered on + * @param isExpander True if we are dealing with an I2C expander, * false otherwise. Default is true. */ Lcm1602(int bus, int address, bool isExpander=true); @@ -77,46 +77,46 @@ class Lcm1602 : public LCD * controllers supporting RS, Enable, and 4 data pins in 4-bit * mode. * - * @param rs register select pin - * @param enable enable pin - * @param d0 data 0 pin - * @param d1 data 1 pin - * @param d2 data 2 pin - * @param d3 data 3 pin + * @param rs Register select pin + * @param enable Enable pin + * @param d0 Data 0 pin + * @param d1 Data 1 pin + * @param d2 Data 2 pin + * @param d3 Data 3 pin */ Lcm1602(uint8_t rs, uint8_t enable, uint8_t d0, uint8_t d1, uint8_t d2, uint8_t d3); /** - * Lcm1602 Destructor + * Lcm1602 destructor */ ~Lcm1602(); /** - * Write a string to LCD + * Writes a string to the LCD * - * @param msg The std::string to write to display, note only ascii - * chars are supported - * @return Result of operation + * @param msg std::string to write to the display; note: only ASCII + * characters are supported + * @return Result of the operation */ mraa_result_t write(std::string msg); /** - * Set cursor to a coordinate + * Sets the cursor to specified coordinates * - * @param row The row to set cursor to - * @param column The column to set cursor to - * @return Result of operation + * @param row Row to set the cursor to + * @param column Column to set the cursor to + * @return Result of the operation */ mraa_result_t setCursor(int row, int column); /** - * Clear display from characters + * Clears the display of all characters * - * @return Result of operation + * @return Result of the operation */ mraa_result_t clear(); /** - * Return to coordinate 0,0 + * Returns to the original coordinates (0,0) * - * @return Result of operation + * @return Result of the operation */ mraa_result_t home(); diff --git a/src/lcd/ssd1308.h b/src/lcd/ssd1308.h index 078e3cbf..2c3212d9 100644 --- a/src/lcd/ssd1308.h +++ b/src/lcd/ssd1308.h @@ -1,4 +1,4 @@ -/* +/* * Author: Yevgeniy Kiveisha * Copyright (c) 2014 Intel Corporation. * @@ -44,11 +44,11 @@ const uint8_t DISPLAY_CMD_SET_NORMAL_1308 = 0xA6; * @web http://www.seeedstudio.com/wiki/Grove_-_OLED_Display_0.96%22 * @con i2c * - * @brief API for SSD1308 i2c controlled OLED displays + * @brief API for SSD1308 I2C-controlled OLED displays * - * The SSD1308 is a 128x64 Dot matrix OLED/PLED segment driver with + * SSD1308 is a 128x64 dot-matrix OLED/PLED segment driver with a * controller. This implementation was tested using the Grove LED 128×64 - * Display module which is an OLED monochrome display. + * Display module, which is an OLED monochrome display. * * @image html ssd1308.jpeg * @snippet ssd1308-oled.cxx Interesting @@ -57,51 +57,51 @@ class SSD1308 : public LCD { public: /** - * SSD1308 Constructor, calls libmraa initialisation functions + * SSD1308 constructor; calls libmraa initialisation functions * - * @param bus i2c bus to use - * @param address the slave address the lcd is registered on + * @param bus I2C bus to use + * @param address Slave address the LCD is registered on */ SSD1308(int bus, int address = 0x3C); /** - * SSD1308 Destructor + * SSD1308 destructor */ ~SSD1308(); /** - * Draw an image, see examples/python/make_oled_pic.py for an - * explanation on how the pixels are mapped to bytes + * Draws an image; see examples/python/make_oled_pic.py for an + * explanation of how pixels are mapped to bytes * - * @param data the buffer to read - * @param bytes the amount of bytes to read from the pointer - * @return Result of operation + * @param data Buffer to read + * @param bytes Number of bytes to read from the pointer + * @return Result of the operation */ mraa_result_t draw(uint8_t* data, int bytes); /** - * Write a string to LCD + * Writes a string to the LCD * - * @param msg The std::string to write to display, note only ascii - * chars are supported - * @return Result of operation + * @param msg std::string to write to the display; note: only ASCII + * characters are supported + * @return Result of the operation */ mraa_result_t write(std::string msg); /** - * Set cursor to a coordinate + * Sets the cursor to specified coordinates * - * @param row The row to set cursor to - * @param column The column to set cursor to - * @return Result of operation + * @param row Row to set the cursor to + * @param column Column to set the cursor to + * @return Result of the operation */ mraa_result_t setCursor(int row, int column); /** - * Clear display from characters + * Clears the display of all characters * - * @return Result of operatio + * @return Result of the operation */ mraa_result_t clear(); /** - * Return to coordinate 0,0 + * Returns to the original coordinates (0,0) * - * @return Result of operation + * @return Result of the operation */ mraa_result_t home(); diff --git a/src/lcd/ssd1327.h b/src/lcd/ssd1327.h index 872d8649..8f2b3ec9 100644 --- a/src/lcd/ssd1327.h +++ b/src/lcd/ssd1327.h @@ -1,4 +1,4 @@ -/* +/* * Author: Yevgeniy Kiveisha * Copyright (c) 2014 Intel Corporation. * @@ -44,10 +44,10 @@ const uint8_t DISPLAY_CMD_SET_NORMAL = 0xA4; * @web http://www.seeedstudio.com/wiki/Grove_-_OLED_Display_1.12%22 * @con i2c * - * @brief API for SSD1327 i2c controlled OLED displays + * @brief API for SSD1327 I2C-controlled OLED displays * - * The SSD1327 is a 96x96 Dot matrix OLED/PLED segment driver with controller. - * This implementation was tested using the Grove LED 96×96 Display module + * SSD1327 is a 96x96 dot-matrix OLED/PLED segment driver with a controller. + * This implementation was tested using the Grove LED 96×96 Display module, * which is an OLED monochrome display. * * @image html ssd1327.jpeg @@ -57,10 +57,10 @@ class SSD1327 : public LCD { public: /** - * SSD1327 Constructor, calls libmraa initialisation functions + * SSD1327 constructor; calls libmraa initialisation functions * - * @param bus i2c bus to use - * @param address the slave address the lcd is registered on + * @param bus I2C bus to use + * @param address Slave address the LCD is registered on */ SSD1327(int bus, int address = 0x3C); /** @@ -68,47 +68,47 @@ class SSD1327 : public LCD */ ~SSD1327(); /** - * Draw an image, see examples/python/make_oled_pic.py for an - * explanation on how the pixels are mapped to bytes + * Draws an image; see examples/python/make_oled_pic.py for an + * explanation of how pixels are mapped to bytes * - * @param data the buffer to read - * @param bytes the amount of bytes to read from the pointer - * @return Result of operation + * @param data Buffer to read + * @param bytes Number of bytes to read from the pointer + * @return Result of the operation */ mraa_result_t draw(uint8_t* data, int bytes); /** - * Set gray level for LCD panel + * Sets the gray level for the LCD panel * - * @param gray level from 0-255 - * @return Result of operation + * @param gray level from 0 to 255 + * @return Result of the operation */ void setGrayLevel(uint8_t level); /** - * Write a string to LCD + * Writes a string to the LCD * - * @param msg The std::string to write to display, note only ascii - * chars are supported - * @return Result of operation + * @param msg std::string to write to the display; note: only ASCII + * characters are supported + * @return Result of the operation */ mraa_result_t write(std::string msg); /** - * Set cursor to a coordinate + * Sets the cursor to specified coordinates * - * @param row The row to set cursor to - * @param column The column to set cursor to - * @return Result of operation + * @param row Row to set the cursor to + * @param column Column to set the cursor to + * @return Result of the operation */ mraa_result_t setCursor(int row, int column); /** - * Clear display from characters + * Clears the display of all characters * - * @return Result of operatio + * @return Result of the operation */ mraa_result_t clear(); /** - * Return to coordinate 0,0 + * Returns to the original coordinates (0,0) * - * @return Result of operation + * @return Result of the operation */ mraa_result_t home(); diff --git a/src/ldt0028/ldt0028.h b/src/ldt0028/ldt0028.h index 46b4240a..3ab8cc56 100644 --- a/src/ldt0028/ldt0028.h +++ b/src/ldt0028/ldt0028.h @@ -29,7 +29,7 @@ namespace upm { /** - * @brief LDT0-028 piezo vibration sensor library + * @brief LDT0-028 Piezo Vibration Sensor library * @defgroup ldt0028 libupm-ldt0028 * @ingroup seeed analog flexfor */ @@ -44,9 +44,9 @@ namespace upm { * @con analog * * @brief API for LDT0-028 PZT film-based sensors, - * such as the Grove Piezo Vibration sensor + * such as a Grove Piezo Vibration sensor * - * This file defines the LDT0028 interface for libupm-ldt0028 + * This file defines the LDT0-028 interface for libupm-ldt0028 * * @image html ldt0028.jpg * @snippet ldt0028.cxx Interesting @@ -54,9 +54,9 @@ namespace upm { class LDT0028 { public: /** - * LDT0028 Piezo Vibration sensor constructor + * LDT0028 constructor * - * @param pin AIO pin where sensor is connected + * @param pin AIO pin where the sensor is connected */ LDT0028(unsigned int pin); @@ -66,16 +66,16 @@ class LDT0028 { ~LDT0028(); /** - * Return name of this sensor + * Returns the name of this sensor * - * @return the name of this sensor + * @return Name of this sensor */ std::string name(); /** - * Return one sample from this sensor + * Returns one sample from this sensor * - * @return one value from this sensor + * @return One value from this sensor */ int getSample(); diff --git a/src/lol/lol.h b/src/lol/lol.h index 786cc437..2d076c0e 100644 --- a/src/lol/lol.h +++ b/src/lol/lol.h @@ -34,7 +34,7 @@ namespace upm { #define LOL_Y 9 /** - * @brief Olimex LoL array library + * @brief Olimex LoL Array library * @defgroup lol libupm-lol * @ingroup adafruit gpio display */ @@ -42,14 +42,14 @@ namespace upm { /** * @library lol * @sensor lol - * @comname Olimex LoL LED Array + * @comname Olimex LoL Array * @type display * @man adafruit * @con gpio * - * @brief API for Olimex LoL array + * @brief API for the Olimex LoL array * - * This file defines the LoL API and implementation for a simple frame buffer. + * This file defines the LoL API and implementation for a simple framebuffer. * * @image html lolshield.jpg * @snippet lol-example.cxx Interesting @@ -57,7 +57,7 @@ namespace upm { class LoL { public: /** - * Instantiates a LoL object + * Instantiates an LoL object * singleton */ LoL(); @@ -68,25 +68,25 @@ class LoL { ~LoL(); /** - * Get framebuffer pointer - * @return 0 on success + * Gets a framebuffer pointer + * @return 0 if successful */ unsigned char *getFramebuffer(); /** - * Gets pixel at coordinates - * @param x coordinate x - * @param y coordinate y - * @return 1 if pixel is on, 0 if off, -1 on error + * Gets a pixel at specified coordinates + * @param x Coordinate x + * @param y Coordinate y + * @return 1 if the pixel is on, 0 if off, -1 on error */ unsigned char getPixel(int x, int y); /** - * sets pixel at coordinates - * @param x coordinate x - * @param y coordinate y + * Sets a pixel at specified coordinates + * @param x Coordinate x + * @param y Coordinate y * @param pixel 0 is off, 1 is on - * @return 0 on success, -1 on error + * @return 0 if successful, -1 on error */ unsigned char setPixel(int x, int y, unsigned char pixel); diff --git a/src/lpd8806/lpd8806.h b/src/lpd8806/lpd8806.h index 80250e52..7dcf58ec 100644 --- a/src/lpd8806/lpd8806.h +++ b/src/lpd8806/lpd8806.h @@ -34,7 +34,7 @@ namespace upm { /** - * @brief FastPixel lpd8806 library + * @brief FastPixel LPD8806 library * @defgroup lpd8806 libupm-lpd8806 * @ingroup adafruit spi led */ @@ -47,9 +47,9 @@ namespace upm { * @man adafruit * @con spi * - * @brief API for LPD8806 + * @brief API for the LPD8806 RGB LED Strip Controller * - * The FastPixel lpd8806 is an RGB led strip controller. + * FastPixel* LPD8806 is an RGB LED strip controller. * * @image html lpd8806.jpg * @snippet lpd8806.cxx Interesting @@ -58,38 +58,38 @@ class LPD8806 { public: /** - * Instanciates a LPD8806 object + * Instantiates an LPD8806 object * - * @param pixelCount number of pixels in the strip - * @param csn chip select pin + * @param pixelCount Number of pixels in the strip + * @param csn Chip select pin */ LPD8806 (uint16_t pixelCount, uint8_t csn); /** - * LPD8806 object destructor, basicaly it close SPI and the GPIO. + * LPD8806 object destructor; basically, it closes the SPI and the GPIO. */ ~LPD8806 (); /** - * @param pixelOffset pixel offset in the strip of pixel - * @param r red led - * @param g green led - * @param b blue led + * @param pixelOffset Pixel offset in the strip of the pixel + * @param r Red LED + * @param g Green LED + * @param b Blue LED */ void setPixelColor (uint16_t pixelOffset, uint8_t r, uint8_t g, uint8_t b); /** - * Write the data stored in array of pixels to the chip + * Writes the data stored in the array of pixels to the chip */ void show (void); /** - * Return length of the led strip + * Returns the length of the LED strip */ uint16_t getStripLength (void); /** - * Return name of the component + * Returns the name of the component */ std::string name() { @@ -107,12 +107,12 @@ class LPD8806 { void writeRegister (uint8_t reg, uint8_t data); /** - * Set chip select pin LOW + * Sets the chip select pin to LOW */ mraa_result_t CSOn (); /** - * Set chip select pin HIGH + * Sets the chip select pin to HIGH */ mraa_result_t CSOff (); }; diff --git a/src/lsm303/lsm303.h b/src/lsm303/lsm303.h index a848dcaa..8f0e69f2 100644 --- a/src/lsm303/lsm303.h +++ b/src/lsm303/lsm303.h @@ -61,7 +61,7 @@ namespace upm { #define Z 2 /** - * @brief LSM303 accelerometer/compass library + * @brief LSM303 Accelerometer/Compass library * @defgroup lsm303 libupm-lsm303 * @ingroup seeed adafruit i2c accelerometer compass */ @@ -76,12 +76,12 @@ namespace upm { * @web http://www.seeedstudio.com/wiki/Grove_-_6-Axis_Accelerometer%26Compass * @con i2c * - * @brief API for LSM303 Accelerometer & Compass + * @brief API for the LSM303 Accelerometer & Compass * * This file defines the LSM303DLH 3-axis magnetometer/3-axis accelerometer. - * This module was tested with the SeedStudio Grove [6-Axis Accelerometer&Compass] - * module that is used over i2c. The magnometer and acceleromter are accessed - * at two seperate i2c addresses. + * This module was tested with the Seeed Studio* Grove 6-Axis Accelerometer & Compass + * module used over I2C. The magnometer and acceleromter are accessed + * at two seperate I2C addresses. * * @image html lsm303.jpeg * @snippet lsm303.cxx Interesting @@ -89,11 +89,11 @@ namespace upm { class LSM303 { public: /** - * Instanciates a LSM303 object + * Instantiates an LSM303 object * * @param i2c bus - * @param addr magometer - * @param addr accelerometer + * @param addr Magnetometer + * @param addr Accelerometer */ LSM303 (int bus, int addrMag=LSM303_MAG, @@ -106,60 +106,60 @@ class LSM303 { ~LSM303 (); /** - * Get Current Heading, headings <0 indicate an error occured + * Gets the current heading; headings <0 indicate an error has occurred * * @return float */ float getHeading(); /** - * Get the coordinates in XYZ order + * Gets the coordinates in the XYZ order */ mraa_result_t getCoordinates(); /** - * Get accelerometer values - * Call before calling other "get" functions for acceleration + * Gets accelerometer values + * Should be called before other "get" functions for acceleration */ mraa_result_t getAcceleration(); /** - * Get the raw coordinate data, this will get updated when getCoordinates() is called + * Gets raw coordinate data; it is updated when getCoordinates() is called */ int16_t* getRawCoorData(); /** - * Just get the X component of the coordinate data + * Gets the X component of the coordinates data */ int16_t getCoorX(); /** - * Just get the Y component of the coordinate data + * Gets the Y component of the coordinates data */ int16_t getCoorY(); /** - * Just get the Z component of the coordinate data + * Gets the Z component of the coordinates data */ int16_t getCoorZ(); /** - * Get the raw accelerometer data, this will get updated when getAcceleration() is called + * Gets raw accelerometer data; it is updated when getAcceleration() is called */ int16_t* getRawAccelData(); /** - * Just get the X component of the acceleration + * Gets the X component of the acceleration data */ int16_t getAccelX(); /** - * Just get the Y component of the acceleration + * Gets the Y component of the acceleration data */ int16_t getAccelY(); /** - * Just get the Z component of the acceleration + * Gets the Z component of the acceleration data */ int16_t getAccelZ();