upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
grovecircularled.hpp
1 /*
2  * Author: Jon Trulson <jtrulson@ics.com>
3  * Copyright (c) 2016 Intel Corporation.
4  *
5  * These modules were rewritten, based on original work by:
6  *
7  * (original my9221/groveledbar)
8  * Author: Yevgeniy Kiveisha <yevgeniy.kiveisha@intel.com>
9  * Copyright (c) 2014 Intel Corporation.
10  *
11  * (grovecircularled)
12  * Author: Jun Kato and Yevgeniy Kiveisha <yevgeniy.kiveisha@intel.com>
13  * Contributions: Jon Trulson <jtrulson@ics.com>
14  * Copyright (c) 2014 Intel Corporation.
15  *
16  * Permission is hereby granted, free of charge, to any person obtaining
17  * a copy of this software and associated documentation files (the
18  * "Software"), to deal in the Software without restriction, including
19  * without limitation the rights to use, copy, modify, merge, publish,
20  * distribute, sublicense, and/or sell copies of the Software, and to
21  * permit persons to whom the Software is furnished to do so, subject to
22  * the following conditions:
23  *
24  * The above copyright notice and this permission notice shall be
25  * included in all copies or substantial portions of the Software.
26  *
27  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
28  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
29  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
30  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
31  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
32  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
33  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34  */
35 #pragma once
36 
37 #include <string>
38 #include <mraa/common.hpp>
39 #include <mraa/gpio.hpp>
40 #include "my9221.hpp"
41 
42 namespace upm {
43 
62  class GroveCircularLED : public MY9221 {
63  public:
70  GroveCircularLED(int dataPin, int clockPin);
71 
75  virtual ~GroveCircularLED();
76 
82  void setSpinner(uint8_t position);
83 
90  void setLevel(uint8_t level, bool direction=true);
91 
92  protected:
93  private:
94  };
95 
96 }
Definition: my9221.hpp:47
GroveCircularLED(int dataPin, int clockPin)
Definition: grovecircularled.cxx:47
API for the Grove Circular LED module.
Definition: grovecircularled.hpp:62
C++ API wrapper for the bh1749 driver.
Definition: a110x.hpp:29
void setSpinner(uint8_t position)
Definition: grovecircularled.cxx:59
virtual ~GroveCircularLED()
Definition: grovecircularled.cxx:55
void setLevel(uint8_t level, bool direction=true)
Definition: grovecircularled.cxx:76