diff --git a/src/ecs1030/ecs1030.h b/src/ecs1030/ecs1030.h index 0884e9b5..347e0fa5 100644 --- a/src/ecs1030/ecs1030.h +++ b/src/ecs1030/ecs1030.h @@ -49,7 +49,7 @@ namespace upm { /** * @brief C++ API for ECS1030 (electricity sensor) * - * @ingroup ecs1030 + * @ingroup ecs1030 analog * @snippet ecs1030.cxx Interesting */ diff --git a/src/gas/mq2.h b/src/gas/mq2.h index 137ac4ca..f1c1078e 100644 --- a/src/gas/mq2.h +++ b/src/gas/mq2.h @@ -36,7 +36,7 @@ namespace upm { * Hydrogen, smoke and other combustible gases. It's a medium sensitivity * sensor with a detect concentration of 300-10000ppm. * - * @ingroup gas + * @ingroup gas analog * @snippet mq2.cxx Interesting * @image html grovegas.jpeg */ diff --git a/src/gas/mq3.h b/src/gas/mq3.h index c5e2cae9..55f33546 100644 --- a/src/gas/mq3.h +++ b/src/gas/mq3.h @@ -36,7 +36,7 @@ namespace upm { * highly sensitive but has a long warmup time of about 1minute. It's * detect rate is of 0.04-4mg/L Alcohol. * - * @ingroup gas + * @ingroup gas analog * @snippet mq3.cxx Interesting * @image html grovegas.jpeg */ diff --git a/src/gas/mq5.h b/src/gas/mq5.h index 26c72f59..2a517272 100644 --- a/src/gas/mq5.h +++ b/src/gas/mq5.h @@ -36,7 +36,7 @@ namespace upm { * on. It is highly sensitive and has a detection concentration of * 300-10000ppm. * - * @ingroup gas + * @ingroup gas analog * @snippet mq5.cxx Interesting * @image html grovegas.jpeg */ diff --git a/src/gas/mq9.h b/src/gas/mq9.h index 0e4eada4..e167fc1f 100644 --- a/src/gas/mq9.h +++ b/src/gas/mq9.h @@ -35,7 +35,7 @@ namespace upm { * home and industry). It can detect Carbon Monoxide, Coal Gas and * Liquefied Gas. It's sensitivty is 10-1000ppmCO 100-10000PPm Gas. * - * @ingroup gas + * @ingroup gas analog * @snippet mq9.cxx Interesting * @image html mq9.jpeg */ diff --git a/src/grove/grove.h b/src/grove/grove.h index 2457a355..124a22c5 100644 --- a/src/grove/grove.h +++ b/src/grove/grove.h @@ -49,7 +49,7 @@ class Grove { * * Very basic UPM module for grove LED, or any LED for that matter * - * @ingroup grove + * @ingroup grove gpio * @snippet groveled.cxx Interesting */ class GroveLed: public Grove { @@ -68,7 +68,7 @@ class GroveLed: public Grove { * * Very basic UPM module for grove temperature sensor on analog * - * @ingroup grove + * @ingroup grove analog * @snippet grovetemp.cxx Interesting */ class GroveTemp: public Grove { @@ -104,7 +104,7 @@ class GroveTemp: public Grove { * * Very basic UPM module for grove Light sensor on analog * - * @ingroup grove + * @ingroup grove analog * @snippet grovelight.cxx Interesting */ class GroveLight: public Grove { diff --git a/src/gy65/gy65.h b/src/gy65/gy65.h index c709c9e7..f5fcffff 100644 --- a/src/gy65/gy65.h +++ b/src/gy65/gy65.h @@ -73,7 +73,7 @@ namespace upm { * is a high precision, ultra-low power consumption pressure sensor. It has a * range of between 30,000 and 110,000 Pa. * - * @ingroup gy65 + * @ingroup gy65 i2c * @snippet gy65.cxx Interesting * @image html bmp085.jpeg */ diff --git a/src/hcsr04/hcsr04.h b/src/hcsr04/hcsr04.h index eaf32b33..3085b65e 100644 --- a/src/hcsr04/hcsr04.h +++ b/src/hcsr04/hcsr04.h @@ -47,7 +47,7 @@ namespace upm { * * This file defines the HCSR04 C++ interface for libhcsr04 * - * @ingroup hcsr04 + * @ingroup hcsr04 gpio * @snippet hcsr04.cxx Interesting */ class HCSR04 { diff --git a/src/hmc5883l/hmc5883l.h b/src/hmc5883l/hmc5883l.h index c4a0cef0..05edd067 100644 --- a/src/hmc5883l/hmc5883l.h +++ b/src/hmc5883l/hmc5883l.h @@ -43,7 +43,7 @@ namespace upm { * all done through an I2C interface. Different breakout boards are available, * typically a 3V supply is all that is needed to power the sensor. * - * @ingroup hmc5883l + * @ingroup hmc5883l i2c * @snippet hmc5883l.cxx Interesting * @image html hmc5883l.jpeg */ @@ -53,7 +53,6 @@ public: * Creates a Hmc5883l object * * @param bus number of used i2c bus - * */ Hmc5883l(int bus); diff --git a/src/joystick12/joystick12.h b/src/joystick12/joystick12.h index 3a67680e..38fad455 100644 --- a/src/joystick12/joystick12.h +++ b/src/joystick12/joystick12.h @@ -41,7 +41,7 @@ namespace upm { * button could be treated as normal GPIO, this enables easier * interrupt support * - * @ingroup joystick + * @ingroup joystick analog * @snippet joystick12-example.cxx Interesting */ class Joystick12 { diff --git a/src/lcd/jhd1313m1.h b/src/lcd/jhd1313m1.h index 33533879..814ec431 100644 --- a/src/lcd/jhd1313m1.h +++ b/src/lcd/jhd1313m1.h @@ -38,7 +38,7 @@ namespace upm { * [Grove LCD RGB Backlight v2.0 display] * (http://www.seeedstudio.com/depot/Grove-LCD-RGB-Backlight-p-1643.html?cPath=34_36) * - * @ingroup i2clcd + * @ingroup i2clcd i2c * @snippet rgb-lcd.cxx Interesting * @image html grovergblcd.jpeg */ diff --git a/src/lcd/lcm1602.h b/src/lcd/lcm1602.h index 5c3026fa..9cc33097 100644 --- a/src/lcd/lcm1602.h +++ b/src/lcd/lcm1602.h @@ -42,7 +42,7 @@ namespace upm { * [TC1602A-01T](https://www.adafruit.com/datasheets/TC1602A-01T.pdf) seems to * the best documented example. * - * @ingroup i2clcd + * @ingroup i2clcd i2c * @snippet lcm-lcd.cxx Interesting * @image html lcm1602.jpeg */ diff --git a/src/lcd/ssd1308.h b/src/lcd/ssd1308.h index 83a13cc7..3509a8ff 100644 --- a/src/lcd/ssd1308.h +++ b/src/lcd/ssd1308.h @@ -42,7 +42,7 @@ namespace upm { * (http://www.seeedstudio.com/wiki/Grove_-_OLED_Display_0.96%22) * which is an OLED monochrome display * - * @ingroup i2clcd + * @ingroup i2clcd i2c * @snippet oled-1308.cxx Interesting * @image html ssd1308.jpeg */ diff --git a/src/lcd/ssd1327.h b/src/lcd/ssd1327.h index 31f097fc..226be445 100644 --- a/src/lcd/ssd1327.h +++ b/src/lcd/ssd1327.h @@ -42,7 +42,7 @@ namespace upm { * (http://www.seeedstudio.com/wiki/Grove_-_OLED_Display_1.12%22) * which is an OLED monochrome display * - * @ingroup i2clcd + * @ingroup i2clcd i2c * @snippet oled-1327.cxx Interesting * @image html ssd1327.jpeg */ diff --git a/src/lol/lol.h b/src/lol/lol.h index ba82e263..33d1b2a9 100644 --- a/src/lol/lol.h +++ b/src/lol/lol.h @@ -43,7 +43,7 @@ namespace upm { * * This file defines the LoL API and implemntation for a simple framebuffer * - * @ingroup lol + * @ingroup lol gpio * @snippet lol-example.cxx Interesting */ class LoL { diff --git a/src/lpd8806/lpd8806.h b/src/lpd8806/lpd8806.h index 34122717..157b2b62 100644 --- a/src/lpd8806/lpd8806.h +++ b/src/lpd8806/lpd8806.h @@ -43,7 +43,7 @@ namespace upm { * * The FastPixel lpd8806 is an RGB led strip controller. * - * @ingroup lpd8806 + * @ingroup lpd8806 spi * @snippet lpd8806.cxx Interesting * @image html lpd8806.jpeg */ diff --git a/src/lsm303/lsm303.h b/src/lsm303/lsm303.h index 748db734..f259fa26 100644 --- a/src/lsm303/lsm303.h +++ b/src/lsm303/lsm303.h @@ -74,7 +74,7 @@ namespace upm { * module that is used over i2c. The magnometer and acceleromter are accessed * at two seperate i2c addresses. * - * @ingroup lsm303 + * @ingroup lsm303 i2c * @snippet lsm303.cxx Interesting * @image html lsm303.jpeg */ diff --git a/src/max31723/max31723.h b/src/max31723/max31723.h index e78c1f89..f6b69062 100644 --- a/src/max31723/max31723.h +++ b/src/max31723/max31723.h @@ -48,7 +48,7 @@ namespace upm { * module](http://datasheets.maximintegrated.com/en/ds/MAX31723PMB1.pdf) from * the analog PMOD kit. * - * @ingroup max31723 + * @ingroup max31723 spi * @snippet max31723.cxx Interesting * @image html max31723.jpeg */ diff --git a/src/max31855/max31855.h b/src/max31855/max31855.h index 74dd0272..26580f4d 100644 --- a/src/max31855/max31855.h +++ b/src/max31855/max31855.h @@ -45,7 +45,7 @@ namespace upm { * (http://datasheets.maximintegrated.com/en/ds/MAX31855PMB1.pdf) from the * analog PMOD kit. * - * @ingroup max31855 + * @ingroup max31855 spi * @snippet max31855.cxx Interesting * @image html max31855.jpeg */ diff --git a/src/max44000/max44000.h b/src/max44000/max44000.h index 31e70f80..10d42b75 100644 --- a/src/max44000/max44000.h +++ b/src/max44000/max44000.h @@ -68,6 +68,7 @@ namespace upm { * (http://datasheets.maximintegrated.com/en/ds/MAX44000PMB1.pdf) from the * analog PMOD kit. * + * @ingroup max44000 i2c * @snippet max44000.cxx Interesting * @image html max44000.jpeg */ diff --git a/src/max5487/max5487.h b/src/max5487/max5487.h index 24a61ad0..c0cca7d9 100644 --- a/src/max5487/max5487.h +++ b/src/max5487/max5487.h @@ -48,7 +48,7 @@ namespace upm { * PMOD module](http://datasheets.maximintegrated.com/en/ds/MAX5487PMB1.pdf) * from the analog PMOD kit. * - * @ingroup max5847 + * @ingroup max5847 spi * @snippet max5487.cxx Interesting * @image html max5487.jpeg */ diff --git a/src/maxds3231m/maxds3231m.h b/src/maxds3231m/maxds3231m.h index 87ab1441..e8203a95 100644 --- a/src/maxds3231m/maxds3231m.h +++ b/src/maxds3231m/maxds3231m.h @@ -70,7 +70,7 @@ struct Time3231 { /** * @brief C++ API for MAXDS3231M chip (Ambient and Infrared Proximity Sensor) * - * @ingroup maxds3231m + * @ingroup maxds3231m i2c */ class MAXDS3231M { public: @@ -80,7 +80,7 @@ class MAXDS3231M { * @param bus number of used bus * @param devAddr addres of used i2c device */ - MAXDS3231M (int bus, int devAddr); + MAXDS3231M (int bus=0, int devAddr=0x68); /** * MAXDS3231M object destructor, basicaly it close i2c connection. diff --git a/src/mic/mic.h b/src/mic/mic.h index ac0adf8a..282f0ddd 100644 --- a/src/mic/mic.h +++ b/src/mic/mic.h @@ -45,7 +45,7 @@ namespace upm { * * This file defines the Microphone Analog sensor * - * @ingroup mic + * @ingroup mic pwm * @snippet mic-example.cxx Interesting */ class Microphone { diff --git a/src/mlx90614/mlx90614.h b/src/mlx90614/mlx90614.h index da52bf5b..62c1318f 100644 --- a/src/mlx90614/mlx90614.h +++ b/src/mlx90614/mlx90614.h @@ -62,7 +62,7 @@ namespace upm { * * This file defines the MLX90614 C++ interface for libmlx90614 * - * @ingroup mlx90641 + * @ingroup mlx90641 i2c * @snippet mlx90641.cxx Interesting */ class MLX90614 { @@ -74,7 +74,7 @@ class MLX90614 { * @param bus number of used bus * @param devAddr addres of used i2c device */ - MLX90614 (int bus, int devAddr); + MLX90614 (int bus=0, int devAddr=0x5A); /** * MLX90614 object destructor, basicaly it close i2c connection. diff --git a/src/mma7455/mma7455.h b/src/mma7455/mma7455.h index e8fc9f5f..553e339d 100644 --- a/src/mma7455/mma7455.h +++ b/src/mma7455/mma7455.h @@ -159,7 +159,7 @@ union accelData { * * This file defines the MMA7455 C++ interface for libmma7455 * - * @ingroup mma7455 + * @ingroup mma7455 i2c * @snippet mma7455.cxx Interesting */ class MMA7455 { @@ -170,7 +170,7 @@ class MMA7455 { * @param bus number of used bus * @param devAddr addres of used i2c device */ - MMA7455 (int bus, int devAddr); + MMA7455 (int bus=0, int devAddr=0x1D); /** * MMA7455 object destructor, basicaly it close i2c connection. diff --git a/src/mpu9150/mpu9150.h b/src/mpu9150/mpu9150.h index 70a3ce34..cfb5b253 100644 --- a/src/mpu9150/mpu9150.h +++ b/src/mpu9150/mpu9150.h @@ -118,7 +118,7 @@ struct AxisData { * * This file defines the MPU9150 C++ interface for libmpu9150 * - * @ingroup mpu9150 + * @ingroup mpu9150 i2c * @snippet mpu9150-example.cxx Interesting */ class MPU9150 { @@ -129,7 +129,7 @@ class MPU9150 { * @param bus number of used bus * @param devAddr addres of used i2c device */ - MPU9150 (int bus, int devAddr); + MPU9150 (int bus=0, int devAddr=0x68); /** * MPU9150 object destructor, basicaly it close i2c connection. diff --git a/src/my9221/my9221.h b/src/my9221/my9221.h index ca69254c..99b0a05a 100644 --- a/src/my9221/my9221.h +++ b/src/my9221/my9221.h @@ -47,7 +47,7 @@ namespace upm { * * This file defines the MY9221 C++ interface for libmy9221 * - * @ingroup my9221 + * @ingroup my9221 gpio * @snippet led-bar.cxx Interesting */ class MY9221 { diff --git a/src/servo/es08a.h b/src/servo/es08a.h index cf25c89b..843a4601 100644 --- a/src/servo/es08a.h +++ b/src/servo/es08a.h @@ -33,7 +33,7 @@ namespace upm { * * This file defines the ES08A C++ interface for libes08a * - * @ingroup servo + * @ingroup servo pwm * @snippet es08a.cxx Interesting */ class ES08A : public Servo { diff --git a/src/st7735/st7735.h b/src/st7735/st7735.h index bc342b82..5894e977 100644 --- a/src/st7735/st7735.h +++ b/src/st7735/st7735.h @@ -503,7 +503,7 @@ const unsigned char font[] = { * * This file defines the ST7735 C++ interface for libst7735 * - * @ingroup st7735 + * @ingroup st7735 spi * @snippet st7735.cxx Interesting */ class ST7735 : public GFX { diff --git a/src/stepmotor/stepmotor.h b/src/stepmotor/stepmotor.h index 418dfe41..44bba387 100644 --- a/src/stepmotor/stepmotor.h +++ b/src/stepmotor/stepmotor.h @@ -51,7 +51,7 @@ namespace upm { * * This file defines the stepmotor C++ interface for libstepmotor * - * @ingroup stepmotor + * @ingroup stepper pwm * @snippet stepmotor.cxx Interesting */ class StepMotor { @@ -59,8 +59,8 @@ class StepMotor { /** * Instanciates a StepMotor object * - * @param dirPin direction pin - * @param stePin steper pulse pin + * @param dirPin direction GPIO pin + * @param stePin steper pulse PWM pin */ StepMotor (int dirPin, int stePin); diff --git a/src/tcs3414cs/tcs3414cs.h b/src/tcs3414cs/tcs3414cs.h index b627490f..ce35d414 100644 --- a/src/tcs3414cs/tcs3414cs.h +++ b/src/tcs3414cs/tcs3414cs.h @@ -114,6 +114,7 @@ typedef struct { * * This file defines the TCS3414CS C++ interface for libtcs3414cs * + * @ingroup tcs3414cs i2c * @snippet tcs3414cs-example.cxx Interesting */ class TCS3414CS { diff --git a/src/tm1637/tm1637.h b/src/tm1637/tm1637.h index d60a30f7..0befff26 100644 --- a/src/tm1637/tm1637.h +++ b/src/tm1637/tm1637.h @@ -56,7 +56,7 @@ namespace upm { * * This file defines the TM1637 C++ interface for lib4digitdisplay * - * @ingroup tm1637 + * @ingroup tm1637 gpio * @snippet 4digitdisplay.cxx Interesting * * A diff --git a/src/upm.h b/src/upm.h new file mode 100644 index 00000000..91b3523d --- /dev/null +++ b/src/upm.h @@ -0,0 +1,57 @@ +/* + * Author: Brendan Le Foll + * Copyright (c) 2014 Intel Corporation. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ +#pragma once + +/// @cond DEV +/** + * This file only serves to describe sensor groups based on libmraa groups. + * Sensors may belong to multiple groups. This is purely a documentation header + * and is not meant to be installed anywhere. + */ +/// @endcond DEV + +/** + * @brief Sensors requiring an ADC value to be read + * @defgroup analog Analog Sensors + */ + +/** + * @brief Modules using the i2c bus + * @defgroup i2c I2c + */ + +/** + * @brief Modules using the SPI bus + * @defgroup spi SPI + */ + +/** + * @brief Modules using GPIOs directly + * @defgroup gpio GPIO + */ + +/** + * @brief Modules using a PWM capable GPIO pin + * @defgroup pwm PWM + */