From eb7a3ceac7afccd8d43cd077f86f63f2f9096d81 Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Mon, 26 Sep 2016 17:28:21 -0700 Subject: [PATCH] upm-c: added doxygen tags to generate documentation for C APIs Signed-off-by: Mihai Tudor Panu --- doxy/Doxyfile.in | 6 ++-- src/a110x/a110x.h | 29 ++-------------- src/ad8232/ad8232.h | 8 +++++ src/apa102/apa102.h | 9 +++-- src/bh1750/bh1750.h | 10 +++--- src/biss0001/biss0001.h | 8 ++--- src/collision/collision.h | 21 ++---------- src/dfrec/dfrec.h | 18 +++------- src/dfrorp/dfrorp.h | 23 +++---------- src/dfrph/dfrph.h | 8 +++++ src/ds18b20/ds18b20.h | 64 ++--------------------------------- src/emg/emg.h | 8 +++++ src/flex/flex.h | 8 +++++ src/gas/mqx.h | 7 +++- src/gp2y0a/gp2y0a.h | 34 +++++-------------- src/gsr/gsr.h | 8 +++++ src/hka5/hka5.h | 11 +++--- src/joystick12/joystick12.h | 8 +++++ src/ldt0028/ldt0028.h | 8 +++++ src/led/led.h | 19 +++-------- src/light/light.h | 8 +++++ src/loudness/loudness.h | 8 +++++ src/m24lr64e/m24lr64e.h | 34 ++----------------- src/mic/mic.h | 8 +++++ src/mma7361/mma7361.h | 10 +++--- src/moisture/moisture.h | 8 +++++ src/mpr121/mpr121.h | 8 +++++ src/mq303a/mq303a.h | 26 +++----------- src/nmea_gps/nmea_gps.h | 17 +++------- src/o2/o2.h | 8 +++++ src/relay/relay.h | 8 +++++ src/rotary/rotary.h | 8 +++++ src/servo/es08a.h | 31 +++++------------ src/servo/es9257.h | 31 +++++------------ src/sht1x/sht1x.h | 12 +++---- src/slide/slide.h | 8 +++++ src/temperature/temperature.h | 8 +++++ src/tsl2561/tsl2561.h | 8 +++++ src/ttp223/ttp223.h | 8 +++++ src/urm37/urm37.h | 24 +++---------- src/vdiv/vdiv.h | 8 +++++ src/water/water.h | 8 ++--- src/yg1006/yg1006.h | 9 +++-- 43 files changed, 265 insertions(+), 356 deletions(-) diff --git a/doxy/Doxyfile.in b/doxy/Doxyfile.in index 742eada5..aba2bcf8 100644 --- a/doxy/Doxyfile.in +++ b/doxy/Doxyfile.in @@ -879,7 +879,8 @@ EXCLUDE_SYMBOLS = aci_* # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/examples/c++ \ +EXAMPLE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/examples/c \ + @CMAKE_CURRENT_SOURCE_DIR@/examples/c++ \ @CMAKE_CURRENT_SOURCE_DIR@/docs/ \ @CMAKE_CURRENT_SOURCE_DIR@/src/max31855/ @@ -888,7 +889,8 @@ EXAMPLE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/examples/c++ \ # *.h) to filter out the source-files in the directories. If left blank all # files are included. -EXAMPLE_PATTERNS = *.cxx +EXAMPLE_PATTERNS = *.c \ + *.cxx # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude commands diff --git a/src/a110x/a110x.h b/src/a110x/a110x.h index bc27e9f4..f0f83de9 100644 --- a/src/a110x/a110x.h +++ b/src/a110x/a110x.h @@ -33,34 +33,11 @@ #include "mraa/gpio.h" /** - * @brief A110X Hall Effect library - * @defgroup a110x libupm-a110x - * @ingroup gpio electric robok - */ - -/** + * @file a110x.h * @library a110x - * @sensor a110x - * @comname A110X Hall Effect Sensor - * @altname Grove Hall Sensor - * @altid A1101, A1102, A1103, A1004, A1106 - * @type electric - * @web http://www.allegromicro.com/en/Products/Magnetic-Digital-Position-Sensor-ICs/Hall-Effect-Unipolar-Switches/A1101-2-3-4-6.aspx - * @con gpio - * @kit robok + * @brief C API for the A110X Hall Effect sensors * - * @brief API for the A110X Hall Effect sensors - * - * UPM module for the A110X (A1101, A1102, A1103, A1104, and A1106) - * Hall Effect sensors. It outputs a digital signal indicating - * whether it is detecting a magnetic field with south polarity - * perpendicular to the sensor element. - * - * @image html a110x.jpg - * An example showing a simple test for the presence of a field - * @snippet a110x.cxx Interesting - * An example demonstrating the use of an interrupt handler to count pulses - * @snippet a110x-intr.cxx Interesting + * @include a110x.c */ /** diff --git a/src/ad8232/ad8232.h b/src/ad8232/ad8232.h index 862f085f..8ed34998 100644 --- a/src/ad8232/ad8232.h +++ b/src/ad8232/ad8232.h @@ -36,6 +36,14 @@ #define AD8232_DEFAULT_AREF 3.3 +/** + * @file ad8232.h + * @library ad8232 + * @brief C API for the AD8232 Heart Rate Monitor + * + * @include ad8232.c + */ + /** * device context */ diff --git a/src/apa102/apa102.h b/src/apa102/apa102.h index 1288bbfd..1ed1c5f7 100644 --- a/src/apa102/apa102.h +++ b/src/apa102/apa102.h @@ -33,12 +33,11 @@ extern "C" { #endif /** - * @brief API for controlling APA102/DotStar RGB LED Strips + * @file apa102.h + * @library apa102 + * @brief C API for controlling APA102/DotStar RGB LED Strips * - * APA102 LED Strips provide individually controllable LEDs through a SPI interface. - * For each LED, brightness (0-31) and RGB (0-255) values can be set. - * - * @snippet apa102.c Interesting + * @include apa102.c */ /** diff --git a/src/bh1750/bh1750.h b/src/bh1750/bh1750.h index 9d04df0f..75a371e7 100644 --- a/src/bh1750/bh1750.h +++ b/src/bh1750/bh1750.h @@ -36,13 +36,11 @@ extern "C" { #endif // __cplusplus /** - * @brief UPM C API for the DFRobot I2C BH1750 Light Sensor + * @file bh1750.h + * @library bh1750 + * @brief C API for the BH1750 Light Sensor * - * This driver was developed with the DFRobot Light Sensor based on - * the BH1750. It has a sensitivity of .5 10 65535 Lux. It supports - * voltages from 3-5vdc and is connected via I2C. - * - * @snippet bh1750.c Interesting + * @include bh1750.c */ #define BH1750_DEFAULT_I2C_BUS 0 diff --git a/src/biss0001/biss0001.h b/src/biss0001/biss0001.h index a08cbae8..dd152ffd 100644 --- a/src/biss0001/biss0001.h +++ b/src/biss0001/biss0001.h @@ -34,11 +34,11 @@ extern "C" { #endif /** - * @brief BISS0001 PIR Motion Sensor + * @file biss0001.h + * @library biss0001 + * @brief C API for the BISS0001 Motion Sensor * - * This module tests for movement in it's detecting range. - * - * @snippet biss0001.c Interesting + * @include biss0001.c */ /** diff --git a/src/collision/collision.h b/src/collision/collision.h index 3fefe2a8..b635c93e 100644 --- a/src/collision/collision.h +++ b/src/collision/collision.h @@ -33,26 +33,11 @@ #include "mraa/gpio.h" /** - * @brief MVS0608 - GPIO Collision Sensor library - * @ingroup gpio accelerometer - */ - -/** + * @file collision.h * @library collision - * @sensor Collision - * @comname Collision Sensor - * @altname Grove Collision Sensor - * @type accelerometer - * @con gpio + * @brief C API for the MVS0608 - Digital Collision Sensor * - * @brief API for the Collision Sensor - * - * MVS0608 can detect whether any - * collision movement or vibration happens. - * It outputs a low pulse signal when vibration is detected. - * - * @image html grovecollision.jpg - * @snippet collision.c Interesting + * @include collision.c */ /** diff --git a/src/dfrec/dfrec.h b/src/dfrec/dfrec.h index b2dbeca9..25dc57e3 100644 --- a/src/dfrec/dfrec.h +++ b/src/dfrec/dfrec.h @@ -35,21 +35,11 @@ extern "C" { #endif /** - * @brief DFRobot EC Meter + * @file dfrec.h + * @library dfrec + * @brief C API for the DFRobot EC Meter * - * The driver was tested with the DFRobot EC Analog Sensor. - * - * This device measure the electrical conductivity of an aqueous - * solution. The included probe is a K=1 model. - * - * Calibration is somewhat complicated - see the DFRobot wiki for - * instructions on calibration. Functions are provided to supply - * the appropriate values. By default, the values used in the - * DFRobot arduino example are used. - * - * wiki: https://www.dfrobot.com/wiki/index.php/Analog_EC_Meter_SKU:DFR0300 - * - * @snippet dfrec.c Interesting + * @include dfrec.c */ /** diff --git a/src/dfrorp/dfrorp.h b/src/dfrorp/dfrorp.h index da15252f..b98f589b 100644 --- a/src/dfrorp/dfrorp.h +++ b/src/dfrorp/dfrorp.h @@ -34,26 +34,11 @@ extern "C" { #endif /** - * @brief UPM C API for the DFRobot ORP (Oxidation/Reduction - * Potential) Sensor + * @file dfrorp.h + * @library dfrorp + * @brief C API for the DFRobot ORP (Oxidation/Reduction Potential) Sensor * - * The driver was tested with the DFRobot ORP Analog Sensor. - * - * To calibrate: - * - * Disconnect the sensor probe (but leave the sensor interface board - * connected). Then run one of the examples while holding down the - * 'calibrate' button on the device. Read the ORP value reported - * (it should be fairly small). - * - * This value is what you should supply to - * dfrorp_set_orp_cal_offset(). Then reconnect the probe to the - * interface board and you should be ready to go. - * - * DO NOT press the calibrate button on the interface board while - * the probe is attached or you can permanently damage the probe. - * - * @snippet dfrorp.c Interesting + * @include dfrorp.c */ /** diff --git a/src/dfrph/dfrph.h b/src/dfrph/dfrph.h index 5f4b59b9..5829a8d8 100644 --- a/src/dfrph/dfrph.h +++ b/src/dfrph/dfrph.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file dfrph.h + * @library dfrph + * @brief C API for the DFRobot pH Sensors + * + * @include dfrph.c + */ + /** * device context */ diff --git a/src/ds18b20/ds18b20.h b/src/ds18b20/ds18b20.h index 2908412d..87c01a0f 100644 --- a/src/ds18b20/ds18b20.h +++ b/src/ds18b20/ds18b20.h @@ -40,69 +40,11 @@ extern "C" { #define DS18B20_FAMILY_CODE 0x28 /** + * @file ds18b20.h * @library ds18b20 - * @sensor ds18b20 - * @comname DS18B20 1-Wire Temperature Sensor - * @type uart - * @man maxim - * @con uart - * @web https://www.sparkfun.com/products/11050 + * @brief C API for the DS18B20 1-Wire Temperature Sensor * - * @brief DS18B20 1-Wire Temperature Sensor - * - * This driver supports, and was tested with, a DS18B20 with - * external power. - * - * Multiple DS18B20 devices can be connected to this bus. This - * module will identify all such devices connected, and allow you - * to access them using an index starting at 0. - * - * Parasitic power is not currently supported due - * to the very tight 10us limit on switching a GPIO properly to - * supply power during certain operations. For this reason, you - * should use external power for your sensors. - * - * Setting the alarm values (Tl, Th) is also not supported, since - * this is only useful when doing a 1-wire device search looking - * for devices in an alarm state, a capability not yet supported - * in MRAA. In reality, this is trivial to handle yourself in - * your application. - * - * This device requires the use of a TTL level UART (specifically - * through the uart_ow MRAA context) to provide access to a Dallas - * 1-wire bus. It is important to realize that the UART is only - * being used to provide an interface to devices on a Dallas 1-wire - * compliant bus. - * - * A circuit like the following should be used for the UART - * interface (ASCII schematic - best viewed in a fixed monospace - * font): - * - * -| - * U| (D1) - * A| TX---|<--+ - * R| | - * T| RX-------o--------o >to 1-wire data bus - * -| - * - * - * Vcc - * | - * o------------+ - * | | - * R1 | - * | o(+) - * >1-wire------o--------o[DS18B20] - * o(-) - * | - * GND - * - * D1 = 1N4148 - * R1 = 4.7K - * - * The cathode of D1 is connected to the UART TX. - * - * @snippet ds18b20.c Interesting + * @include ds18b20.c */ // forward declaration diff --git a/src/emg/emg.h b/src/emg/emg.h index e28678bf..36a51d20 100644 --- a/src/emg/emg.h +++ b/src/emg/emg.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file emg.h + * @library emg + * @brief C API for the EMG Sensor + * + * @include emg.c + */ + /** * driver context */ diff --git a/src/flex/flex.h b/src/flex/flex.h index de18829e..3c751ded 100644 --- a/src/flex/flex.h +++ b/src/flex/flex.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file flex.h + * @library flex + * @brief C API for the Spectra Symbol Flex Sensor + * + * @include flex.c + */ + /** * driver context */ diff --git a/src/gas/mqx.h b/src/gas/mqx.h index 49c1ceff..69462a7c 100644 --- a/src/gas/mqx.h +++ b/src/gas/mqx.h @@ -31,7 +31,11 @@ extern "C" { #endif -/* +/** + * @file mqx.h + * @library mqx + * @brief C API for the MQ Gas Sensors + * * The mqx gas sensor driver can be used to read a wide range of sensors. The * list below shows the currently supported sensors: * @@ -49,6 +53,7 @@ extern "C" { * mq8: H 100-10000 ppm * mq9: CO/CH4/LPG 200-1000/10000/10000 ppm * + * @include mqx.c */ /** diff --git a/src/gp2y0a/gp2y0a.h b/src/gp2y0a/gp2y0a.h index 8e3292fc..31167333 100644 --- a/src/gp2y0a/gp2y0a.h +++ b/src/gp2y0a/gp2y0a.h @@ -34,6 +34,14 @@ #include "upm.h" #include "mraa/aio.h" +/** + * @file gp2y0a.h + * @library gp2y0a + * @brief C API for GP2Y0A IR Proximity Sensors + * + * @include gp2y0a.c + */ + /** * device context */ @@ -43,32 +51,6 @@ typedef struct _gp2y0a_context { int a_res; } *gp2y0a_context; -/** - * @brief GP2Y0A-based IR Proximity Sensor library - * @defgroup gp2y0a libupm-gp2y0a - * @ingroup seeed analog light - */ - -/** - * @library gp2y0a - * @sensor gp2y0a - * @comname GP2Y0A IR Proximity Sensor - * @altname Grove 80cm IR Proximity Sensor - * @type light - * @man seeed - * @con analog - * - * @brief API for the GP2Y0A family of IR Proximity Sensors - * - * 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. - * - * @image html gp2y0a.jpg - * @snippet gp2y0a.cxx Interesting - */ - /** * GP2Y0A sensor init function * diff --git a/src/gsr/gsr.h b/src/gsr/gsr.h index 6fa6a687..46be113b 100644 --- a/src/gsr/gsr.h +++ b/src/gsr/gsr.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file gsr.h + * @library gsr + * @brief C API for the GSR Sensor + * + * @include gsr.c + */ + /** * driver context */ diff --git a/src/hka5/hka5.h b/src/hka5/hka5.h index 77fb56db..0c160670 100644 --- a/src/hka5/hka5.h +++ b/src/hka5/hka5.h @@ -34,14 +34,11 @@ extern "C" { #endif /** - * @brief UPM C API for the DFRobot Laser PM2.5 Sensor + * @file hka5.h + * @library hka5 + * @brief C API for the Laser PM2.5 Sensor * - * This driver was tested with a DFRobot Laser PM2.5 Sensor. It - * connects to a UART at 9600 baud. This is the only baud rate - * supported. It optionally supports Reset and Set/Sleep gpios as - * well. - * - * @snippet hka5.c Interesting + * @include hka5.c */ /** diff --git a/src/joystick12/joystick12.h b/src/joystick12/joystick12.h index 5b6706a2..4fae2b98 100644 --- a/src/joystick12/joystick12.h +++ b/src/joystick12/joystick12.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file joystick12.h + * @library joystick12 + * @brief C API for Analog 2-Axis Joysticks + * + * @include joystick12.c + */ + /** * device context */ diff --git a/src/ldt0028/ldt0028.h b/src/ldt0028/ldt0028.h index 23f21e5c..10fd0573 100644 --- a/src/ldt0028/ldt0028.h +++ b/src/ldt0028/ldt0028.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file ldt0028.h + * @library ldt0028 + * @brief C API for the LDT0-028 Piezo Vibration Sensor + * + * @include ldt0028.c + */ + /** * driver context */ diff --git a/src/led/led.h b/src/led/led.h index 17ddb407..ddd6822e 100644 --- a/src/led/led.h +++ b/src/led/led.h @@ -1,7 +1,7 @@ /* * Author: Brendan Le Foll * Contributions: Mihai Tudor Panu - * Contributions: Sarah Knepper + * Sarah Knepper * Abhishek Malik * Copyright (c) 2016 Intel Corporation. * @@ -35,20 +35,11 @@ #include "mraa/gpio.h" /** - * @type led - * @con gpio - * @kit gsk + * @file led.h + * @library led + * @brief C API for LEDs * - * @brief API for the Grove LED - * - * 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. - * - * @image html led.jpg + * @include led.c */ /** diff --git a/src/light/light.h b/src/light/light.h index adce2162..eb516842 100644 --- a/src/light/light.h +++ b/src/light/light.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file light.h + * @library light + * @brief C API for Analog Light (Photocell) Sensors + * + * @include light.c + */ + /** * driver context */ diff --git a/src/loudness/loudness.h b/src/loudness/loudness.h index 2dbc1c72..bc294ad0 100644 --- a/src/loudness/loudness.h +++ b/src/loudness/loudness.h @@ -33,6 +33,14 @@ #include "upm.h" #include "mraa/aio.h" +/** + * @file loudness.h + * @library loudness + * @brief C API for the Analog Loudness Sensor + * + * @include loudness.c + */ + /** * device context */ diff --git a/src/m24lr64e/m24lr64e.h b/src/m24lr64e/m24lr64e.h index f28bad41..3febd0fb 100644 --- a/src/m24lr64e/m24lr64e.h +++ b/src/m24lr64e/m24lr64e.h @@ -53,39 +53,11 @@ #define M24LR64E_I2C_WRITE_TIME 5 /** - * @brief Grove NFC Tag - * @defgroup m24lr64e libupm-m24lr64e - * @ingroup seeed i2c other - */ - -/** + * @file m24lr64e.h * @library m24lr64e - * @sensor m24lr64e - * @comname Grove NFC Tag - * @type other - * @man seeed - * @web http://www.seeedstudio.com/wiki/Grove_-_NFC_Tag - * @con i2c + * @brief C API for M24LR64E-based NFC Tags * - * @brief C++ API for the M24LR64E-based Grove NFC Tag - * - * Grove NFC tag is an 8KB electrically erasable programmable read-only memory (EEPROM) - * that can be written to or read from using I2C and NFC-equipped devices. - * - * The user mode (default) allows read and write access to all 8KB - * of space, provided the sector security status (SSS) allows it. - * The root mode allows modification of the SSS data and other - * information, provided the proper password is submitted. The - * default password for a new tag is 0x00000000. See the datasheet - * for more details. - * - * The Seeed Studio* wiki page for this device includes a link to an - * Android* application that can be used to also read and write the - * device via NFC, as well as set NFC passwords, which cannot be - * done via I2C. - * - * @image html m24lr64e.jpg - * @snippet m24lr64e.cxx Interesting + * @include m24lr64e.c */ #include diff --git a/src/mic/mic.h b/src/mic/mic.h index 22fd5ddc..f3a2b9cd 100644 --- a/src/mic/mic.h +++ b/src/mic/mic.h @@ -34,6 +34,14 @@ #include "upm.h" #include "mraa/aio.h" +/** + * @file mic.h + * @library mic + * @brief C API for the Analog Microphone + * + * @include mic.c + */ + /** * device context */ diff --git a/src/mma7361/mma7361.h b/src/mma7361/mma7361.h index 70d13d27..49f0263e 100644 --- a/src/mma7361/mma7361.h +++ b/src/mma7361/mma7361.h @@ -34,13 +34,11 @@ extern "C" { #endif /** - * @brief UPM C API for the DFRobot MMA7361 Analog Accelerometer + * @file mma7361.h + * @library mma7361 + * @brief C API for the MMA7361 Analog Accelerometer * - * The driver was tested with the DFRobot MMA7361 Analog - * Accelerometer. It supports 3 Axes with a selectable 1.5G and 6G - * sensitivity. - * - * @snippet mma7361.c Interesting + * @include mma7361.c */ /** diff --git a/src/moisture/moisture.h b/src/moisture/moisture.h index ab8869e0..6b86095c 100644 --- a/src/moisture/moisture.h +++ b/src/moisture/moisture.h @@ -36,6 +36,14 @@ extern "C" { #endif +/** + * @file moisture.h + * @library moisture + * @brief C API for the Analog Moisture Sensor + * + * @include moisture.c + */ + /** * device context */ diff --git a/src/mpr121/mpr121.h b/src/mpr121/mpr121.h index 69b815ab..64f6f6a9 100644 --- a/src/mpr121/mpr121.h +++ b/src/mpr121/mpr121.h @@ -33,6 +33,14 @@ #define MPR121_I2C_BUS 0 #define MPR121_DEFAULT_I2C_ADDR 0x5a +/** + * @file mpr121.h + * @library mpr121 + * @brief C API for the MPR121 Touch Sensor + * + * @include mpr121.c + */ + /** * device context */ diff --git a/src/mq303a/mq303a.h b/src/mq303a/mq303a.h index 976fcbaa..3054ad28 100644 --- a/src/mq303a/mq303a.h +++ b/src/mq303a/mq303a.h @@ -30,29 +30,11 @@ #include "mraa/gpio.h" /** - * @brief MQ303A Alcohol Sensor library - * @defgroup mq303a libupm-mq303a - * @ingroup analog gpio gaseous tsk - */ -/** - * @library mq303a - * @sensor mq303a - * @comname MQ303A Alcohol Sensor - * @type gaseous - * @man seeed - * @web http://www.seeedstudio.com/document/pdf/MQ303A.pdf - * @con analog gpio - * @kit tsk + * @file mq303a.h + * @library mq303 + * @brief C API for the MQ303A Alcohol Sensor * - * @brief API for the MQ303A Alcohol Sensor - * - * UPM module for the MQ303A alcohol sensor. - * This sensor needs to be warmed up before stable results are - * obtained. The higher the value returned from value(), - * the higher the amount of alcohol detected. - * - * @image html mq303a.jpg - * @snippet mq303a.cxx Interesting + * @include mq303.c */ /** diff --git a/src/nmea_gps/nmea_gps.h b/src/nmea_gps/nmea_gps.h index e8e72b69..392cf499 100644 --- a/src/nmea_gps/nmea_gps.h +++ b/src/nmea_gps/nmea_gps.h @@ -35,21 +35,14 @@ extern "C" { #endif /** - * @brief UPM C API for a generic GPS serial device reporting NMEA data - * - * This driver was tested with a number of GPS devices that emit - * NMEA data via a serial interface of some sort (typically a UART). - * - * The I2C capablity was tested with a UBLOX LEA-6H based GPS shield - * from DFRobot. Currently, the I2C capability is only supported - * for UBLOX devices (or compatibles) that conform to the - * specifications outlined in the u-blox6 Receiver Description - * Protocol Specification, Chapter 4, DDC Port. + * @file nmea-gps.h + * @library nmea-gps + * @brief C API for NMEA GPS Sensors * * An example using the UART. - * @snippet nmea_gps.c Interesting + * @include nmea_gps.c * An example using I2C. - * @snippet nmea_gps_i2c.c Interesting + * @include nmea_gps_i2c.c */ /** diff --git a/src/o2/o2.h b/src/o2/o2.h index f26747ff..3202f33a 100644 --- a/src/o2/o2.h +++ b/src/o2/o2.h @@ -32,6 +32,14 @@ extern "C" { #endif +/** + * @file o2.h + * @library o2 + * @brief C API for the O2 Oxygen Gas Sensor + * + * @include o2.c + */ + /** * device context */ diff --git a/src/relay/relay.h b/src/relay/relay.h index 58a3cf09..50464024 100644 --- a/src/relay/relay.h +++ b/src/relay/relay.h @@ -33,6 +33,14 @@ #include "upm.h" #include +/** + * @file relay.h + * @library relay + * @brief C API for Relays + * + * @include relay.c + */ + /** * device context */ diff --git a/src/rotary/rotary.h b/src/rotary/rotary.h index 653d2fe7..d174d092 100644 --- a/src/rotary/rotary.h +++ b/src/rotary/rotary.h @@ -32,6 +32,14 @@ #include "upm.h" #include +/** + * @file rotary.h + * @library rotary + * @brief C API for the Rotary Angle Sensor + * + * @include rotary.c + */ + /** * driver context */ diff --git a/src/servo/es08a.h b/src/servo/es08a.h index e3d772b4..8ec709aa 100644 --- a/src/servo/es08a.h +++ b/src/servo/es08a.h @@ -33,34 +33,19 @@ #include "upm.h" #include "mraa/pwm.h" -/** - * @library servo - * @sensor es08a - * @comname ES08A Servo - * @altname Grove Servo - * @type servos - * @man emax - * @web http://www.seeedstudio.com/wiki/Grove_-_Servo - * @con pwm - * @kit gsk - * - * @brief API for the ES08A Servo - * - * This module defines the ES08A interface for ES08A servos. - * Like other servos, the ES08A servo has a shaft that can be controlled - * by setting the desired angle. There are also routines for setting - * and getting the minimum and maximum pulse width as well as the - * maximum period. - * - * @image html es08a.jpg - * @snippet es08a.c Interesting - */ - #define ES08A_MIN_PULSE_WIDTH 600 #define ES08A_MAX_PULSE_WIDTH 2200 #define ES08A_PERIOD 20000 #define ES08A_MAX_ANGLE 180.0 +/** + * @file es08a.h + * @library servo + * @brief C API for the ES08A Servo + * + * @include es08a.c + */ + /** * device context */ diff --git a/src/servo/es9257.h b/src/servo/es9257.h index c8722974..57e5e078 100644 --- a/src/servo/es9257.h +++ b/src/servo/es9257.h @@ -33,34 +33,19 @@ #include "upm.h" #include "mraa/pwm.h" -/** - * @library servo - * @sensor es9257 - * @comname ES9257 Servo - * @altname Grove Servo - * @type servos - * @man emax - * @web http://www.seeedstudio.com/wiki/Grove_-_Servo - * @con pwm - * @kit gsk - * - * @brief API for the ES9257 Servo - * - * This module defines the ES9257 interface for ES9257 servos. - * Like other servos, the ES9257 servo has a shaft that can be controlled - * by setting the desired angle. There are also routines for setting - * and getting the minimum and maximum pulse width as well as the - * maximum period. - * - * @image html es9257.jpg - * @snippet es9257.c Interesting - */ - #define ES9257_MIN_PULSE_WIDTH 600 #define ES9257_MAX_PULSE_WIDTH 2200 #define ES9257_PERIOD 20000 #define ES9257_MAX_ANGLE 180.0 +/** + * @file es9257.h + * @library servo + * @brief C API for the ES9257 Servo + * + * @include es9257.c + */ + /* * device context */ diff --git a/src/sht1x/sht1x.h b/src/sht1x/sht1x.h index 5363a009..781d92df 100644 --- a/src/sht1x/sht1x.h +++ b/src/sht1x/sht1x.h @@ -33,15 +33,11 @@ extern "C" { #endif /** - * @brief SHT1X Temperature and Humidity Sensor + * @file sht1x.h + * @library sht1x + * @brief C API for SHT1X Temperature and Humidity Sensors * - * This driver was tested with a DFRobot SHT10 Temperature and - * Humidity sensor. This driver should work on all SHT1X devices. - * - * It requires a 10K pull-up resistor connected to the data pin. - * The sensor can be run at differing voltages from 2.5v to 5v. - * - * @snippet sht1x.c Interesting + * @include sht1x.c */ /** diff --git a/src/slide/slide.h b/src/slide/slide.h index 65cac53c..63fb0fdb 100644 --- a/src/slide/slide.h +++ b/src/slide/slide.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file slide.h + * @library slide + * @brief C API for the Slide Potentiometer + * + * @include slide.c + */ + /** * driver context */ diff --git a/src/temperature/temperature.h b/src/temperature/temperature.h index 2eaaa556..56651131 100644 --- a/src/temperature/temperature.h +++ b/src/temperature/temperature.h @@ -32,6 +32,14 @@ #include "upm.h" #include "mraa/aio.h" +/** + * @file temperature.h + * @library temperature + * @brief C API for Analog Temperature (NTC) Sensors + * + * @include temperature.c + */ + /** * driver context */ diff --git a/src/tsl2561/tsl2561.h b/src/tsl2561/tsl2561.h index 7b9f34d1..bba36a8e 100644 --- a/src/tsl2561/tsl2561.h +++ b/src/tsl2561/tsl2561.h @@ -91,6 +91,14 @@ #define LUX_B8C (0x0000) // 0.000 * 2^LUX_SCALE #define LUX_M8C (0x0000) // 0.000 * 2^LUX_SCALE +/** + * @file tsl2561.h + * @library tsl2561 + * @brief C API for the TSL2561 Digital Light Sensor + * + * @include tsl2561.c + */ + /** * device context */ diff --git a/src/ttp223/ttp223.h b/src/ttp223/ttp223.h index 9220bd2f..9cf9af3b 100644 --- a/src/ttp223/ttp223.h +++ b/src/ttp223/ttp223.h @@ -33,6 +33,14 @@ #include "upm.h" #include "mraa/gpio.h" +/** + * @file ttp223.h + * @library ttp223 + * @brief C API for the TTP223 Touch Detector Sensor + * + * @include ttp223.c + */ + /** * device context */ diff --git a/src/urm37/urm37.h b/src/urm37/urm37.h index 7305a901..ea2aa080 100644 --- a/src/urm37/urm37.h +++ b/src/urm37/urm37.h @@ -40,28 +40,14 @@ extern "C" { #endif /** - * @brief UPM C API for the DFRobot URM37 Ultrasonic Ranger - * - * The driver was tested with the DFRobot URM37 Ultrasonic Ranger, - * V4. It has a range of between 5 and 500 centimeters (cm). It - * supports both analog distance measurement, and UART based - * temperature and distance measurements. This driver does not - * support PWM measurement mode. - * - * For UART operation, the only supported baud rate is 9600. In - * addition, you must ensure that the UART TX/RX pins are - * configured for TTL operation (the factory default) rather than - * RS232 operation, or permanent damage to your URM37 and/or MCU - * will result. On power up, the LED indicator will blink one - * long pulse, followed by one short pulse to indicate TTL - * operation. See the DFRobot wiki for more information: - * - * (https://www.dfrobot.com/wiki/index.php?title=URM37_V4.0_Ultrasonic_Sensor_%28SKU:SEN0001%29) + * @file urm37.h + * @library urm37 + * @brief C API for the DFRobot URM37 Ultrasonic Ranger * * An example using analog mode - * @snippet urm37.c Interesting + * @include urm37.c Interesting * An example using UART mode - * @snippet urm37-uart.c Interesting + * @include urm37-uart.c Interesting */ /** diff --git a/src/vdiv/vdiv.h b/src/vdiv/vdiv.h index 4b41baf0..2607884a 100644 --- a/src/vdiv/vdiv.h +++ b/src/vdiv/vdiv.h @@ -31,6 +31,14 @@ extern "C" { #endif +/** + * @file vdiv.h + * @library vdiv + * @brief C API for Voltage Dividers + * + * @include vdiv.c + */ + /** * device context */ diff --git a/src/water/water.h b/src/water/water.h index 2c546343..7f9a40a2 100644 --- a/src/water/water.h +++ b/src/water/water.h @@ -31,11 +31,11 @@ extern "C" { #endif /** - * @brief Water Sensor + * @file water.h + * @library water + * @brief C API for the Water Sensor * - * This module simply tests for the presence of water. - * - * @snippet water.c Interesting + * @include water.c */ /** diff --git a/src/yg1006/yg1006.h b/src/yg1006/yg1006.h index e876f60c..fe73fc0b 100644 --- a/src/yg1006/yg1006.h +++ b/src/yg1006/yg1006.h @@ -33,12 +33,11 @@ extern "C" { #endif /** - * @brief YG1006 Flame Sensor + * @file yg1006.h + * @library yg1006 + * @brief C API for the YG1006 Flame Sensor * - * UPM module for the YG1006 flame sensor. It detects a flame or any - * other light source in the 760-1,100 nm wavelength range. - * - * @snippet yg1006.cxx Interesting + * @include yg1006.c */ /**