docs: header files for sensors starting with [a] reviewed.

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
VadimPopov 2015-08-07 20:33:46 +03:00 committed by Mihai Tudor Panu
parent de49bb0e42
commit 9db2d57de3
11 changed files with 359 additions and 328 deletions

View File

@ -63,32 +63,32 @@ namespace upm {
/** /**
* A110x digital sensor constructor * A110x digital sensor constructor
* *
* @param pin digital pin to use * @param pin Digital pin to use
*/ */
A110X(int pin); A110X(int pin);
/** /**
* A110X Destructor * A110X destructor
*/ */
~A110X(); ~A110X();
/** /**
* Determine whether a magnetic field of south polarity has been detected * Determines whether a magnetic field of south polarity has been detected
* *
* @return True if magnetic field detected * @return True if magnetic field detected
*/ */
bool magnetDetected(); bool magnetDetected();
/** /**
* Install an Interrupt Service Routine (ISR) to be called when * Installs an interrupt service routine (ISR) to be called when
* the appropriate magnetic field is detected. * the appropriate magnetic field is detected
* *
* @param fptr function pointer to function to be called on interrupt * @param fptr Pointer to a function to be called on interrupt
* @param arg pointer to an object that will be supplied as an * @param arg Pointer to an object to be supplied as an
* arguement to the ISR. * argument to the ISR.
*/ */
void installISR(void (*isr)(void *), void *arg); void installISR(void (*isr)(void *), void *arg);
/** /**
* Uninstall the previously installed Interrupt Service Routine (ISR) * Uninstalls the previously installed ISR
* *
*/ */
void uninstallISR(); void uninstallISR();

View File

@ -34,7 +34,7 @@
namespace upm { namespace upm {
/** /**
* @brief AD8232 heart rate monitor library * @brief AD8232 Heart Rate Monitor library
* @defgroup ad8232 libupm-ad8232 * @defgroup ad8232 libupm-ad8232
* @ingroup sparkfun gpio medical * @ingroup sparkfun gpio medical
*/ */
@ -50,17 +50,17 @@ namespace upm {
* *
* @brief UPM module for the AD8232 Heart Rate Monitor * @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 will simply spit out the ADC values reported by the * This module simply spits out the ADC values reported by the sensor, with
* sensor, with the intent being to send that data somewhere (via * the intent to send that data, via serial or network port, somewhere to
* serial or network port) to another piece of software running on a * another piece of software running on a computer that plots the data for
* computer that will plot the data for you, like an EKG. * you, like an EKG.
* *
* Processing (https://www.processing.org/), is a piece of software * 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. * This example just dumps the raw data:
* *
* @image html ad8232.jpg * @image html ad8232.jpg
* <br><em>AD8232 Heart Rate Monitor image provided by SparkFun under * <br><em>AD8232 Heart Rate Monitor image provided by SparkFun under
@ -76,20 +76,20 @@ namespace upm {
/** /**
* AD8232 constructor * AD8232 constructor
* *
* @param loPlus digital pin to use for LO+ * @param loPlus Digital pin to use for LO+
* @param loMinus digital pin to use LO- * @param loMinus Digital pin to use for LO-
* @param output analog pin to use for reading the data * @param output Analog pin to read the data
*/ */
AD8232(int loPlus, int loMinus, int output, float aref=AD8232_DEFAULT_AREF); AD8232(int loPlus, int loMinus, int output, float aref=AD8232_DEFAULT_AREF);
/** /**
* AD8232 Destructor * AD8232 destructor
*/ */
~AD8232(); ~AD8232();
/** /**
* return the current ADC value for the device output pin. If an * Returns the current ADC value for the device output pin. If an
* LO (Leads Off) event is detected, 0 will be returned. * LO (leads off) event is detected, 0 is returned.
* *
* @return ADC value * @return ADC value
*/ */

View File

@ -52,16 +52,16 @@ namespace upm {
* @web http://www.adafruit.com/products/1438 * @web http://www.adafruit.com/products/1438
* @con i2c * @con i2c
* *
* @brief API for the ADAFRUITMS1438 motor shield * @brief API for the AdafruitMS1438 Motor Shield
* *
* This class implements support for the stepper and DC motors that * This class implements support for the stepper and DC motors that
* can be connected to this Motor Shield. * can be connected to this Motor Shield.
* NOTE: The two servo connections are not actually controlled by * Note: the two servo connections are not controlled by the PCA9685
* the pca9685 controller (or this class), rather they are connected * controller (or this class). They are connected directly to digital
* directly to digital PWM pins 9 and 10 on the arduino breakout. * PWM pins 9 and 10 on the Arduino breakout board.
* *
* @image html adafruitms1438.jpg * @image html adafruitms1438.jpg
* An example using a DC motor conected to M3 * An example using a DC motor connected to M3
* @snippet adafruitms1438.cxx Interesting * @snippet adafruitms1438.cxx Interesting
* An example using a stepper motor connected to M1 & M2 * An example using a stepper motor connected to M1 & M2
* @snippet adafruitms1438-stepper.cxx Interesting * @snippet adafruitms1438-stepper.cxx Interesting
@ -89,7 +89,7 @@ namespace upm {
} DCMOTORS_T; } DCMOTORS_T;
/** /**
* Enum to specify a Stepper motor * Enum to specify a stepper motor
*/ */
typedef enum { typedef enum {
STEPMOTOR_M12 = 0, STEPMOTOR_M12 = 0,
@ -99,62 +99,62 @@ namespace upm {
/** /**
* AdafruitMS1438 constructor * AdafruitMS1438 constructor
* *
* @param bus i2c bus to use * @param bus I2C bus to use
* @param address the address for this sensor * @param address Address for this sensor
*/ */
AdafruitMS1438(int bus, uint8_t address = ADAFRUITMS1438_DEFAULT_I2C_ADDR); AdafruitMS1438(int bus, uint8_t address = ADAFRUITMS1438_DEFAULT_I2C_ADDR);
/** /**
* AdafruitMS1438 Destructor * AdafruitMS1438 destructor
*/ */
~AdafruitMS1438(); ~AdafruitMS1438();
/** /**
* Return the number of milliseconds elapsed since initClock(...) * Returns the number of milliseconds elapsed since initClock(...)
* was last called. * was last called.
* *
* @return elapsed milliseconds * @return Elapsed milliseconds
*/ */
uint32_t getMillis(STEPMOTORS_T motor); uint32_t getMillis(STEPMOTORS_T motor);
/** /**
* Reset the Clock * Resets the clock
* *
*/ */
void initClock(STEPMOTORS_T motor); void initClock(STEPMOTORS_T motor);
/** /**
* Set the PWM period. Note this applies to all PWM channels. * Sets the PWM period. Note: this applies to all PWM channels.
* *
* @param hz set the PWM period * @param hz Sets the PWM period
*/ */
void setPWMPeriod(float hz); void setPWMPeriod(float hz);
/** /**
* enable PWM output for a motor * Enables PWM output for a motor
* *
* @param motor the DC motor to enable * @param motor DC motor to enable
*/ */
void enableMotor(DCMOTORS_T motor); void enableMotor(DCMOTORS_T motor);
/** /**
* disable PWM output for a motor * Disables PWM output for a motor
* *
* @param motor the DC motor to disable * @param motor DC motor to disable
*/ */
void disableMotor(DCMOTORS_T motor); void disableMotor(DCMOTORS_T motor);
/** /**
* enable output for a stepper motor * Enables output for a stepper motor
* *
* @param motor the stepper motor to enable * @param motor Stepper motor to enable
*/ */
void enableStepper(STEPMOTORS_T motor); void enableStepper(STEPMOTORS_T motor);
/** /**
* disable output for a stepper motor * Disable output for a stepper motor
* *
* @param motor the stepper motor to disable * @param motor Stepper motor to disable
*/ */
void disableStepper(STEPMOTORS_T motor); void disableStepper(STEPMOTORS_T motor);
@ -168,57 +168,57 @@ namespace upm {
void setMotorSpeed(DCMOTORS_T motor, int speed); void setMotorSpeed(DCMOTORS_T motor, int speed);
/** /**
* set the speed of a stepper in revolution per minute (RPM) * Sets the speed of a stepper in revolutions per minute (RPM)
* *
* @param motor the DC motor to configure * @param motor DC motor to configure
* @param speed speed to set the motor to * @param speed Speed to set the motor to
*/ */
void setStepperSpeed(STEPMOTORS_T motor, int speed); void setStepperSpeed(STEPMOTORS_T motor, int speed);
/** /**
* set the direction of a DC motor, clockwise or counter clockwise * Sets the direction of a DC motor, clockwise or counterclockwise
* *
* @param motor the DC motor to configure * @param motor DC motor to configure
* @param dir direction to set the motor to * @param dir Direction to set the motor in
*/ */
void setMotorDirection(DCMOTORS_T motor, DIRECTION_T dir); void setMotorDirection(DCMOTORS_T motor, DIRECTION_T dir);
/** /**
* set the direction of a stepper motor, clockwise or counter clockwise * Sets the direction of a stepper motor, clockwise or counterclockwise
* *
* @param motor the stepper motor to configure * @param motor Stepper motor to configure
* @param dir direction to set the motor to * @param dir Direction to set the motor in
*/ */
void setStepperDirection(STEPMOTORS_T motor, DIRECTION_T dir); void setStepperDirection(STEPMOTORS_T motor, DIRECTION_T dir);
/** /**
* set a stepper motor configuration * Sets a stepper motor configuration
* *
* @param motor the stepper motor to configure * @param motor Stepper motor to configure
* @param stepsPerRev the number of step to complete a full revolution * @param stepsPerRev Number of steps to complete a full revolution
*/ */
void stepConfig(STEPMOTORS_T motor, unsigned int stepsPerRev); void stepConfig(STEPMOTORS_T motor, unsigned int stepsPerRev);
/** /**
* step a stepper motor a specified number of steps * Steps a stepper motor a specified number of steps
* *
* @param motor the stepper motor to step * @param motor Stepper motor to step
* @param steps number of steps to move the stepper motor * @param steps Number of steps to move the stepper motor
*/ */
void stepperSteps(STEPMOTORS_T motor, unsigned int steps); void stepperSteps(STEPMOTORS_T motor, unsigned int steps);
private: private:
// SWIG will generate warning for these 'nested structs', however // SWIG will generate a warning for these 'nested structs'; however,
// those can be ignored as these structs are never exposed. // it can be ignored as these structs are never exposed.
// struct to hold mappings of the dc motors // struct to hold mappings of DC motors
typedef struct { typedef struct {
int pwm; int pwm;
int in1; int in1;
int in2; int in2;
} DC_PINMAP_T; } DC_PINMAP_T;
// struct to hold mappings of the stepper motors // struct to hold mappings of stepper motors
typedef struct { typedef struct {
int pwmA; int pwmA;
int in1A; int in1A;
@ -228,7 +228,7 @@ namespace upm {
int in2B; int in2B;
} STEPPER_PINMAP_T; } STEPPER_PINMAP_T;
// struct to hold some information about each stepper // struct to hold information about each stepper
typedef struct { typedef struct {
int stepsPerRev; // steps per revolution int stepsPerRev; // steps per revolution
int currentStep; // current step number int currentStep; // current step number

View File

@ -55,7 +55,7 @@
namespace upm { namespace upm {
/** /**
* @brief Adafruit PCA9685 based servo controller library * @brief Adafruit PCA9685-based Servo Shield library
* @defgroup adafruitss libupm-adafruitss * @defgroup adafruitss libupm-adafruitss
* @ingroup adafruit i2c servos * @ingroup adafruit i2c servos
*/ */
@ -69,13 +69,12 @@ namespace upm {
* @web http://www.adafruit.com/product/1411 * @web http://www.adafruit.com/product/1411
* @con i2c * @con i2c
* *
* @brief API for the Adafruit Servo Shield
* *
* @brief API for Adafruit Servo Shield * UPM library for the PCA9685-based Adafruit 16-channel servo shield. If 3
* * or more GWS servos are attached, results could be unpredictable. Adafruit
* UPM library for the PCA9685 based Adafruit 16-channel servo shield. When 3 * Industries recommend installing a capacitor on the board, which should
* or more GWS servos attached results unpredictable. Adafruit do recommend a * alleviate the issue. Sizing depends on servos and their number.
* capacitor be installed on the board which should alleviate the issue.
* Sizing depends on servos and count.
* *
* @image html adafruitss.jpg * @image html adafruitss.jpg
* @snippet adafruitss.cxx Interesting * @snippet adafruitss.cxx Interesting
@ -84,25 +83,26 @@ namespace upm {
class adafruitss { class adafruitss {
public: public:
/** /**
* Creates a adafruitss object * Creates an adafruitss object
* *
* @param bus number of used i2c bus * @param bus Number of the used I2C bus
* @param i2c_address address of servo controller on i2c bus * @param i2c_address Address of the servo shield on the I2C bus
*/ */
adafruitss(int bus, int i2c_address); adafruitss(int bus, int i2c_address);
int update(void); int update(void);
/** /**
* Sets the frequency for your servos * Sets the frequency of the servos
* *
* @param freq the frequency at which the servos operate * @param freq Frequency at which the servos operate
*/ */
void setPWMFreq(float freq); void setPWMFreq(float freq);
/** /**
* Moves the one of the servos to the specified angle * Moves one of the servos to a specified angle
* *
* @param port port of the servo on the controller (servo number) * @param port Port of the servo on the shield (servo number)
* @param servo_type can be 0 = standard 1ms to 2ms, 1 = extended 0.6ms to 2.4ms, or 2 = extended 0.8ms to 2.2ms * @param servo_type Can be 0 = standard (1ms to 2ms), 1 = extended
* @param degrees angle to set the servo to * (0.6ms to 2.4ms), or 2 = extended (0.8ms to 2.2ms)
* @param degrees Angle to set the servo to
*/ */
void servo(uint8_t port, uint8_t servo_type, float degrees); void servo(uint8_t port, uint8_t servo_type, float degrees);

View File

@ -49,14 +49,14 @@
namespace upm { namespace upm {
/** /**
* @brief ADC121C021 I2C analog digital converter library * @brief ADC121C021 I2C Analog-to-Digital Converter library
* @defgroup adc121c021 libupm-adc121c021 * @defgroup adc121c021 libupm-adc121c021
* @ingroup seeed i2c electric * @ingroup seeed i2c electric
*/ */
/** /**
* valid cycle times for automatic conversion mode * Valid cycle times for the automatic conversion mode
*/ */
typedef enum { ADC121C021_CYCLE_NONE = 0, // disabled typedef enum { ADC121C021_CYCLE_NONE = 0, // disabled
@ -72,18 +72,18 @@ namespace upm {
/** /**
* @library adc121c021 * @library adc121c021
* @sensor adc121c021 * @sensor adc121c021
* @comname ADC121C021 Analog Digital Converter * @comname ADC121C021 Analog-to-Digital Converter
* @altname Grove I2C ADC * @altname Grove I2C ADC
* @type electric * @type electric
* @man seeed * @man seeed
* @web http://www.seeedstudio.com/depot/Grove-I2C-ADC-p-1580.html * @web http://www.seeedstudio.com/depot/Grove-I2C-ADC-p-1580.html
* @con i2c * @con i2c
* *
* @brief API for the ADC121C021 I2C ADC * @brief API for the ADC121C021 I2C Analog-to-Digital Converter
* *
* UPM module for the ADC121C021 12 bit Analog to Digital (ADC) converter. * UPM module for the ADC121C021 12-bit analog-to-digital converter (ADC).
* By providing a constant reference voltage, this sensor helps * By constantly providing a reference voltage, this sensor helps
* to increase the accuracy of a value collected from an analog sensor. * increase the accuracy of a value collected from an analog sensor.
* *
* @image html adc121c021.jpg * @image html adc121c021.jpg
* @snippet adc121c021.cxx Interesting * @snippet adc121c021.cxx Interesting
@ -91,208 +91,212 @@ namespace upm {
class ADC121C021 { class ADC121C021 {
public: public:
/** /**
* adc121c021 ADC constructor * ADC121C021 ADC constructor
* *
* @param bus i2c bus to use * @param bus I2C bus to use
* @param address the address for this sensor; default is 0x55 * @param address Address for this sensor; default is 0x55
* @param vref reference voltage for this sensor; default is 3.0 * @param vref Reference voltage for this sensor; default is 3.0v
*/ */
ADC121C021(int bus, uint8_t address = ADC121C021_DEFAULT_I2C_ADDR, ADC121C021(int bus, uint8_t address = ADC121C021_DEFAULT_I2C_ADDR,
float vref = ADC121C021_DEFAULT_VREF); float vref = ADC121C021_DEFAULT_VREF);
/** /**
* ADC121C021 Destructor * ADC121C021 destructor
*/ */
~ADC121C021(); ~ADC121C021();
/** /**
* Write byte value into register * Writes a byte value into the register
* *
* @param reg register location to write into * @param reg Register location to write into
* @param byte byte to write * @param byte Byte to write
* @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise
*/ */
mraa_result_t writeByte(uint8_t reg, uint8_t byte); mraa_result_t writeByte(uint8_t reg, uint8_t byte);
/** /**
* Write word value into register * Writes a word value into the register
* *
* @param reg register location to write into * @param reg Register location to write into
* @param word word to write * @param word Word to write
* @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise
*/ */
mraa_result_t writeWord(uint8_t reg, uint16_t word); mraa_result_t writeWord(uint8_t reg, uint16_t word);
/** /**
* Read byte value from register * Reads the byte value from the register
* *
* @param reg register location to read from * @param reg Register location to read from
* @return value at specified register * @return Value in the specified register
*/ */
uint8_t readByte(uint8_t reg); uint8_t readByte(uint8_t reg);
/** /**
* Read word value from register * Reads the word value from the register
* *
* @param reg register location to read from * @param reg Register location to read from
* @return value at specified register * @return Value in the specified register
*/ */
uint16_t readWord(uint8_t reg); uint16_t readWord(uint8_t reg);
/** /**
* Read current value of conversion * Reads the current value of conversion
* *
* @return current conversion value * @return Current value of conversion
*/ */
uint16_t value(); uint16_t value();
/** /**
* Convert a supplied value to voltage based on set VREF * Converts a supplied value to voltage based on the set vref
* *
* @param val value of conversion (from value()) * @param val Value of conversion (from value())
* @return conversion value in volts * @return Value of conversion in volts
*/ */
float valueToVolts(uint16_t val); float valueToVolts(uint16_t val);
/** /**
* Read current status of the alert flag. If the flag is set, the * Reads the current status of the alert flag. If the flag is set, the
* lower or upper alert indicators will be set as appropriate, and * low or high alert indicators are set as appropriate, and
* you can access these values with alertLowTriggered() or * you can access these values with alertLowTriggered() or
* alertHighTriggered(). * alertHighTriggered().
* *
* @return true if the alert flag is set * @return True if the alert flag is set
*/ */
bool getAlertStatus(); bool getAlertStatus();
/** /**
* Return the current value of m_alertLow. You must call * Returns the current value of m_alertLow. You must call
* getAlertStatus() to update this value. * getAlertStatus() to update this value.
* *
* @return current alert low status * @return Current status of the alert low flag
*/ */
bool alertLowTriggered() { return m_alertLow; }; bool alertLowTriggered() { return m_alertLow; };
/** /**
* Return the current value of m_alertHigh. You must call * Returns the current value of m_alertHigh. You must call
* getAlertStatus() to update this value. * getAlertStatus() to update this value.
* *
* @return current alert high status * @return Current status of the alert high flag
*/ */
bool alertHighTriggered() { return m_alertHigh; }; bool alertHighTriggered() { return m_alertHigh; };
/** /**
* Clear the alert low and high flags. This will also clear the * Clears the alert low and alert high flags. This also clears the
* last stored alert values. * last stored alert values.
*/ */
void clearAlertStatus(); void clearAlertStatus();
/** /**
* Enable or disable the Alert Flag functionality. If enabled, * Enables or disables the alert flag functionality. If enabled,
* then when the measured value exceeds the low or high limits * when the measured value exceeds the low or high limits
* configured, the alert flag will be set. Use getAlertStatus() * configured, the alert flag is set. Use getAlertStatus()
* to access these values. * to access these values.
* *
* @param enable if true, enables Alert Flag; otherwise, disables Alert Flag * @param enable If true, enables the alert flag; otherwise, disables the
* alert flag
*/ */
void enableAlertFlag(bool enable); void enableAlertFlag(bool enable);
/** /**
* Enable or disable the Alert Pin functionality. * Enables or disables the alert pin functionality.
* *
* @param enable if true, enables Alert Pin; otherwise, disables Alert Pin * @param enable If true, enables the alert pin; otherwise, disables the
* alert pin
*/ */
void enableAlertPin(bool enable); void enableAlertPin(bool enable);
/** /**
* Enable or disable the Alert Hold functionality. When Alert * Enables or disables the alert hold functionality. When the alert
* Hold is enabled, the alert status remains until manually * hold is enabled, the alert status remains until manually
* cleared via clearAlertStatus(). Otherwise, the alert will self * cleared via clearAlertStatus(). Otherwise, the alert self-clears
* clear when the value moves into the defined limits if alerts * when the value moves into the defined limits if alerts
* are enabled via enableAlertFlag(). * are enabled via enableAlertFlag().
* *
* @param enable if true, enables Alert Hold; otherwise, disables Alert Hold * @param enable If true, enables the alert hold; otherwise, disables the
* alert hold
*/ */
void enableAlertHold(bool enable); void enableAlertHold(bool enable);
/** /**
* If the Alert Pin fnctionality is enabled, define the active * If the alert pin is enabled, defines the active
* polarity of the pin in an alert condition. Enabling this sets * polarity of the pin in an alert condition. Enabling this sets
* the pin to active high in an alert condition, otherwise an * the pin to active high in an alert condition; otherwise,
* active low is used. * active low is used.
* *
* @param enable if true, Alert Pin is active high, else active low * @param enable If true, the alert pin is active high; otherwise, active
* low
*/ */
void enableAlertPinPolarityHigh(bool enable); void enableAlertPinPolarityHigh(bool enable);
/** /**
* Enable or disable Automatic Conversion mode. When enabled, the * Enables or disables the automatic conversion mode. When enabled, the
* ADC will sample and update the conversion value independently. * ADC samples and updates the conversion value independently.
* This is disabled by default, and a conversion is only done by * It is disabled by default, so conversion is only done by
* calling value(). * calling value().
* *
* @param cycleTime set the Cycle Time for automatic conversion * @param cycleTime Sets the cycle time for automatic conversion
*/ */
void setAutomaticConversion(ADC121C021_CYCLE_TIME_T cycleTime); void setAutomaticConversion(ADC121C021_CYCLE_TIME_T cycleTime);
/** /**
* Set the Alert Low Limit. If Alerts are enabled and the * Sets the alert low limit. If alerts are enabled and the
* measured conversion value is lower than this, an alert will be * measured conversion value is lower than the low limit, an alert is
* triggered. * triggered.
* *
* @param limit the Low Alert Limit * @param limit Alert low limit
* @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise
*/ */
mraa_result_t setAlertLowLimit(uint16_t limit); mraa_result_t setAlertLowLimit(uint16_t limit);
/** /**
* Set the Alert High Limit. If Alerts are enabled and the * Sets the alert high limit. If alerts are enabled and the
* measured conversion value is higher than this, an alert will be * measured conversion value is higher than the high limit, an alert is
* triggered. * triggered.
* *
* @param limit the High Alert Limit * @param limit Alert high limit
* @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise
*/ */
mraa_result_t setAlertHighLimit(uint16_t limit); mraa_result_t setAlertHighLimit(uint16_t limit);
/** /**
* Set the Hysteresis value. If a high or low alert condition is * Sets the hysteresis value. If a high or low alert condition is
* triggered, the conversion result must move within the high or * triggered, the conversion result must move within the high or
* low limit by more than this value to clear the alert condition. * low limit by more than this value to clear the alert condition.
* If the Alert Hold bit is set, then the alert will not self * If the alert hold is set, the alert doesn't self-clear
* clear regardless of this value. * regardless of this value.
* *
* @param limit Hysteresis Limit * @param limit Hysteresis limit
* @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise
*/ */
mraa_result_t setHysteresis(uint16_t limit); mraa_result_t setHysteresis(uint16_t limit);
/** /**
* Return the Highest Conversion value sampled so far. This value * Returns the highest conversion value recorded so far. This value
* is only updated by the converter when automatic conversion mode * is only updated by the converter when the automatic conversion mode
* is enabled. * is enabled.
* *
* @return the highest conversion value recorded * @return Highest conversion value
*/ */
uint16_t getHighestConversion(); uint16_t getHighestConversion();
/** /**
* Return the Lowest Conversion value sampled so far. This value * Returns the lowest conversion value recorded so far. This value
* is only updated by the converter when automatic conversion mode * is only updated by the converter when the automatic conversion mode
* is enabled. * is enabled.
* *
* @return the lowest conversion value recorded * @return Lowest conversion value
*/ */
uint16_t getLowestConversion(); uint16_t getLowestConversion();
/** /**
* Clear the Highest Conversion value sampled so far. * Clears the highest conversion value recorded so far.
* *
* @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise
*/ */
mraa_result_t clearHighestConversion(); mraa_result_t clearHighestConversion();
/** /**
* Clear the Lowest Conversion value sampled so far. * Clears the lowest conversion value recorded so far.
* *
* @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise * @return 0 (MRAA_SUCCESS) if successful; non-zero otherwise
*/ */

View File

@ -11,7 +11,7 @@
// //
// This library runs on an Intel Edison and uses mraa to acquire data // This library runs on an Intel Edison and uses mraa to acquire data
// from an ADIS16448. This data is then scaled and printed onto the terminal. // from an ADIS16448. This data is then scaled and printed onto the terminal.
// //
// This software has been tested to connect to an ADIS16448 through a level shifter // This software has been tested to connect to an ADIS16448 through a level shifter
// such as the TI TXB0104. The SPI lines (DIN, DOUT, SCLK, /CS) are all wired through // such as the TI TXB0104. The SPI lines (DIN, DOUT, SCLK, /CS) are all wired through
// the level shifter and the ADIS16448 is also being powered by the Intel Edison. // the level shifter and the ADIS16448 is also being powered by the Intel Edison.
@ -84,11 +84,11 @@
namespace upm { namespace upm {
/** /**
* @brief ADIS16448 accelerometer library * @brief ADIS16448 Accelerometer library
* @defgroup adis16448 libupm-adis16448 * @defgroup adis16448 libupm-adis16448
* @ingroup generic spi accelerometer * @ingroup generic spi accelerometer
*/ */
/** /**
* @library adis16448 * @library adis16448
* @sensor adis16448 * @sensor adis16448
@ -98,54 +98,76 @@ namespace upm {
* @web http://www.analog.com/en/products/sensors/isensor-mems-inertial-measurement-units/adis16448.html * @web http://www.analog.com/en/products/sensors/isensor-mems-inertial-measurement-units/adis16448.html
* @con spi * @con spi
* *
* @brief API for Analog Devices ADIS16448 * @brief API for the Analog Devices ADIS16448 Accelerometer
* *
* This is an industrial grade accelerometer by Analog Devices. * This is an industrial-grade accelerometer by Analog Devices.
* *
* @snippet adis16448.cxx Interesting * @snippet adis16448.cxx Interesting
*/ */
class ADIS16448{ class ADIS16448{
public: public:
// Constructor with configurable HW Reset /**
ADIS16448(int bus, int rst); * Constructor with configurable HW Reset
*/
ADIS16448(int bus, int rst);
//Destructor /**
~ADIS16448(); * Destructor
*/
~ADIS16448();
//Performs hardware reset by sending the specified pin low for 2 seconds /**
void resetDUT(); * Performs hardware reset by sending the specified pin low for 2 seconds
*/
void resetDUT();
//Sets SPI frequency, mode, and bits/word /**
void configSPI(); * Sets SPI frequency, mode, and bits/word
*/
void configSPI();
//Read specified register and return data /**
int16_t regRead(uint8_t regAddr); * Reads a specified register and returns data
*/
int16_t regRead(uint8_t regAddr);
//Write to specified register /**
void regWrite(uint8_t regAddr, uint16_t regData); * Writes to a specified register
*/
void regWrite(uint8_t regAddr, uint16_t regData);
//Scale accelerometer data /**
float accelScale(int16_t sensorData); * Scales accelerometer data
*/
float accelScale(int16_t sensorData);
//Scale gyro data /**
float gyroScale(int16_t sensorData); * Scales gyro data
*/
float gyroScale(int16_t sensorData);
//Scale temperature data /**
float tempScale(int16_t sensorData); * Scales temperature data
*/
float tempScale(int16_t sensorData);
//Scale pressure data /**
float pressureScale(int16_t sensorData); * Scales pressure data
*/
float pressureScale(int16_t sensorData);
//Scale magnetometer data /**
float magnetometerScale(int16_t sensorData); * Scales magnetometer data
*/
float magnetometerScale(int16_t sensorData);
private: private:
mraa_spi_context _spi; mraa_spi_context _spi;
mraa_gpio_context _rst; mraa_gpio_context _rst;
}; };
} }

View File

@ -35,7 +35,7 @@
namespace upm { namespace upm {
/** /**
* @brief ADXL335 accelerometer library * @brief ADXL335 Accelerometer library
* @defgroup adxl335 libupm-adxl335 * @defgroup adxl335 libupm-adxl335
* @ingroup seeed analog accelerometer * @ingroup seeed analog accelerometer
*/ */
@ -49,11 +49,11 @@ namespace upm {
* @man seeed * @man seeed
* @con analog * @con analog
* *
* @brief API for the ADXL335 3-axis Analog Accelerometer * @brief API for the ADXL335 3-Axis Analog Accelerometer
* *
* UPM module for the ADXL335 3-axis analog accelerometer. This * UPM module for the ADXL335 3-axis analog accelerometer. This
* was tested on a Grove 3-axis Analog Accelerometer. It uses 3 * was tested on a Grove 3-axis Analog Accelerometer. It uses 3
* analog pins, one each for X, Y, and Z axis. * analog pins, one for each axis: X, Y, and Z.
* *
* @image html adxl335.jpg * @image html adxl335.jpg
* @snippet adxl335.cxx Interesting * @snippet adxl335.cxx Interesting
@ -63,61 +63,60 @@ namespace upm {
/** /**
* ADXL335 constructor * ADXL335 constructor
* *
* @param pinX analog pin to use for axis X * @param pinX Analog pin to use for X-axis
* @param pinY analog pin to use for axis Y * @param pinY Analog pin to use for Y-axis
* @param pinZ analog pin to use for axis Z * @param pinZ Analog pin to use for Z-axis
* @param aref analog voltage reference, default 5.0 * @param aref Analog reference voltage; default is 5.0v
*/ */
ADXL335(int pinX, int pinY, int pinZ, float aref=ADXL335_DEFAULT_AREF); ADXL335(int pinX, int pinY, int pinZ, float aref=ADXL335_DEFAULT_AREF);
/** /**
* ADXL335 Destructor * ADXL335 destructor
*/ */
~ADXL335(); ~ADXL335();
/** /**
* Set the "zero" value of the X axis, determined through calibration * Sets the "zero" value of the X-axis, determined through calibration
* *
* @param zeroX The "zero" value of the X axis * @param zeroX "Zero" value of the X-axis
*/ */
void setZeroX(float zeroX) { m_zeroX = zeroX; }; void setZeroX(float zeroX) { m_zeroX = zeroX; };
/** /**
* Set the "zero" value of the Y axis, determined through calibration * Sets the "zero" value of the Y-axis, determined through calibration
* *
* @param zeroX The "zero" value of the Y axis * @param zeroY "Zero" value of the Y-axis
*/ */
void setZeroY(float zeroY) { m_zeroY = zeroY; }; void setZeroY(float zeroY) { m_zeroY = zeroY; };
/** /**
* Set the "zero" value of the Z axis, determined through calibration * Sets the "zero" value of the Z-axis, determined through calibration
* *
* @param zeroX The "zero" value of the Z axis * @param zeroZ "Zero" value of the Z-axis
*/ */
void setZeroZ(float zeroZ) { m_zeroZ = zeroZ; }; void setZeroZ(float zeroZ) { m_zeroZ = zeroZ; };
/** /**
* Get the analog values for the 3 axes * Gets the analog values for the 3 axes
* *
* @param xVal pointer to returned X value * @param xVal Pointer to the returned X-axis value
* @param yVal pointer to returned Y value * @param yVal Pointer to the returned Y-axis value
* @param zVal pointer to returned Z value * @param zVal Pointer to the returned Z-axis value
*/ */
void values(int *xVal, int *yVal, int *zVal); void values(int *xVal, int *yVal, int *zVal);
/** /**
* Get the acceleration along all 3 axes * Gets the acceleration along all 3 axes
* *
* @param xAccel pointer to returned X value * @param xAccel Pointer to returned X-axis value
* @param yAccel pointer to returned Y value * @param yAccel Pointer to returned Y-axis value
* @param zAccel pointer to returned Z value * @param zAccel Pointer to returned Z-axis value
*/ */
void acceleration(float *xAccel, float *yAccel, float *zAccel); void acceleration(float *xAccel, float *yAccel, float *zAccel);
/** /**
* While the sensor is still, measure the X, Y, and Z values and * While the sensor is still, measures the X-axis, Y-axis, and Z-axis
* use those values as our zero values. * values and uses those values as the zero values.
*
*/ */
void calibrate(); void calibrate();

View File

@ -1,4 +1,4 @@
/* /*
* Author: Mihai Tudor Panu <mihai.tudor.panu@intel.com> * Author: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
* Copyright (c) 2014 Intel Corporation. * Copyright (c) 2014 Intel Corporation.
* *
@ -30,7 +30,7 @@
namespace upm { namespace upm {
/** /**
* @brief ADXL345 accelerometer library * @brief ADXL345 Accelerometer library
* @defgroup adxl345 libupm-adxl345 * @defgroup adxl345 libupm-adxl345
* @ingroup seeed i2c accelerometer * @ingroup seeed i2c accelerometer
*/ */
@ -44,13 +44,14 @@ namespace upm {
* @man seeed * @man seeed
* @con i2c * @con i2c
* *
* @brief API for Adxl345 (3-axis digital accelerometer) * @brief API for the ADXL345 3-Axis Digital Accelerometer
* *
* The Adxl345 is a 3-axis digital accelerometer. * ADXL345 is a 3-axis digital accelerometer.
* (http://www.seeedstudio.com/wiki/images/2/2c/ADXL345_datasheet.pdf) * (http://www.seeedstudio.com/wiki/images/2/2c/ADXL345_datasheet.pdf)
* The sensor has configurable resolutions for measuring ±2g, ±4g, ±8g or ±16g. * The sensor has configurable resolutions to measure ±2g, ±4g, ±8g, or ±16g.
* Note that the sensor it is incompatible and will not be detected on the I2C bus * Note: the sensor is incompatible with and not detected on the I2C bus
* by the Intel Edison using the Arduino breakout board at 5V (3V3 will work fine). * by the Intel(R) Edison using an Arduino breakout board at 5V (3V works
* fine).
* *
* @image html adxl345.jpeg * @image html adxl345.jpeg
* @snippet adxl345.cxx Interesting * @snippet adxl345.cxx Interesting
@ -58,14 +59,14 @@ namespace upm {
class Adxl345 { class Adxl345 {
public: public:
/** /**
* Creates an Adxl345 object * Creates an ADXL345 object
* *
* @param bus number of used i2c bus * @param bus Number of the used I2C bus
*/ */
Adxl345(int bus); Adxl345(int bus);
/** /**
* Adxl345 object destructor * ADXL345 object destructor
*/ */
~Adxl345(); ~Adxl345();
@ -77,23 +78,25 @@ public:
float* getAcceleration(); float* getAcceleration();
/** /**
* 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 the raw register values
* for X, Y, and Z
* *
* @return int* to an int[3] * @return int* to an int[3]
*/ */
int16_t* getRawValues(); int16_t* getRawValues();
/** /**
* Returns the scale the accelerometer is currently set up to: 2, 4, 8 or 16 * Returns the scale the accelerometer is currently set up to: 2, 4, 8,
* or 16
* *
* @return uint with current scale value * @return uint with the current scale value
*/ */
uint8_t getScale(); uint8_t getScale();
/** /**
* Updates the acceleration values from i2c bus * Updates the acceleration values from the I2C bus
* *
* @return 0 for success * @return 0 if successful
*/ */
mraa_result_t update(); mraa_result_t update();
private: private:

View File

@ -50,7 +50,7 @@
namespace upm { namespace upm {
/** /**
* @brief AM2315 temperature & humidity sensor library * @brief AM2315 Temperature & Humidity Sensor library
* @defgroup am2315 libupm-am2315 * @defgroup am2315 libupm-am2315
* @ingroup adafruit i2c temp * @ingroup adafruit i2c temp
*/ */
@ -64,15 +64,15 @@ namespace upm {
* @web http://www.adafruit.com/products/1293 * @web http://www.adafruit.com/products/1293
* @con i2c * @con i2c
* *
* @brief API for AM2315 chip (Temperature & Humidity Sensor) * @brief API for the AM2315 Temperature & Humidity Sensor
* *
* Measurement Specialties [AM2315] * AM2315 by Measurement Specialties
* (http://www.aosong.com/asp_bin/Products/en/AM2315.pdf) * (http://www.aosong.com/asp_bin/Products/en/AM2315.pdf)
* is a digital humidity sensor with temperature output. * is a digital humidity sensor with temperature output.
* RH will report between 0 and 100% and temperature range is * RH reports between 0 and 100%, and the temperature range is
* -40 to +125 degC. * -40 to +125 degC.
* The sampling period of this sensor is 2 seconds. Reads occurring * The sampling period of this sensor is 2 seconds. Reads occurring
* more often than that will return cached data. * more often than that return cached data.
* *
* @image html am2315.jpeg * @image html am2315.jpeg
* @snippet am2315.cxx Interesting * @snippet am2315.cxx Interesting
@ -80,94 +80,97 @@ namespace upm {
class AM2315 { class AM2315 {
public: public:
/** /**
* Instanciates a AM2315 object * Instantiates an AM2315 object
* *
* @param bus number of used bus * @param bus Number of the used bus
* @param devAddr address of used i2c device * @param devAddr Address of the used I2C device
* @param mode AM2315 oversampling * @param mode AM2315 oversampling
*/ */
AM2315 (int bus, int devAddr=AM2315_I2C_ADDRESS); AM2315 (int bus, int devAddr=AM2315_I2C_ADDRESS);
/** /**
* AM2315 object destructor, basicaly it close i2c connection. * AM2315 object destructor; basicaly, it closes the I2C connection.
*/ */
~AM2315 (); ~AM2315 ();
/** /**
* Get the current measured humidity [RH] * Gets the current measured humidity [RH]
* Data is updated every 2 seconds - accesses more often than *
* that will return cached data * Data is updated every 2 seconds - accesses occurring more often than
* that return cached data
*/ */
float getHumidity(void); float getHumidity(void);
/** /**
* Get the humidity cell temperature [degC] * Gets the humidity cell temperature [degC]
* Data is updated every 2 seconds - accesses more often than *
* that will return cached data * Data is updated every 2 seconds - accesses occurring more often than
* that return cached data
*/ */
float getTemperature(void); float getTemperature(void);
/** /**
* Get the humidity cell temperature [degF] * Gets the humidity cell temperature [degF]
* Data is updated every 2 seconds - accesses more often than *
* that will return cached data * Data is updated every 2 seconds - accesses occurring more often than
* that return cached data
*/ */
float getTemperatureF(void); float getTemperatureF(void);
/** /**
* Function intended to test the device and verify it * Function intended to test the device and verify it
* is correctly operating. * is operating correctly.
* *
*/ */
int testSensor(void); int testSensor(void);
/** /**
* Write four byte (32b) register * Writes a four-byte (32b) register
* *
* Note: These access routines are not the normal accesses to an i2c * Note: these access routines are not the normal accesses to an I2C
* device. The AM2315 contains a microcontroller that manages the * device. AM2315 contains a microcontroller that manages the
* actual readings. These handlers then make requests over i2c using * actual readings. These handlers then make requests over I2C using
* a protocol defined by the AM2315. * a protocol defined by AM2315.
* *
* @param reg address of a register * @param reg Address of the register
* @param ival 32b value * @param ival 32b value
*/ */
int i2cWriteReg_32(int reg, uint32_t ival); int i2cWriteReg_32(int reg, uint32_t ival);
/** /**
* Write two byte (16b) register * Writes a two-byte (16b) register
* *
* @param reg address of a register * @param reg Address of the register
* @param ival 16b value * @param ival 16b value
*/ */
int i2cWriteReg_16(int reg, uint16_t ival); int i2cWriteReg_16(int reg, uint16_t ival);
/** /**
* Write one byte (8b) register * Writes a one-byte (8b) register
* *
* @param reg address of a register * @param reg Address of the register
* @param ival 8b value * @param ival 8b value
*/ */
int i2cWriteReg_8(int reg, uint8_t ival); int i2cWriteReg_8(int reg, uint8_t ival);
/** /**
* Read four bytes register * Reads a four-byte register
* *
* @param reg address of a register * @param reg Address of the register
*/ */
uint32_t i2cReadReg_32 (int reg); uint32_t i2cReadReg_32 (int reg);
/** /**
* 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); 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); uint8_t i2cReadReg_8 (int reg);

View File

@ -28,7 +28,7 @@
namespace upm { namespace upm {
/** /**
* @brief APDS-9002 luminance sensor library * @brief APDS-9002 Luminance Sensor library
* @defgroup apds9002 libupm-apds9002 * @defgroup apds9002 libupm-apds9002
* @ingroup seeed analog light * @ingroup seeed analog light
*/ */
@ -42,10 +42,10 @@ namespace upm {
* @man seeed * @man seeed
* @con analog * @con analog
* *
* @brief UPM module for the Grove Luminance Sensor * @brief UPM module for the APDS-9002 Luminance Sensor
* *
* This sensor transforms luminous intensity to output analog values. * This sensor transforms luminous intensity to output analog values.
* It uses the APDS-9002 ambient light sensor. * It uses an APDS-9002 ambient light sensor.
* *
* @image html apds9002.jpg * @image html apds9002.jpg
* @snippet apds9002.cxx Interesting * @snippet apds9002.cxx Interesting
@ -54,19 +54,19 @@ namespace upm {
class APDS9002 { class APDS9002 {
public: public:
/** /**
* Grove luminance sensor constructor * APDS-9002 luminance sensor constructor
* *
* @param pin analog pin to use * @param pin Analog pin to use
*/ */
APDS9002(int pin); APDS9002(int pin);
/** /**
* APDS9002 Destructor * APDS9002 destructor
*/ */
~APDS9002(); ~APDS9002();
/** /**
* Get the luminance value from the sensor * Gets the luminance value from the sensor
* *
* @return the luminance reading * @return Luminance value
*/ */
int value(); int value();

View File

@ -35,7 +35,7 @@
namespace upm namespace upm
{ {
/** /**
* @brief Atmel AT42QT1070 QTouch sensor library * @brief Atmel AT42QT1070 QTouch* Sensor library
* @defgroup at42qt1070 libupm-at42qt1070 * @defgroup at42qt1070 libupm-at42qt1070
* @ingroup seeed i2c touch * @ingroup seeed i2c touch
*/ */
@ -49,12 +49,12 @@ namespace upm
* @man seeed * @man seeed
* @con i2c * @con i2c
* *
* @brief API for the Atmel AT42QT1070 QTouch sensor * @brief API for the Atmel AT42QT1070 QTouch Sensor
* *
* This class implements support for the Atmel AT42QT1070 QTouch * This class implements support for the Atmel AT42QT1070 QTouch
* sensor, which supports 7 capacitive buttons. * sensor, which supports 7 capacitive buttons.
* *
* It was developed using the Grove Q Touch Sensor board. * It was developed using a Grove-Q Touch Sensor board.
* *
* @image html at42qt1070.jpg * @image html at42qt1070.jpg
* @snippet at42qt1070.cxx Interesting * @snippet at42qt1070.cxx Interesting
@ -143,122 +143,122 @@ class AT42QT1070
/** /**
* AT42QT1070 constructor * AT42QT1070 constructor
* *
* @param bus i2c bus to use * @param bus I2C bus to use
* @param address the address for this sensor * @param address Address for this sensor
*/ */
AT42QT1070(int bus, uint8_t address = AT42QT1070_DEFAULT_I2C_ADDR); AT42QT1070(int bus, uint8_t address = AT42QT1070_DEFAULT_I2C_ADDR);
/** /**
* AT42QT1070 Destructor * AT42QT1070 destructor
*/ */
~AT42QT1070(); ~AT42QT1070();
/** /**
* Write byte value into register * Writes a byte value into the register
* *
* @param reg register location to write into * @param reg Register location to write into
* @param byte byte to write * @param byte Byte to write
* @return true if successful * @return True if successful
*/ */
bool writeByte(uint8_t reg, uint8_t byte); bool writeByte(uint8_t reg, uint8_t byte);
/** /**
* Write word value at register. Note, the device must have the * Writes a word value into the register. Note: the device must have the
* auto-increment bit set in the MODE1 register to work. * auto-increment bit set in the MODE1 register to work.
* *
* @param reg register location to write into * @param reg Register location to write into
* @param word word to write * @param word Word to write
* @return true if successful * @return True if successful
*/ */
bool writeWord(uint8_t reg, uint16_t word); bool writeWord(uint8_t reg, uint16_t word);
/** /**
* Read byte value from register * Read a byte value from the register
* *
* @param reg register location to read from * @param reg Register location to read from
* @return value at specified register * @return Value in the specified register
*/ */
uint8_t readByte(uint8_t reg); uint8_t readByte(uint8_t reg);
/** /**
* Read word value from register. Note, the device must have the * Read a word value from the register. Note: the device must have the
* auto-increment bit set in the MODE1 register to work. * auto-increment bit set in the MODE1 register to work.
* *
* @param reg register location to read from * @param reg Register location to read from
* @return value at specified register * @return Value in the specified register
*/ */
uint16_t readWord(uint8_t reg); uint16_t readWord(uint8_t reg);
/** /**
* Read the Chip ID register on the sensor * Reads the Chip ID register on the sensor
* *
* @return the value of the Chip ID register * @return Value of the Chip ID register
*/ */
uint8_t readChipID(void); uint8_t readChipID(void);
/** /**
* Read the current touch status and detection state * Reads the current touch status and detection state
* *
* @return key status bits for all keys (0-6) * @return Key status bits for all keys (0-6)
*/ */
void updateState(); void updateState();
/** /**
* Read the current low-power mode setting * Reads the current low-power mode setting
* *
* @return return low-power mode setting from sensor * @return Low-power mode setting from the sensor
*/ */
uint8_t getLPMode(void); uint8_t getLPMode(void);
/** /**
* Change the low-pomer mode setting on the sensor * Changes the low-pomer mode setting on the sensor
* *
* @param mode desired new mode * @param mode dDsired new mode
* @return new setting on sensor * @return New setting on the sensor
*/ */
uint8_t setLPMode(uint8_t mode); uint8_t setLPMode(uint8_t mode);
/** /**
* Read the current averaging factor setting for a key * Reads the current averaging factor setting for a key
* *
* @param key the key being read * @param key Key being read
* @return the averaging factor * @return Averaging factor
*/ */
uint8_t getAVE(uint8_t key); uint8_t getAVE(uint8_t key);
/** /**
* Change the averaging factor setting for a key * Changes the averaging factor setting for a key
* *
* @param key the key being changed * @param key Key being changed
* @param ave the new averaging factor * @param ave New averaging factor
* @return the new averaging factor as read from the device * @return New averaging factor as read from the device
*/ */
uint8_t setAVE(uint8_t key, uint8_t ave); uint8_t setAVE(uint8_t key, uint8_t ave);
/** /**
* Read the AKS group a key is part of * Reads the AKS group of which a key is part
* *
* @param key the key (0-6) being queried * @param key Key (0-6) being queried
* @return AKS group the key is part of * @return AKS group of which the key is part
*/ */
uint8_t getAKSGroup(uint8_t key); uint8_t getAKSGroup(uint8_t key);
/** /**
* Change the AKS group that a key is part of * Changes the AKS group of which a key is part
* *
* @param key the key (0-6) being changed * @param key Key (0-6) being changed
* @param group the new group for the key * @param group New group for the key
* @return return the new value on the sensor * @return New value on the sensor
*/ */
uint8_t setAKSGroup(uint8_t key, uint8_t group); uint8_t setAKSGroup(uint8_t key, uint8_t group);
/** /**
* return the overflow indicator * Returns the overflow indicator
* *
* @return true if overflow indicated * @return True if overflow is indicated
*/ */
bool bool
isOverflowed() isOverflowed()
@ -267,9 +267,9 @@ class AT42QT1070
}; };
/** /**
* return the calibrating indicator * Returns the calibrating indicator
* *
* @return true if calibration is in progress * @return True if calibration is in progress
*/ */
bool bool
isCalibrating() isCalibrating()
@ -278,23 +278,23 @@ class AT42QT1070
}; };
/** /**
* Issue a reset command * Issues a reset command
* *
* @return true if reset successful * @return True if successful
*/ */
bool reset(); bool reset();
/** /**
* Issue a calibrate command * Issues a calibrate command
* *
* @return true if calibrate successful * @return True if successful
*/ */
bool calibrate(); bool calibrate();
/** /**
* Get the current button states * Gets the current button states
* *
* @returns the button states * @returns Button states
*/ */
uint8_t uint8_t
getButtons() getButtons()