LED_Display.hpp
Go to the documentation of this file.
1 /*
2  * SocialLedge.com - Copyright (C) 2013
3  *
4  * This file is part of free software framework for embedded processors.
5  * You can use it and/or distribute it as long as this copyright header
6  * remains unmodified. The code is free for personal use and requires
7  * permission to use in a commercial product.
8  *
9  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
10  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
12  * I SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
13  * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
14  *
15  * You can reach the author of this software at :
16  * p r e e t . w i k i @ g m a i l . c o m
17  */
18 
24 #ifndef LED_DISPLAY_HPP__
25 #define LED_DISPLAY_HPP__
26 #include "i2c2_device.hpp" // I2C Device Base class
27 
28 
34 class LED_Display : public i2c2_device, public SingletonTemplate<LED_Display>
35 {
36  public:
37  bool init();
38 
42  void clear();
43 
48  void setNumber(char num);
49 
56  void setLeftDigit(char alpha);
57  void setRightDigit(char alpha);
60  private:
61  char mNumAtDisplay[2];
62 
65  {
66  }
68 
70  typedef enum {
71  inputPort0, inputPort1,
72  outputPort0, outputPort1,
73  polarityPort0, polarityPort1,
74  cfgPort0, cfgPort1
75  } __attribute__ ((packed)) RegisterMap;
76 };
77 
78 
79 
80 
81 #endif /* LED_DISPLAY_HPP__ */
Definition: i2c2_device.hpp:39
void setLeftDigit(char alpha)
Definition: io_source.cpp:256
__attribute__
Definition: rtc.h:56
bool init()
Initializes this device,.
Definition: io_source.cpp:226
Definition: i2c2.hpp:58
void setNumber(char num)
Definition: io_source.cpp:246
Definition: LED_Display.hpp:34
void clear()
Definition: io_source.cpp:241
Definition: singleton_template.hpp:55
void setRightDigit(char alpha)
Definition: io_source.cpp:261