Browse Source

upm: Add sensor groups based on IO types

This commit also fixes adds some default constructor arguments to some i2c
sensors.

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Brendan Le Foll 10 years ago
parent
commit
397af51d7c

+ 1
- 1
src/ecs1030/ecs1030.h View File

@@ -49,7 +49,7 @@ namespace upm {
49 49
 /**
50 50
  * @brief C++ API for ECS1030 (electricity sensor)
51 51
  *
52
- * @ingroup ecs1030
52
+ * @ingroup ecs1030 analog
53 53
  * @snippet ecs1030.cxx Interesting
54 54
  */
55 55
 

+ 1
- 1
src/gas/mq2.h View File

@@ -36,7 +36,7 @@ namespace upm {
36 36
      * Hydrogen, smoke and other combustible gases. It's a medium sensitivity
37 37
      * sensor with a detect concentration of 300-10000ppm.
38 38
      *
39
-     * @ingroup gas
39
+     * @ingroup gas analog
40 40
      * @snippet mq2.cxx Interesting
41 41
      * @image html grovegas.jpeg
42 42
      */

+ 1
- 1
src/gas/mq3.h View File

@@ -36,7 +36,7 @@ namespace upm {
36 36
      * highly sensitive but has a long warmup time of about 1minute. It's
37 37
      * detect rate is of 0.04-4mg/L Alcohol.
38 38
      *
39
-     * @ingroup gas
39
+     * @ingroup gas analog
40 40
      * @snippet mq3.cxx Interesting
41 41
      * @image html grovegas.jpeg
42 42
      */

+ 1
- 1
src/gas/mq5.h View File

@@ -36,7 +36,7 @@ namespace upm {
36 36
      * on. It is highly sensitive and has a detection concentration of
37 37
      * 300-10000ppm.
38 38
      *
39
-     * @ingroup gas
39
+     * @ingroup gas analog
40 40
      * @snippet mq5.cxx Interesting
41 41
      * @image html grovegas.jpeg
42 42
      */

+ 1
- 1
src/gas/mq9.h View File

@@ -35,7 +35,7 @@ namespace upm {
35 35
      * home and industry). It can detect Carbon Monoxide, Coal Gas and
36 36
      * Liquefied Gas. It's sensitivty is 10-1000ppmCO 100-10000PPm Gas.
37 37
      *
38
-     * @ingroup gas
38
+     * @ingroup gas analog
39 39
      * @snippet mq9.cxx Interesting
40 40
      * @image html mq9.jpeg
41 41
      */

+ 3
- 3
src/grove/grove.h View File

@@ -49,7 +49,7 @@ class Grove {
49 49
  *
50 50
  * Very basic UPM module for grove LED, or any LED for that matter
51 51
  *
52
- * @ingroup grove
52
+ * @ingroup grove gpio
53 53
  * @snippet groveled.cxx Interesting
54 54
  */
55 55
 class GroveLed: public Grove {
@@ -68,7 +68,7 @@ class GroveLed: public Grove {
68 68
  *
69 69
  * Very basic UPM module for grove temperature sensor on analog
70 70
  *
71
- * @ingroup grove
71
+ * @ingroup grove analog
72 72
  * @snippet grovetemp.cxx Interesting
73 73
  */
74 74
 class GroveTemp: public Grove {
@@ -104,7 +104,7 @@ class GroveTemp: public Grove {
104 104
  *
105 105
  * Very basic UPM module for grove Light sensor on analog
106 106
  *
107
- * @ingroup grove
107
+ * @ingroup grove analog
108 108
  * @snippet grovelight.cxx Interesting
109 109
  */
110 110
 class GroveLight: public Grove {

+ 1
- 1
src/gy65/gy65.h View File

@@ -73,7 +73,7 @@ namespace upm {
73 73
  * is a high precision, ultra-low power consumption pressure sensor. It has a
74 74
  * range of between 30,000 and 110,000 Pa.
75 75
  *
76
- * @ingroup gy65
76
+ * @ingroup gy65 i2c
77 77
  * @snippet gy65.cxx Interesting
78 78
  * @image html bmp085.jpeg
79 79
  */

+ 1
- 1
src/hcsr04/hcsr04.h View File

@@ -47,7 +47,7 @@ namespace upm {
47 47
  *
48 48
  * This file defines the HCSR04 C++ interface for libhcsr04
49 49
  *
50
- * @ingroup hcsr04
50
+ * @ingroup hcsr04 gpio
51 51
  * @snippet hcsr04.cxx Interesting
52 52
  */
53 53
 class HCSR04 {

+ 1
- 2
src/hmc5883l/hmc5883l.h View File

@@ -43,7 +43,7 @@ namespace upm {
43 43
  * all done through an I2C interface. Different breakout boards are available,
44 44
  * typically a 3V supply is all that is needed to power the sensor.
45 45
  *
46
- * @ingroup hmc5883l
46
+ * @ingroup hmc5883l i2c
47 47
  * @snippet hmc5883l.cxx Interesting
48 48
  * @image html hmc5883l.jpeg
49 49
  */
@@ -53,7 +53,6 @@ public:
53 53
      * Creates a Hmc5883l object
54 54
      *
55 55
      * @param bus number of used i2c bus
56
-     *
57 56
      */
58 57
     Hmc5883l(int bus);
59 58
 

+ 1
- 1
src/joystick12/joystick12.h View File

@@ -41,7 +41,7 @@ namespace upm {
41 41
  * button could be treated as normal GPIO, this enables easier
42 42
  * interrupt support
43 43
  *
44
- * @ingroup joystick
44
+ * @ingroup joystick analog
45 45
  * @snippet joystick12-example.cxx Interesting
46 46
  */
47 47
 class Joystick12 {

+ 1
- 1
src/lcd/jhd1313m1.h View File

@@ -38,7 +38,7 @@ namespace upm {
38 38
  * [Grove LCD RGB Backlight v2.0 display]
39 39
  * (http://www.seeedstudio.com/depot/Grove-LCD-RGB-Backlight-p-1643.html?cPath=34_36)
40 40
  *
41
- * @ingroup i2clcd
41
+ * @ingroup i2clcd i2c
42 42
  * @snippet rgb-lcd.cxx Interesting
43 43
  * @image html grovergblcd.jpeg
44 44
  */

+ 1
- 1
src/lcd/lcm1602.h View File

@@ -42,7 +42,7 @@ namespace upm {
42 42
  * [TC1602A-01T](https://www.adafruit.com/datasheets/TC1602A-01T.pdf) seems to
43 43
  * the best documented example.
44 44
  *
45
- * @ingroup i2clcd
45
+ * @ingroup i2clcd i2c
46 46
  * @snippet lcm-lcd.cxx Interesting
47 47
  * @image html lcm1602.jpeg
48 48
  */

+ 1
- 1
src/lcd/ssd1308.h View File

@@ -42,7 +42,7 @@ namespace upm {
42 42
  * (http://www.seeedstudio.com/wiki/Grove_-_OLED_Display_0.96%22)
43 43
  * which is an OLED monochrome display
44 44
  *
45
- * @ingroup i2clcd
45
+ * @ingroup i2clcd i2c
46 46
  * @snippet oled-1308.cxx Interesting
47 47
  * @image html ssd1308.jpeg
48 48
  */

+ 1
- 1
src/lcd/ssd1327.h View File

@@ -42,7 +42,7 @@ namespace upm {
42 42
  * (http://www.seeedstudio.com/wiki/Grove_-_OLED_Display_1.12%22)
43 43
  * which is an OLED monochrome display
44 44
  *
45
- * @ingroup i2clcd
45
+ * @ingroup i2clcd i2c
46 46
  * @snippet oled-1327.cxx Interesting
47 47
  * @image html ssd1327.jpeg
48 48
  */

+ 1
- 1
src/lol/lol.h View File

@@ -43,7 +43,7 @@ namespace upm {
43 43
  *
44 44
  * This file defines the LoL API and implemntation for a simple framebuffer
45 45
  *
46
- * @ingroup lol
46
+ * @ingroup lol gpio
47 47
  * @snippet lol-example.cxx Interesting
48 48
  */
49 49
 class LoL {

+ 1
- 1
src/lpd8806/lpd8806.h View File

@@ -43,7 +43,7 @@ namespace upm {
43 43
  *
44 44
  * The FastPixel lpd8806 is an RGB led strip controller.
45 45
  *
46
- * @ingroup lpd8806
46
+ * @ingroup lpd8806 spi
47 47
  * @snippet lpd8806.cxx Interesting
48 48
  * @image html lpd8806.jpeg
49 49
  */

+ 1
- 1
src/lsm303/lsm303.h View File

@@ -74,7 +74,7 @@ namespace upm {
74 74
  * module that is used over i2c. The magnometer and acceleromter are accessed
75 75
  * at two seperate i2c addresses.
76 76
  *
77
- * @ingroup lsm303
77
+ * @ingroup lsm303 i2c
78 78
  * @snippet lsm303.cxx Interesting
79 79
  * @image html lsm303.jpeg
80 80
  */

+ 1
- 1
src/max31723/max31723.h View File

@@ -48,7 +48,7 @@ namespace upm {
48 48
  * module](http://datasheets.maximintegrated.com/en/ds/MAX31723PMB1.pdf) from
49 49
  * the analog PMOD kit.
50 50
  *
51
- * @ingroup max31723
51
+ * @ingroup max31723 spi
52 52
  * @snippet max31723.cxx Interesting
53 53
  * @image html max31723.jpeg
54 54
  */

+ 1
- 1
src/max31855/max31855.h View File

@@ -45,7 +45,7 @@ namespace upm {
45 45
  * (http://datasheets.maximintegrated.com/en/ds/MAX31855PMB1.pdf) from the
46 46
  * analog PMOD kit.
47 47
  *
48
- * @ingroup max31855
48
+ * @ingroup max31855 spi
49 49
  * @snippet max31855.cxx Interesting
50 50
  * @image html max31855.jpeg
51 51
  */

+ 1
- 0
src/max44000/max44000.h View File

@@ -68,6 +68,7 @@ namespace upm {
68 68
  * (http://datasheets.maximintegrated.com/en/ds/MAX44000PMB1.pdf) from the
69 69
  * analog PMOD kit.
70 70
  *
71
+ * @ingroup max44000 i2c
71 72
  * @snippet max44000.cxx Interesting
72 73
  * @image html max44000.jpeg
73 74
  */

+ 1
- 1
src/max5487/max5487.h View File

@@ -48,7 +48,7 @@ namespace upm {
48 48
  * PMOD module](http://datasheets.maximintegrated.com/en/ds/MAX5487PMB1.pdf)
49 49
  * from the analog PMOD kit.
50 50
  *
51
- * @ingroup max5847
51
+ * @ingroup max5847 spi
52 52
  * @snippet max5487.cxx Interesting
53 53
  * @image html max5487.jpeg
54 54
  */

+ 2
- 2
src/maxds3231m/maxds3231m.h View File

@@ -70,7 +70,7 @@ struct Time3231 {
70 70
 /**
71 71
  * @brief C++ API for MAXDS3231M chip (Ambient and Infrared Proximity Sensor)
72 72
  *
73
- * @ingroup maxds3231m
73
+ * @ingroup maxds3231m i2c
74 74
  */
75 75
 class MAXDS3231M {
76 76
     public:
@@ -80,7 +80,7 @@ class MAXDS3231M {
80 80
          * @param bus number of used bus
81 81
          * @param devAddr addres of used i2c device
82 82
          */
83
-        MAXDS3231M (int bus, int devAddr);
83
+        MAXDS3231M (int bus=0, int devAddr=0x68);
84 84
 
85 85
         /**
86 86
          * MAXDS3231M object destructor, basicaly it close i2c connection.

+ 1
- 1
src/mic/mic.h View File

@@ -45,7 +45,7 @@ namespace upm {
45 45
  *
46 46
  * This file defines the Microphone Analog sensor
47 47
  *
48
- * @ingroup mic
48
+ * @ingroup mic pwm
49 49
  * @snippet mic-example.cxx Interesting
50 50
  */
51 51
 class Microphone {

+ 2
- 2
src/mlx90614/mlx90614.h View File

@@ -62,7 +62,7 @@ namespace upm {
62 62
  *
63 63
  * This file defines the MLX90614 C++ interface for libmlx90614
64 64
  *
65
- * @ingroup mlx90641
65
+ * @ingroup mlx90641 i2c
66 66
  * @snippet mlx90641.cxx Interesting
67 67
  */
68 68
 class MLX90614 {
@@ -74,7 +74,7 @@ class MLX90614 {
74 74
          * @param bus number of used bus
75 75
          * @param devAddr addres of used i2c device
76 76
          */
77
-        MLX90614 (int bus, int devAddr);
77
+        MLX90614 (int bus=0, int devAddr=0x5A);
78 78
 
79 79
         /**
80 80
          * MLX90614 object destructor, basicaly it close i2c connection.

+ 2
- 2
src/mma7455/mma7455.h View File

@@ -159,7 +159,7 @@ union accelData {
159 159
  *
160 160
  * This file defines the MMA7455 C++ interface for libmma7455
161 161
  *
162
- * @ingroup mma7455
162
+ * @ingroup mma7455 i2c
163 163
  * @snippet mma7455.cxx Interesting
164 164
  */
165 165
 class MMA7455 {
@@ -170,7 +170,7 @@ class MMA7455 {
170 170
          * @param bus number of used bus
171 171
          * @param devAddr addres of used i2c device
172 172
          */
173
-        MMA7455 (int bus, int devAddr);
173
+        MMA7455 (int bus=0, int devAddr=0x1D);
174 174
 
175 175
         /**
176 176
          * MMA7455 object destructor, basicaly it close i2c connection.

+ 2
- 2
src/mpu9150/mpu9150.h View File

@@ -118,7 +118,7 @@ struct AxisData {
118 118
  *
119 119
  * This file defines the MPU9150 C++ interface for libmpu9150
120 120
  *
121
- * @ingroup mpu9150
121
+ * @ingroup mpu9150 i2c
122 122
  * @snippet mpu9150-example.cxx Interesting
123 123
  */
124 124
 class MPU9150 {
@@ -129,7 +129,7 @@ class MPU9150 {
129 129
          * @param bus number of used bus
130 130
          * @param devAddr addres of used i2c device
131 131
          */
132
-        MPU9150 (int bus, int devAddr);
132
+        MPU9150 (int bus=0, int devAddr=0x68);
133 133
 
134 134
         /**
135 135
          * MPU9150 object destructor, basicaly it close i2c connection.

+ 1
- 1
src/my9221/my9221.h View File

@@ -47,7 +47,7 @@ namespace upm {
47 47
  *
48 48
  * This file defines the MY9221 C++ interface for libmy9221
49 49
  *
50
- * @ingroup my9221
50
+ * @ingroup my9221 gpio
51 51
  * @snippet led-bar.cxx Interesting
52 52
  */
53 53
 class MY9221 {

+ 1
- 1
src/servo/es08a.h View File

@@ -33,7 +33,7 @@ namespace upm {
33 33
  *
34 34
  * This file defines the ES08A C++ interface for libes08a
35 35
  *
36
- * @ingroup servo
36
+ * @ingroup servo pwm
37 37
  * @snippet es08a.cxx Interesting
38 38
  */
39 39
 class ES08A : public Servo {

+ 1
- 1
src/st7735/st7735.h View File

@@ -503,7 +503,7 @@ const unsigned char font[] = {
503 503
  *
504 504
  * This file defines the ST7735 C++ interface for libst7735
505 505
  *
506
- * @ingroup st7735
506
+ * @ingroup st7735 spi
507 507
  * @snippet st7735.cxx Interesting
508 508
  */
509 509
 class ST7735 : public GFX {

+ 3
- 3
src/stepmotor/stepmotor.h View File

@@ -51,7 +51,7 @@ namespace upm {
51 51
  *
52 52
  * This file defines the stepmotor C++ interface for libstepmotor
53 53
  *
54
- * @ingroup stepmotor
54
+ * @ingroup stepper pwm
55 55
  * @snippet stepmotor.cxx Interesting
56 56
  */
57 57
 class StepMotor {
@@ -59,8 +59,8 @@ class StepMotor {
59 59
         /**
60 60
          * Instanciates a StepMotor object
61 61
          *
62
-         * @param dirPin direction pin
63
-         * @param stePin steper pulse pin
62
+         * @param dirPin direction GPIO pin
63
+         * @param stePin steper pulse PWM pin
64 64
          */
65 65
         StepMotor (int dirPin, int stePin);
66 66
 

+ 1
- 0
src/tcs3414cs/tcs3414cs.h View File

@@ -114,6 +114,7 @@ typedef struct {
114 114
  *
115 115
  * This file defines the TCS3414CS C++ interface for libtcs3414cs
116 116
  *
117
+ * @ingroup tcs3414cs i2c
117 118
  * @snippet tcs3414cs-example.cxx Interesting
118 119
  */
119 120
 class TCS3414CS {

+ 1
- 1
src/tm1637/tm1637.h View File

@@ -56,7 +56,7 @@ namespace upm {
56 56
  *
57 57
  * This file defines the TM1637 C++ interface for lib4digitdisplay
58 58
  *
59
- * @ingroup tm1637
59
+ * @ingroup tm1637 gpio
60 60
  * @snippet 4digitdisplay.cxx Interesting
61 61
  *
62 62
  *      A

+ 57
- 0
src/upm.h View File

@@ -0,0 +1,57 @@
1
+/*
2
+ * Author: Brendan Le Foll <brendan.le.foll@intel.com>
3
+ * Copyright (c) 2014 Intel Corporation.
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining
6
+ * a copy of this software and associated documentation files (the
7
+ * "Software"), to deal in the Software without restriction, including
8
+ * without limitation the rights to use, copy, modify, merge, publish,
9
+ * distribute, sublicense, and/or sell copies of the Software, and to
10
+ * permit persons to whom the Software is furnished to do so, subject to
11
+ * the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be
14
+ * included in all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+ */
24
+#pragma once
25
+
26
+/// @cond DEV
27
+/**
28
+ * This file only serves to describe sensor groups based on libmraa groups.
29
+ * Sensors may belong to multiple groups. This is purely a documentation header
30
+ * and is not meant to be installed anywhere.
31
+ */
32
+/// @endcond DEV
33
+
34
+/**
35
+ * @brief Sensors requiring an ADC value to be read
36
+ * @defgroup analog Analog Sensors
37
+ */
38
+
39
+/**
40
+ * @brief Modules using the i2c bus
41
+ * @defgroup i2c I2c
42
+ */
43
+
44
+/**
45
+ * @brief Modules using the SPI bus
46
+ * @defgroup spi SPI
47
+ */
48
+
49
+/**
50
+ * @brief Modules using GPIOs directly
51
+ * @defgroup gpio GPIO
52
+ */
53
+
54
+/**
55
+ * @brief Modules using a PWM capable GPIO pin
56
+ * @defgroup pwm PWM
57
+ */