Browse Source

i2clcd: add ssd1308 to swig and move common files to ssd.h

Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
Brendan Le Foll 10 years ago
parent
commit
a07663045b
5 changed files with 155 additions and 232 deletions
  1. 6
    0
      src/lcd/pyupm_i2clcd.i
  2. 143
    0
      src/lcd/ssd.h
  3. 1
    1
      src/lcd/ssd1308.cxx
  4. 3
    116
      src/lcd/ssd1308.h
  5. 2
    115
      src/lcd/ssd1327.h

+ 6
- 0
src/lcd/pyupm_i2clcd.i View File

@@ -3,6 +3,7 @@
3 3
 
4 4
 %feature("autodoc", "3");
5 5
 
6
+%include "ssd.h"
6 7
 %include "i2clcd.h"
7 8
 %{
8 9
     #include "i2clcd.h"
@@ -22,3 +23,8 @@
22 23
 %{
23 24
     #include "ssd1327.h"
24 25
 %}
26
+
27
+%include "ssd1308.h"
28
+%{
29
+    #include "ssd1308.h"
30
+%}

+ 143
- 0
src/lcd/ssd.h View File

@@ -0,0 +1,143 @@
1
+/*
2
+ * Author: Brendan Le Foll <brendan.le.foll@intel.com>
3
+ * Copyright (c) 2014 Intel Corporation.
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining
6
+ * a copy of this software and associated documentation files (the
7
+ * "Software"), to deal in the Software without restriction, including
8
+ * without limitation the rights to use, copy, modify, merge, publish,
9
+ * distribute, sublicense, and/or sell copies of the Software, and to
10
+ * permit persons to whom the Software is furnished to do so, subject to
11
+ * the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be
14
+ * included in all copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+ */
24
+
25
+#pragma once
26
+
27
+namespace upm {
28
+
29
+#define DISPLAY_CMD_OFF             0xAE
30
+#define DISPLAY_CMD_ON              0xAF
31
+
32
+#define BASE_LOW_COLUMN_ADDR        0x00
33
+#define BASE_HIGH_COLUMN_ADDR       0x10
34
+#define BASE_PAGE_START_ADDR        0xB0
35
+#define DISPLAY_CMD_MEM_ADDR_MODE   0x20
36
+
37
+const uint8_t BasicFont[][8] =
38
+{
39
+  {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
40
+  {0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00},
41
+  {0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00},
42
+  {0x00,0x14,0x7F,0x14,0x7F,0x14,0x00,0x00},
43
+  {0x00,0x24,0x2A,0x7F,0x2A,0x12,0x00,0x00},
44
+  {0x00,0x23,0x13,0x08,0x64,0x62,0x00,0x00},
45
+  {0x00,0x36,0x49,0x55,0x22,0x50,0x00,0x00},
46
+  {0x00,0x00,0x05,0x03,0x00,0x00,0x00,0x00},
47
+  {0x00,0x1C,0x22,0x41,0x00,0x00,0x00,0x00},
48
+  {0x00,0x41,0x22,0x1C,0x00,0x00,0x00,0x00},
49
+  {0x00,0x08,0x2A,0x1C,0x2A,0x08,0x00,0x00},
50
+  {0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x00},
51
+  {0x00,0xA0,0x60,0x00,0x00,0x00,0x00,0x00},
52
+  {0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00},
53
+  {0x00,0x60,0x60,0x00,0x00,0x00,0x00,0x00},
54
+  {0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00},
55
+  {0x00,0x3E,0x51,0x49,0x45,0x3E,0x00,0x00},
56
+  {0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x00},
57
+  {0x00,0x62,0x51,0x49,0x49,0x46,0x00,0x00},
58
+  {0x00,0x22,0x41,0x49,0x49,0x36,0x00,0x00},
59
+  {0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x00},
60
+  {0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00},
61
+  {0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x00},
62
+  {0x00,0x01,0x71,0x09,0x05,0x03,0x00,0x00},
63
+  {0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00},
64
+  {0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00},
65
+  {0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00},
66
+  {0x00,0x00,0xAC,0x6C,0x00,0x00,0x00,0x00},
67
+  {0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x00},
68
+  {0x00,0x14,0x14,0x14,0x14,0x14,0x00,0x00},
69
+  {0x00,0x41,0x22,0x14,0x08,0x00,0x00,0x00},
70
+  {0x00,0x02,0x01,0x51,0x09,0x06,0x00,0x00},
71
+  {0x00,0x32,0x49,0x79,0x41,0x3E,0x00,0x00},
72
+  {0x00,0x7E,0x09,0x09,0x09,0x7E,0x00,0x00},
73
+  {0x00,0x7F,0x49,0x49,0x49,0x36,0x00,0x00},
74
+  {0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x00},
75
+  {0x00,0x7F,0x41,0x41,0x22,0x1C,0x00,0x00},
76
+  {0x00,0x7F,0x49,0x49,0x49,0x41,0x00,0x00},
77
+  {0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x00},
78
+  {0x00,0x3E,0x41,0x41,0x51,0x72,0x00,0x00},
79
+  {0x00,0x7F,0x08,0x08,0x08,0x7F,0x00,0x00},
80
+  {0x00,0x41,0x7F,0x41,0x00,0x00,0x00,0x00},
81
+  {0x00,0x20,0x40,0x41,0x3F,0x01,0x00,0x00},
82
+  {0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x00},
83
+  {0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x00},
84
+  {0x00,0x7F,0x02,0x0C,0x02,0x7F,0x00,0x00},
85
+  {0x00,0x7F,0x04,0x08,0x10,0x7F,0x00,0x00},
86
+  {0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00},
87
+  {0x00,0x7F,0x09,0x09,0x09,0x06,0x00,0x00},
88
+  {0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x00},
89
+  {0x00,0x7F,0x09,0x19,0x29,0x46,0x00,0x00},
90
+  {0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x00},
91
+  {0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x00},
92
+  {0x00,0x3F,0x40,0x40,0x40,0x3F,0x00,0x00},
93
+  {0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x00},
94
+  {0x00,0x3F,0x40,0x38,0x40,0x3F,0x00,0x00},
95
+  {0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x00},
96
+  {0x00,0x03,0x04,0x78,0x04,0x03,0x00,0x00},
97
+  {0x00,0x61,0x51,0x49,0x45,0x43,0x00,0x00},
98
+  {0x00,0x7F,0x41,0x41,0x00,0x00,0x00,0x00},
99
+  {0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00},
100
+  {0x00,0x41,0x41,0x7F,0x00,0x00,0x00,0x00},
101
+  {0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x00},
102
+  {0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00},
103
+  {0x00,0x01,0x02,0x04,0x00,0x00,0x00,0x00},
104
+  {0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x00},
105
+  {0x00,0x7F,0x48,0x44,0x44,0x38,0x00,0x00},
106
+  {0x00,0x38,0x44,0x44,0x28,0x00,0x00,0x00},
107
+  {0x00,0x38,0x44,0x44,0x48,0x7F,0x00,0x00},
108
+  {0x00,0x38,0x54,0x54,0x54,0x18,0x00,0x00},
109
+  {0x00,0x08,0x7E,0x09,0x02,0x00,0x00,0x00},
110
+  {0x00,0x18,0xA4,0xA4,0xA4,0x7C,0x00,0x00},
111
+  {0x00,0x7F,0x08,0x04,0x04,0x78,0x00,0x00},
112
+  {0x00,0x00,0x7D,0x00,0x00,0x00,0x00,0x00},
113
+  {0x00,0x80,0x84,0x7D,0x00,0x00,0x00,0x00},
114
+  {0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00},
115
+  {0x00,0x41,0x7F,0x40,0x00,0x00,0x00,0x00},
116
+  {0x00,0x7C,0x04,0x18,0x04,0x78,0x00,0x00},
117
+  {0x00,0x7C,0x08,0x04,0x7C,0x00,0x00,0x00},
118
+  {0x00,0x38,0x44,0x44,0x38,0x00,0x00,0x00},
119
+  {0x00,0xFC,0x24,0x24,0x18,0x00,0x00,0x00},
120
+  {0x00,0x18,0x24,0x24,0xFC,0x00,0x00,0x00},
121
+  {0x00,0x00,0x7C,0x08,0x04,0x00,0x00,0x00},
122
+  {0x00,0x48,0x54,0x54,0x24,0x00,0x00,0x00},
123
+  {0x00,0x04,0x7F,0x44,0x00,0x00,0x00,0x00},
124
+  {0x00,0x3C,0x40,0x40,0x7C,0x00,0x00,0x00},
125
+  {0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x00},
126
+  {0x00,0x3C,0x40,0x30,0x40,0x3C,0x00,0x00},
127
+  {0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00},
128
+  {0x00,0x1C,0xA0,0xA0,0x7C,0x00,0x00,0x00},
129
+  {0x00,0x44,0x64,0x54,0x4C,0x44,0x00,0x00},
130
+  {0x00,0x08,0x36,0x41,0x00,0x00,0x00,0x00},
131
+  {0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00},
132
+  {0x00,0x41,0x36,0x08,0x00,0x00,0x00,0x00},
133
+  {0x00,0x02,0x01,0x01,0x02,0x01,0x00,0x00},
134
+  {0x00,0x02,0x05,0x05,0x02,0x00,0x00,0x00}
135
+};
136
+
137
+typedef enum {
138
+    HORIZONTAL    =  0,
139
+    VERTICAL      =  1,
140
+    PAGE          =  2
141
+} displayAddressingMode;
142
+
143
+}

+ 1
- 1
src/lcd/ssd1308.cxx View File

@@ -129,7 +129,7 @@ SSD1308::writeChar (mraa_i2c_context ctx, uint8_t value) {
129 129
 
130 130
 mraa_result_t
131 131
 SSD1308::setNormalDisplay () {
132
-    return i2Cmd (m_i2c_lcd_control, DISPLAY_CMD_SET_NORMAL);    // set to normal display '1' is ON
132
+    return i2Cmd (m_i2c_lcd_control, DISPLAY_CMD_SET_NORMAL_1308);    // set to normal display '1' is ON
133 133
 }
134 134
 
135 135
 mraa_result_t

+ 3
- 116
src/lcd/ssd1308.h View File

@@ -26,124 +26,11 @@
26 26
 
27 27
 #include <string>
28 28
 #include "i2clcd.h"
29
+#include "ssd.h"
29 30
 
30 31
 namespace upm {
31 32
 
32
-#define DISPLAY_CMD_OFF             0xAE
33
-#define DISPLAY_CMD_ON              0xAF
34
-
35
-#define BASE_LOW_COLUMN_ADDR        0x00
36
-#define BASE_HIGH_COLUMN_ADDR       0x10
37
-#define BASE_PAGE_START_ADDR        0xB0
38
-#define DISPLAY_CMD_MEM_ADDR_MODE   0x20
39
-
40
-#define DISPLAY_CMD_SET_NORMAL      0xA6
41
-
42
-const uint8_t BasicFont[][8] =
43
-{
44
-  {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
45
-  {0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00},
46
-  {0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00},
47
-  {0x00,0x14,0x7F,0x14,0x7F,0x14,0x00,0x00},
48
-  {0x00,0x24,0x2A,0x7F,0x2A,0x12,0x00,0x00},
49
-  {0x00,0x23,0x13,0x08,0x64,0x62,0x00,0x00},
50
-  {0x00,0x36,0x49,0x55,0x22,0x50,0x00,0x00},
51
-  {0x00,0x00,0x05,0x03,0x00,0x00,0x00,0x00},
52
-  {0x00,0x1C,0x22,0x41,0x00,0x00,0x00,0x00},
53
-  {0x00,0x41,0x22,0x1C,0x00,0x00,0x00,0x00},
54
-  {0x00,0x08,0x2A,0x1C,0x2A,0x08,0x00,0x00},
55
-  {0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x00},
56
-  {0x00,0xA0,0x60,0x00,0x00,0x00,0x00,0x00},
57
-  {0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00},
58
-  {0x00,0x60,0x60,0x00,0x00,0x00,0x00,0x00},
59
-  {0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00},
60
-  {0x00,0x3E,0x51,0x49,0x45,0x3E,0x00,0x00},
61
-  {0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x00},
62
-  {0x00,0x62,0x51,0x49,0x49,0x46,0x00,0x00},
63
-  {0x00,0x22,0x41,0x49,0x49,0x36,0x00,0x00},
64
-  {0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x00},
65
-  {0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00},
66
-  {0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x00},
67
-  {0x00,0x01,0x71,0x09,0x05,0x03,0x00,0x00},
68
-  {0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00},
69
-  {0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00},
70
-  {0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00},
71
-  {0x00,0x00,0xAC,0x6C,0x00,0x00,0x00,0x00},
72
-  {0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x00},
73
-  {0x00,0x14,0x14,0x14,0x14,0x14,0x00,0x00},
74
-  {0x00,0x41,0x22,0x14,0x08,0x00,0x00,0x00},
75
-  {0x00,0x02,0x01,0x51,0x09,0x06,0x00,0x00},
76
-  {0x00,0x32,0x49,0x79,0x41,0x3E,0x00,0x00},
77
-  {0x00,0x7E,0x09,0x09,0x09,0x7E,0x00,0x00},
78
-  {0x00,0x7F,0x49,0x49,0x49,0x36,0x00,0x00},
79
-  {0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x00},
80
-  {0x00,0x7F,0x41,0x41,0x22,0x1C,0x00,0x00},
81
-  {0x00,0x7F,0x49,0x49,0x49,0x41,0x00,0x00},
82
-  {0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x00},
83
-  {0x00,0x3E,0x41,0x41,0x51,0x72,0x00,0x00},
84
-  {0x00,0x7F,0x08,0x08,0x08,0x7F,0x00,0x00},
85
-  {0x00,0x41,0x7F,0x41,0x00,0x00,0x00,0x00},
86
-  {0x00,0x20,0x40,0x41,0x3F,0x01,0x00,0x00},
87
-  {0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x00},
88
-  {0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x00},
89
-  {0x00,0x7F,0x02,0x0C,0x02,0x7F,0x00,0x00},
90
-  {0x00,0x7F,0x04,0x08,0x10,0x7F,0x00,0x00},
91
-  {0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00},
92
-  {0x00,0x7F,0x09,0x09,0x09,0x06,0x00,0x00},
93
-  {0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x00},
94
-  {0x00,0x7F,0x09,0x19,0x29,0x46,0x00,0x00},
95
-  {0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x00},
96
-  {0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x00},
97
-  {0x00,0x3F,0x40,0x40,0x40,0x3F,0x00,0x00},
98
-  {0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x00},
99
-  {0x00,0x3F,0x40,0x38,0x40,0x3F,0x00,0x00},
100
-  {0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x00},
101
-  {0x00,0x03,0x04,0x78,0x04,0x03,0x00,0x00},
102
-  {0x00,0x61,0x51,0x49,0x45,0x43,0x00,0x00},
103
-  {0x00,0x7F,0x41,0x41,0x00,0x00,0x00,0x00},
104
-  {0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00},
105
-  {0x00,0x41,0x41,0x7F,0x00,0x00,0x00,0x00},
106
-  {0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x00},
107
-  {0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00},
108
-  {0x00,0x01,0x02,0x04,0x00,0x00,0x00,0x00},
109
-  {0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x00},
110
-  {0x00,0x7F,0x48,0x44,0x44,0x38,0x00,0x00},
111
-  {0x00,0x38,0x44,0x44,0x28,0x00,0x00,0x00},
112
-  {0x00,0x38,0x44,0x44,0x48,0x7F,0x00,0x00},
113
-  {0x00,0x38,0x54,0x54,0x54,0x18,0x00,0x00},
114
-  {0x00,0x08,0x7E,0x09,0x02,0x00,0x00,0x00},
115
-  {0x00,0x18,0xA4,0xA4,0xA4,0x7C,0x00,0x00},
116
-  {0x00,0x7F,0x08,0x04,0x04,0x78,0x00,0x00},
117
-  {0x00,0x00,0x7D,0x00,0x00,0x00,0x00,0x00},
118
-  {0x00,0x80,0x84,0x7D,0x00,0x00,0x00,0x00},
119
-  {0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00},
120
-  {0x00,0x41,0x7F,0x40,0x00,0x00,0x00,0x00},
121
-  {0x00,0x7C,0x04,0x18,0x04,0x78,0x00,0x00},
122
-  {0x00,0x7C,0x08,0x04,0x7C,0x00,0x00,0x00},
123
-  {0x00,0x38,0x44,0x44,0x38,0x00,0x00,0x00},
124
-  {0x00,0xFC,0x24,0x24,0x18,0x00,0x00,0x00},
125
-  {0x00,0x18,0x24,0x24,0xFC,0x00,0x00,0x00},
126
-  {0x00,0x00,0x7C,0x08,0x04,0x00,0x00,0x00},
127
-  {0x00,0x48,0x54,0x54,0x24,0x00,0x00,0x00},
128
-  {0x00,0x04,0x7F,0x44,0x00,0x00,0x00,0x00},
129
-  {0x00,0x3C,0x40,0x40,0x7C,0x00,0x00,0x00},
130
-  {0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x00},
131
-  {0x00,0x3C,0x40,0x30,0x40,0x3C,0x00,0x00},
132
-  {0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00},
133
-  {0x00,0x1C,0xA0,0xA0,0x7C,0x00,0x00,0x00},
134
-  {0x00,0x44,0x64,0x54,0x4C,0x44,0x00,0x00},
135
-  {0x00,0x08,0x36,0x41,0x00,0x00,0x00,0x00},
136
-  {0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00},
137
-  {0x00,0x41,0x36,0x08,0x00,0x00,0x00,0x00},
138
-  {0x00,0x02,0x01,0x01,0x02,0x01,0x00,0x00},
139
-  {0x00,0x02,0x05,0x05,0x02,0x00,0x00,0x00}
140
-};
141
-
142
-typedef enum {
143
-    HORIZONTAL    =  0,
144
-    VERTICAL      =  1,
145
-    PAGE          =  2
146
-} displayAddressingMode;
33
+#define DISPLAY_CMD_SET_NORMAL_1308      0xA6
147 34
 
148 35
 /**
149 36
  * @brief C++ API for SSD1308 i2c controlled OLED displays
@@ -167,7 +54,7 @@ class SSD1308 : public I2CLcd {
167 54
         * @param bus i2c bus to use
168 55
         * @param address the slave address the lcd is registered on
169 56
         */
170
-        SSD1308 (int bus, int address);
57
+        SSD1308 (int bus, int address=0x3C);
171 58
        /**
172 59
         * SSD1308 Destructor
173 60
         */

+ 2
- 115
src/lcd/ssd1327.h View File

@@ -26,125 +26,12 @@
26 26
 
27 27
 #include <string>
28 28
 #include "i2clcd.h"
29
+#include "ssd.h"
29 30
 
30 31
 namespace upm {
31
-/*
32
-#define DISPLAY_CMD_OFF             0xAE
33
-#define DISPLAY_CMD_ON              0xAF
34 32
 
35
-#define BASE_LOW_COLUMN_ADDR        0x00
36
-#define BASE_HIGH_COLUMN_ADDR       0x10
37
-#define BASE_PAGE_START_ADDR        0xB0
38
-#define DISPLAY_CMD_MEM_ADDR_MODE   0x20
39
-*/
40 33
 #define DISPLAY_CMD_SET_NORMAL      0xA4
41 34
 
42
-const uint8_t BasicFont[][8] =
43
-{
44
-  {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
45
-  {0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00},
46
-  {0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00},
47
-  {0x00,0x14,0x7F,0x14,0x7F,0x14,0x00,0x00},
48
-  {0x00,0x24,0x2A,0x7F,0x2A,0x12,0x00,0x00},
49
-  {0x00,0x23,0x13,0x08,0x64,0x62,0x00,0x00},
50
-  {0x00,0x36,0x49,0x55,0x22,0x50,0x00,0x00},
51
-  {0x00,0x00,0x05,0x03,0x00,0x00,0x00,0x00},
52
-  {0x00,0x1C,0x22,0x41,0x00,0x00,0x00,0x00},
53
-  {0x00,0x41,0x22,0x1C,0x00,0x00,0x00,0x00},
54
-  {0x00,0x08,0x2A,0x1C,0x2A,0x08,0x00,0x00},
55
-  {0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x00},
56
-  {0x00,0xA0,0x60,0x00,0x00,0x00,0x00,0x00},
57
-  {0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00},
58
-  {0x00,0x60,0x60,0x00,0x00,0x00,0x00,0x00},
59
-  {0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00},
60
-  {0x00,0x3E,0x51,0x49,0x45,0x3E,0x00,0x00},
61
-  {0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x00},
62
-  {0x00,0x62,0x51,0x49,0x49,0x46,0x00,0x00},
63
-  {0x00,0x22,0x41,0x49,0x49,0x36,0x00,0x00},
64
-  {0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x00},
65
-  {0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00},
66
-  {0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x00},
67
-  {0x00,0x01,0x71,0x09,0x05,0x03,0x00,0x00},
68
-  {0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00},
69
-  {0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00},
70
-  {0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00},
71
-  {0x00,0x00,0xAC,0x6C,0x00,0x00,0x00,0x00},
72
-  {0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x00},
73
-  {0x00,0x14,0x14,0x14,0x14,0x14,0x00,0x00},
74
-  {0x00,0x41,0x22,0x14,0x08,0x00,0x00,0x00},
75
-  {0x00,0x02,0x01,0x51,0x09,0x06,0x00,0x00},
76
-  {0x00,0x32,0x49,0x79,0x41,0x3E,0x00,0x00},
77
-  {0x00,0x7E,0x09,0x09,0x09,0x7E,0x00,0x00},
78
-  {0x00,0x7F,0x49,0x49,0x49,0x36,0x00,0x00},
79
-  {0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x00},
80
-  {0x00,0x7F,0x41,0x41,0x22,0x1C,0x00,0x00},
81
-  {0x00,0x7F,0x49,0x49,0x49,0x41,0x00,0x00},
82
-  {0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x00},
83
-  {0x00,0x3E,0x41,0x41,0x51,0x72,0x00,0x00},
84
-  {0x00,0x7F,0x08,0x08,0x08,0x7F,0x00,0x00},
85
-  {0x00,0x41,0x7F,0x41,0x00,0x00,0x00,0x00},
86
-  {0x00,0x20,0x40,0x41,0x3F,0x01,0x00,0x00},
87
-  {0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x00},
88
-  {0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x00},
89
-  {0x00,0x7F,0x02,0x0C,0x02,0x7F,0x00,0x00},
90
-  {0x00,0x7F,0x04,0x08,0x10,0x7F,0x00,0x00},
91
-  {0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00},
92
-  {0x00,0x7F,0x09,0x09,0x09,0x06,0x00,0x00},
93
-  {0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x00},
94
-  {0x00,0x7F,0x09,0x19,0x29,0x46,0x00,0x00},
95
-  {0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x00},
96
-  {0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x00},
97
-  {0x00,0x3F,0x40,0x40,0x40,0x3F,0x00,0x00},
98
-  {0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x00},
99
-  {0x00,0x3F,0x40,0x38,0x40,0x3F,0x00,0x00},
100
-  {0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x00},
101
-  {0x00,0x03,0x04,0x78,0x04,0x03,0x00,0x00},
102
-  {0x00,0x61,0x51,0x49,0x45,0x43,0x00,0x00},
103
-  {0x00,0x7F,0x41,0x41,0x00,0x00,0x00,0x00},
104
-  {0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00},
105
-  {0x00,0x41,0x41,0x7F,0x00,0x00,0x00,0x00},
106
-  {0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x00},
107
-  {0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00},
108
-  {0x00,0x01,0x02,0x04,0x00,0x00,0x00,0x00},
109
-  {0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x00},
110
-  {0x00,0x7F,0x48,0x44,0x44,0x38,0x00,0x00},
111
-  {0x00,0x38,0x44,0x44,0x28,0x00,0x00,0x00},
112
-  {0x00,0x38,0x44,0x44,0x48,0x7F,0x00,0x00},
113
-  {0x00,0x38,0x54,0x54,0x54,0x18,0x00,0x00},
114
-  {0x00,0x08,0x7E,0x09,0x02,0x00,0x00,0x00},
115
-  {0x00,0x18,0xA4,0xA4,0xA4,0x7C,0x00,0x00},
116
-  {0x00,0x7F,0x08,0x04,0x04,0x78,0x00,0x00},
117
-  {0x00,0x00,0x7D,0x00,0x00,0x00,0x00,0x00},
118
-  {0x00,0x80,0x84,0x7D,0x00,0x00,0x00,0x00},
119
-  {0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00},
120
-  {0x00,0x41,0x7F,0x40,0x00,0x00,0x00,0x00},
121
-  {0x00,0x7C,0x04,0x18,0x04,0x78,0x00,0x00},
122
-  {0x00,0x7C,0x08,0x04,0x7C,0x00,0x00,0x00},
123
-  {0x00,0x38,0x44,0x44,0x38,0x00,0x00,0x00},
124
-  {0x00,0xFC,0x24,0x24,0x18,0x00,0x00,0x00},
125
-  {0x00,0x18,0x24,0x24,0xFC,0x00,0x00,0x00},
126
-  {0x00,0x00,0x7C,0x08,0x04,0x00,0x00,0x00},
127
-  {0x00,0x48,0x54,0x54,0x24,0x00,0x00,0x00},
128
-  {0x00,0x04,0x7F,0x44,0x00,0x00,0x00,0x00},
129
-  {0x00,0x3C,0x40,0x40,0x7C,0x00,0x00,0x00},
130
-  {0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x00},
131
-  {0x00,0x3C,0x40,0x30,0x40,0x3C,0x00,0x00},
132
-  {0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00},
133
-  {0x00,0x1C,0xA0,0xA0,0x7C,0x00,0x00,0x00},
134
-  {0x00,0x44,0x64,0x54,0x4C,0x44,0x00,0x00},
135
-  {0x00,0x08,0x36,0x41,0x00,0x00,0x00,0x00},
136
-  {0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00},
137
-  {0x00,0x41,0x36,0x08,0x00,0x00,0x00,0x00},
138
-  {0x00,0x02,0x01,0x01,0x02,0x01,0x00,0x00},
139
-  {0x00,0x02,0x05,0x05,0x02,0x00,0x00,0x00}
140
-};
141
-
142
-typedef enum {
143
-    HORIZONTAL    =  0,
144
-    VERTICAL      =  1,
145
-    PAGE          =  2
146
-} displayAddressingMode;
147
-
148 35
 /**
149 36
  * @brief C++ API for SSD1327 i2c controlled OLED displays
150 37
  *
@@ -167,7 +54,7 @@ class SSD1327 : public I2CLcd {
167 54
          * @param bus i2c bus to use
168 55
          * @param address the slave address the lcd is registered on
169 56
          */
170
-        SSD1327 (int bus, int address);
57
+        SSD1327 (int bus, int address=0x3C);
171 58
        /**
172 59
         * SSD1327 destructor
173 60
         */