From a5048d20fde8de2317c1a1f08dc0a7f1e562feab Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Mon, 13 Apr 2015 16:56:21 -0700 Subject: [PATCH] grove: updated and added headers with tags Signed-off-by: Mihai Tudor Panu --- src/grove/grove.h | 3 ++- src/grove/grovebutton.h | 41 +++++++++++++++++++++++++++++++++++ src/grove/groveled.h | 47 +++++++++++++++++++++++++++++++++++++++++ src/grove/grovelight.h | 45 +++++++++++++++++++++++++++++++++++++++ src/grove/groverelay.h | 44 ++++++++++++++++++++++++++++++++++++++ src/grove/groverotary.h | 43 +++++++++++++++++++++++++++++++++++++ src/grove/groveslide.h | 42 ++++++++++++++++++++++++++++++++++++ src/grove/grovetemp.h | 41 +++++++++++++++++++++++++++++++++++ 8 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 src/grove/grovebutton.h create mode 100644 src/grove/groveled.h create mode 100644 src/grove/grovelight.h create mode 100644 src/grove/groverelay.h create mode 100644 src/grove/groverotary.h create mode 100644 src/grove/groveslide.h create mode 100644 src/grove/grovetemp.h diff --git a/src/grove/grove.h b/src/grove/grove.h index 017dbcd3..dc181ee3 100644 --- a/src/grove/grove.h +++ b/src/grove/grove.h @@ -32,8 +32,9 @@ namespace upm { /** - * @brief library for basic grove sensors + * @brief generic library for basic grove sensors * @defgroup grove libupm-grove + * @ingroup seeed gpio pwm ainput button led light relay temp touch gsk */ class Grove { public: diff --git a/src/grove/grovebutton.h b/src/grove/grovebutton.h new file mode 100644 index 00000000..07425373 --- /dev/null +++ b/src/grove/grovebutton.h @@ -0,0 +1,41 @@ +/* + * Place-holder Header for Documentation and future API change + * + * 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. + */ + +/** + * @library grove + * @sensor grovebutton + * @comname Grove Button + * @altname Grove Touch Sensor + * @type button touch + * @man seeed + * @con gpio + * @kit gsk + * + * @brief C++ API for Grove button + * + * Very basic UPM module for Grove button + * + * @snippet grovebutton.cxx Interesting + */ \ No newline at end of file diff --git a/src/grove/groveled.h b/src/grove/groveled.h new file mode 100644 index 00000000..30e90361 --- /dev/null +++ b/src/grove/groveled.h @@ -0,0 +1,47 @@ +/* + * Place-holder Header for Documentation and future API change + * + * 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. + */ + +/** + * @library grove + * @sensor groveled + * @comname Grove LED + * @type led + * @man seeed + * @con gpio + * @kit gsk + * + * @brief C++ API for Grove LED + * + * UPM module for Grove LED (or other similar light-emitting diode). + * An LED is a small lightbulb that will emit light (turn on) in + * response to a small curent. The longer wire of an LED connects + * 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. + * + * @snippet groveled.cxx Interesting + * @snippet groveled-multi.cxx Interesting + */ + \ No newline at end of file diff --git a/src/grove/grovelight.h b/src/grove/grovelight.h new file mode 100644 index 00000000..78eb3757 --- /dev/null +++ b/src/grove/grovelight.h @@ -0,0 +1,45 @@ +/* + * Place-holder Header for Documentation and future API change + * + * 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. + */ + +/** + * @library grove + * @sensor grovelight + * @comname Grove Light Sensor + * @type light + * @man seeed + * @con analog + * @kit gsk + * + * @brief C++ API for Grove light sensor + * + * The Grove light sensor detects the intensity of the ambient light. + * As the light intensity of the environment increases, the resistance + * of the sensor decreases. This means that the raw value from the + * analog pin will be larger in bright light and smaller in the dark. + * An approximate lux value can also be returned. + * + * @snippet grovelight.cxx Interesting + */ + \ No newline at end of file diff --git a/src/grove/groverelay.h b/src/grove/groverelay.h new file mode 100644 index 00000000..b21adf8f --- /dev/null +++ b/src/grove/groverelay.h @@ -0,0 +1,44 @@ +/* + * Place-holder Header for Documentation and future API change + * + * 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. + */ + +/** + * @library grove + * @sensor groverelay + * @comname Grove Relay + * @type relay + * @man seeed + * @con gpio + * @kit gsk + * + * @brief C++ API for Grove Relay + * + * UPM module for Grove relay switch. The Grove relay is a + * digital normally-open switch that uses low voltage or current to + * control a higher voltage and/or higher current. When closed, + * the indicator LED will light up and current is allowed to flow. + * + * @snippet groverelay.cxx Interesting + */ + \ No newline at end of file diff --git a/src/grove/groverotary.h b/src/grove/groverotary.h new file mode 100644 index 00000000..9eb211e7 --- /dev/null +++ b/src/grove/groverotary.h @@ -0,0 +1,43 @@ +/* + * Place-holder Header for Documentation and future API change + * + * 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. + */ + +/** + * @library grove + * @sensor groverotary + * @comname Grove Rotary Angle Sensor + * @type ainput + * @man seeed + * @con analog + * + * @brief C++ API for Grove Rotary Angle Sensor (Knob) + * + * Very basic UPM module for Grove rotary angle sensor (knob) on analog. Provides + * a set of functions to read the absolute pin value, degrees or radians and another + * to do the same relative to the center of the knob's range. + * + * @image html groverotary.jpeg + * @snippet groverotary.cxx Interesting + */ + \ No newline at end of file diff --git a/src/grove/groveslide.h b/src/grove/groveslide.h new file mode 100644 index 00000000..6bc8e30f --- /dev/null +++ b/src/grove/groveslide.h @@ -0,0 +1,42 @@ +/* + * Place-holder Header for Documentation and future API change + * + * 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. + */ + +/** + * @library grove + * @sensor groveslide + * @comname Grove Slide Potentiometer + * @type ainput + * @man seeed + * @con analog + * + * @brief C++ API for Grove Slide Potentiometer + * + * Very basic UPM module for Grove slide potentiometer on analog, + * returns either raw value or scaled voltage value. + * + * @image html groveslide.jpeg + * @snippet groveslide.cxx Interesting + */ + \ No newline at end of file diff --git a/src/grove/grovetemp.h b/src/grove/grovetemp.h new file mode 100644 index 00000000..5c169379 --- /dev/null +++ b/src/grove/grovetemp.h @@ -0,0 +1,41 @@ +/* + * Place-holder Header for Documentation and future API change + * + * 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. + */ + +/** + * @library grove + * @sensor grovetemp + * @comname Grove Temperature Sensor + * @type temp + * @man seeed + * @con analog + * @kit gsk + * + * @brief C++ API for Grove temperature sensor + * + * Very basic UPM module for Grove temperature sensor on analog + * + * @snippet grovetemp.cxx Interesting + */ + \ No newline at end of file