mirror of
				https://github.com/eclipse/upm.git
				synced 2025-11-04 00:54:21 +03:00 
			
		
		
		
	grove: updated and added headers with tags
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
		@@ -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:
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										41
									
								
								src/grove/grovebutton.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/grove/grovebutton.h
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 */
 | 
			
		||||
							
								
								
									
										47
									
								
								src/grove/groveled.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								src/grove/groveled.h
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										45
									
								
								src/grove/grovelight.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								src/grove/grovelight.h
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										44
									
								
								src/grove/groverelay.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								src/grove/groverelay.h
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										43
									
								
								src/grove/groverotary.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								src/grove/groverotary.h
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										42
									
								
								src/grove/groveslide.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								src/grove/groveslide.h
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										41
									
								
								src/grove/grovetemp.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/grove/grovetemp.h
									
									
									
									
									
										Normal file
									
								
							@@ -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
 | 
			
		||||
 */
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user