Forked from Neal Horman: Adafruit_GFX, a derived version of the BSD licensed Adafrut GFX library for the SSD1306 controller for an OLED 128x32 or 128x64 display using SPI or I2C. Now it is adopted also for the SH1106 I2C 128x64 display as well...

Dependents:   Lab06_oled_i2c Lab06_BME280_oled Lab06_oled_clock I2C_SSD1306andSH1106_nucleo_F446RE

Committer:
cspista
Date:
Tue Feb 01 15:20:21 2022 +0000
Revision:
19:1b773847a04b
Parent:
17:00a1379bd18a
Child:
20:da33cca77ce5
Example was addedd

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nkhorman 0:c3dcd4c4983a 1 /*********************************************************************
nkhorman 0:c3dcd4c4983a 2 This is a library for our Monochrome OLEDs based on SSD1306 drivers
nkhorman 0:c3dcd4c4983a 3
nkhorman 0:c3dcd4c4983a 4 Pick one up today in the adafruit shop!
nkhorman 0:c3dcd4c4983a 5 ------> http://www.adafruit.com/category/63_98
nkhorman 0:c3dcd4c4983a 6
cspista 17:00a1379bd18a 7 These displays use SPI to communicate, 4 or 5 pins are required to
nkhorman 0:c3dcd4c4983a 8 interface
nkhorman 0:c3dcd4c4983a 9
cspista 17:00a1379bd18a 10 Adafruit invests time and resources providing this open source code,
cspista 17:00a1379bd18a 11 please support Adafruit and open-source hardware by purchasing
nkhorman 0:c3dcd4c4983a 12 products from Adafruit!
nkhorman 0:c3dcd4c4983a 13
cspista 17:00a1379bd18a 14 Written by Limor Fried/Ladyada for Adafruit Industries.
nkhorman 0:c3dcd4c4983a 15 BSD license, check license.txt for more information
nkhorman 0:c3dcd4c4983a 16 All text above, and the splash screen must be included in any redistribution
nkhorman 0:c3dcd4c4983a 17 *********************************************************************/
nkhorman 0:c3dcd4c4983a 18
nkhorman 0:c3dcd4c4983a 19 /*
nkhorman 9:ddb97c9850a2 20 * Modified by Neal Horman 7/14/2012 for use in mbed
cspista 19:1b773847a04b 21 *
cspista 19:1b773847a04b 22 * Further modified by Istvan Cserny, January 31, 2022
cspista 19:1b773847a04b 23 * so that it could be used for the SH1106 I2C display as well
cspista 19:1b773847a04b 24 * The memory mode for the SSD1306 I2C display was changed to
cspista 19:1b773847a04b 25 * Page mode (0x10) and the virtual void sendDisplayBuffer()
cspista 19:1b773847a04b 26 * function has been rewritten accordingly.
cspista 19:1b773847a04b 27 *
cspista 19:1b773847a04b 28 * To do: initialization of the SH1106 should be modified
cspista 19:1b773847a04b 29 * althogh also work with the default initialization.
cspista 19:1b773847a04b 30 *
cspista 19:1b773847a04b 31 *
cspista 19:1b773847a04b 32 * Example:
cspista 19:1b773847a04b 33 * @code
cspista 19:1b773847a04b 34 * #include "mbed.h"
cspista 19:1b773847a04b 35 * #include "Adafruit_SSD1306.h"
cspista 19:1b773847a04b 36 *
cspista 19:1b773847a04b 37 * I2C i2c(D14,D15);
cspista 19:1b773847a04b 38 * Adafruit_SH1106_I2c oled(i2c, NC, 0x78, 64, 128); // SH1106 I2C 128x64, with no reset pin
cspista 19:1b773847a04b 39 * // Adafruit_SSD1306_I2c oled(i2c, NC, 0x78, 64, 128); // SSD1306 I2C 128x64, with no reset pin
cspista 19:1b773847a04b 40 * // Adafruit_SSD1306_I2c oled(i2c, NC, 0x78, 32, 128); // SSD1306 I2C 128x32, with no reset pin
cspista 19:1b773847a04b 41 *
cspista 19:1b773847a04b 42 *
cspista 19:1b773847a04b 43 * int main()
cspista 19:1b773847a04b 44 * {
cspista 19:1b773847a04b 45 * uint16_t x=0;
cspista 19:1b773847a04b 46 * i2c.frequency(400000);
cspista 19:1b773847a04b 47 * oled.setRotation(0);
cspista 19:1b773847a04b 48 * oled.clearDisplay();
cspista 19:1b773847a04b 49 * oled.drawRect(0,0,oled.width(),oled.height(),1);
cspista 19:1b773847a04b 50 * oled.display();
cspista 19:1b773847a04b 51 * oled.setTextColor(1);
cspista 19:1b773847a04b 52 * oled.setTextSize(1);
cspista 19:1b773847a04b 53 * oled.setTextCursor(10,8);
cspista 19:1b773847a04b 54 * oled.printf("SH1106 %ux%u",oled.width(),oled.height());
cspista 19:1b773847a04b 55 * oled.display();
cspista 19:1b773847a04b 56 * wait(2.0);
cspista 19:1b773847a04b 57 * oled.setTextSize(2);
cspista 19:1b773847a04b 58 * while(1) {
cspista 19:1b773847a04b 59 * oled.clearDisplay();
cspista 19:1b773847a04b 60 * oled.drawRect(0,0,oled.width(),oled.height(),1);
cspista 19:1b773847a04b 61 * oled.setTextCursor(10,8);
cspista 19:1b773847a04b 62 * oled.printf("x = %u",x++);
cspista 19:1b773847a04b 63 * oled.display();
cspista 19:1b773847a04b 64 * wait(1.0);
cspista 19:1b773847a04b 65 * }
cspista 19:1b773847a04b 66 * }
cspista 19:1b773847a04b 67 * @endcode
nkhorman 0:c3dcd4c4983a 68 */
nkhorman 0:c3dcd4c4983a 69
nkhorman 0:c3dcd4c4983a 70 #ifndef _ADAFRUIT_SSD1306_H_
nkhorman 0:c3dcd4c4983a 71 #define _ADAFRUIT_SSD1306_H_
nkhorman 0:c3dcd4c4983a 72
nkhorman 0:c3dcd4c4983a 73 #include "mbed.h"
nkhorman 0:c3dcd4c4983a 74 #include "Adafruit_GFX.h"
nkhorman 0:c3dcd4c4983a 75
nkhorman 9:ddb97c9850a2 76 #include <vector>
nkhorman 9:ddb97c9850a2 77 #include <algorithm>
nkhorman 0:c3dcd4c4983a 78
nkhorman 9:ddb97c9850a2 79 // A DigitalOut sub-class that provides a constructed default state
nkhorman 9:ddb97c9850a2 80 class DigitalOut2 : public DigitalOut
nkhorman 9:ddb97c9850a2 81 {
nkhorman 9:ddb97c9850a2 82 public:
cspista 17:00a1379bd18a 83 DigitalOut2(PinName pin, bool active = false) : DigitalOut(pin)
cspista 17:00a1379bd18a 84 {
cspista 17:00a1379bd18a 85 write(active);
cspista 17:00a1379bd18a 86 };
cspista 17:00a1379bd18a 87 DigitalOut2& operator= (int value)
cspista 17:00a1379bd18a 88 {
cspista 17:00a1379bd18a 89 write(value);
cspista 17:00a1379bd18a 90 return *this;
cspista 17:00a1379bd18a 91 };
cspista 17:00a1379bd18a 92 DigitalOut2& operator= (DigitalOut2& rhs)
cspista 17:00a1379bd18a 93 {
cspista 17:00a1379bd18a 94 write(rhs.read());
cspista 17:00a1379bd18a 95 return *this;
cspista 17:00a1379bd18a 96 };
cspista 17:00a1379bd18a 97 operator int()
cspista 17:00a1379bd18a 98 {
cspista 17:00a1379bd18a 99 return read();
cspista 17:00a1379bd18a 100 };
nkhorman 9:ddb97c9850a2 101 };
Neal Horman 6:1be3e3b46eb7 102
nkhorman 0:c3dcd4c4983a 103 #define SSD1306_EXTERNALVCC 0x1
nkhorman 0:c3dcd4c4983a 104 #define SSD1306_SWITCHCAPVCC 0x2
nkhorman 0:c3dcd4c4983a 105
nkhorman 11:86909e6db3c8 106 /** The pure base class for the SSD1306 display driver.
nkhorman 11:86909e6db3c8 107 *
nkhorman 11:86909e6db3c8 108 * You should derive from this for a new transport interface type,
nkhorman 11:86909e6db3c8 109 * such as the SPI and I2C drivers.
nkhorman 11:86909e6db3c8 110 */
nkhorman 0:c3dcd4c4983a 111 class Adafruit_SSD1306 : public Adafruit_GFX
nkhorman 0:c3dcd4c4983a 112 {
nkhorman 9:ddb97c9850a2 113 public:
cspista 17:00a1379bd18a 114 Adafruit_SSD1306(PinName RST, uint8_t rawHeight = 32, uint8_t rawWidth = 128)
cspista 17:00a1379bd18a 115 : Adafruit_GFX(rawWidth,rawHeight)
cspista 17:00a1379bd18a 116 , rst(RST,false)
cspista 17:00a1379bd18a 117 {
cspista 17:00a1379bd18a 118 buffer.resize(rawHeight * rawWidth / 8);
cspista 17:00a1379bd18a 119 };
nkhorman 9:ddb97c9850a2 120
cspista 17:00a1379bd18a 121 void begin(uint8_t switchvcc = SSD1306_SWITCHCAPVCC);
cspista 17:00a1379bd18a 122
cspista 17:00a1379bd18a 123 // These must be implemented in the derived transport driver
cspista 17:00a1379bd18a 124 virtual void command(uint8_t c) = 0;
cspista 17:00a1379bd18a 125 virtual void data(uint8_t c) = 0;
cspista 17:00a1379bd18a 126 virtual void drawPixel(int16_t x, int16_t y, uint16_t color);
nkhorman 11:86909e6db3c8 127
cspista 17:00a1379bd18a 128 /// Clear the display buffer
cspista 17:00a1379bd18a 129 void clearDisplay(void);
cspista 17:00a1379bd18a 130 virtual void invertDisplay(bool i);
nkhorman 11:86909e6db3c8 131
cspista 17:00a1379bd18a 132 /// Cause the display to be updated with the buffer content.
cspista 17:00a1379bd18a 133 void display();
cspista 17:00a1379bd18a 134 /// Fill the buffer with the AdaFruit splash screen.
cspista 17:00a1379bd18a 135 virtual void splash();
cspista 17:00a1379bd18a 136
nkhorman 9:ddb97c9850a2 137 protected:
cspista 17:00a1379bd18a 138 virtual void sendDisplayBuffer() = 0;
cspista 17:00a1379bd18a 139 DigitalOut2 rst;
nkhorman 9:ddb97c9850a2 140
cspista 17:00a1379bd18a 141 // the memory buffer for the LCD
cspista 17:00a1379bd18a 142 std::vector<uint8_t> buffer;
nkhorman 9:ddb97c9850a2 143 };
nkhorman 9:ddb97c9850a2 144
nkhorman 11:86909e6db3c8 145
nkhorman 11:86909e6db3c8 146 /** This is the SPI SSD1306 display driver transport class
nkhorman 11:86909e6db3c8 147 *
nkhorman 11:86909e6db3c8 148 */
nkhorman 9:ddb97c9850a2 149 class Adafruit_SSD1306_Spi : public Adafruit_SSD1306
nkhorman 9:ddb97c9850a2 150 {
nkhorman 9:ddb97c9850a2 151 public:
cspista 17:00a1379bd18a 152 /** Create a SSD1306 SPI transport display driver instance with the specified DC, RST, and CS pins, as well as the display dimentions
cspista 17:00a1379bd18a 153 *
cspista 17:00a1379bd18a 154 * Required parameters
cspista 17:00a1379bd18a 155 * @param spi - a reference to an initialized SPI object
cspista 17:00a1379bd18a 156 * @param DC (Data/Command) pin name
cspista 17:00a1379bd18a 157 * @param RST (Reset) pin name
cspista 17:00a1379bd18a 158 * @param CS (Chip Select) pin name
cspista 17:00a1379bd18a 159 *
cspista 17:00a1379bd18a 160 * Optional parameters
cspista 17:00a1379bd18a 161 * @param rawHeight - the vertical number of pixels for the display, defaults to 32
cspista 17:00a1379bd18a 162 * @param rawWidth - the horizonal number of pixels for the display, defaults to 128
cspista 17:00a1379bd18a 163 */
cspista 17:00a1379bd18a 164 Adafruit_SSD1306_Spi(SPI &spi, PinName DC, PinName RST, PinName CS, uint8_t rawHieght = 32, uint8_t rawWidth = 128)
cspista 17:00a1379bd18a 165 : Adafruit_SSD1306(RST, rawHieght, rawWidth)
cspista 17:00a1379bd18a 166 , cs(CS,true)
cspista 17:00a1379bd18a 167 , dc(DC,false)
cspista 17:00a1379bd18a 168 , mspi(spi)
cspista 17:00a1379bd18a 169 {
cspista 17:00a1379bd18a 170 begin();
cspista 17:00a1379bd18a 171 splash();
cspista 17:00a1379bd18a 172 display();
cspista 17:00a1379bd18a 173 };
nkhorman 9:ddb97c9850a2 174
cspista 17:00a1379bd18a 175 virtual void command(uint8_t c)
cspista 17:00a1379bd18a 176 {
cspista 17:00a1379bd18a 177 cs = 1;
cspista 17:00a1379bd18a 178 dc = 0;
cspista 17:00a1379bd18a 179 cs = 0;
cspista 17:00a1379bd18a 180 mspi.write(c);
cspista 17:00a1379bd18a 181 cs = 1;
cspista 17:00a1379bd18a 182 };
nkhorman 9:ddb97c9850a2 183
cspista 17:00a1379bd18a 184 virtual void data(uint8_t c)
cspista 17:00a1379bd18a 185 {
cspista 17:00a1379bd18a 186 cs = 1;
cspista 17:00a1379bd18a 187 dc = 1;
cspista 17:00a1379bd18a 188 cs = 0;
cspista 17:00a1379bd18a 189 mspi.write(c);
cspista 17:00a1379bd18a 190 cs = 1;
cspista 17:00a1379bd18a 191 };
nkhorman 9:ddb97c9850a2 192
nkhorman 9:ddb97c9850a2 193 protected:
cspista 17:00a1379bd18a 194 virtual void sendDisplayBuffer()
cspista 17:00a1379bd18a 195 {
cspista 17:00a1379bd18a 196 cs = 1;
cspista 17:00a1379bd18a 197 dc = 1;
cspista 17:00a1379bd18a 198 cs = 0;
nkhorman 9:ddb97c9850a2 199
cspista 17:00a1379bd18a 200 for(uint16_t i=0, q=buffer.size(); i<q; i++)
cspista 17:00a1379bd18a 201 mspi.write(buffer[i]);
nkhorman 9:ddb97c9850a2 202
cspista 17:00a1379bd18a 203 if(height() == 32) {
cspista 17:00a1379bd18a 204 for(uint16_t i=0, q=buffer.size(); i<q; i++)
cspista 17:00a1379bd18a 205 mspi.write(0);
cspista 17:00a1379bd18a 206 }
nkhorman 11:86909e6db3c8 207
cspista 17:00a1379bd18a 208 cs = 1;
cspista 17:00a1379bd18a 209 };
nkhorman 9:ddb97c9850a2 210
cspista 17:00a1379bd18a 211 DigitalOut2 cs, dc;
cspista 17:00a1379bd18a 212 SPI &mspi;
nkhorman 9:ddb97c9850a2 213 };
nkhorman 9:ddb97c9850a2 214
nkhorman 11:86909e6db3c8 215 /** This is the I2C SSD1306 display driver transport class
nkhorman 11:86909e6db3c8 216 *
nkhorman 11:86909e6db3c8 217 */
nkhorman 9:ddb97c9850a2 218 class Adafruit_SSD1306_I2c : public Adafruit_SSD1306
nkhorman 9:ddb97c9850a2 219 {
nkhorman 9:ddb97c9850a2 220 public:
cspista 17:00a1379bd18a 221 #define SSD_I2C_ADDRESS 0x78
cspista 17:00a1379bd18a 222 /** Create a SSD1306 I2C transport display driver instance with the specified RST pin name, the I2C address, as well as the display dimensions
cspista 17:00a1379bd18a 223 *
cspista 17:00a1379bd18a 224 * Required parameters
cspista 17:00a1379bd18a 225 * @param i2c - A reference to an initialized I2C object
cspista 17:00a1379bd18a 226 * @param RST - The Reset pin name
cspista 17:00a1379bd18a 227 *
cspista 17:00a1379bd18a 228 * Optional parameters
cspista 17:00a1379bd18a 229 * @param i2cAddress - The i2c address of the display
cspista 17:00a1379bd18a 230 * @param rawHeight - The vertical number of pixels for the display, defaults to 32
cspista 17:00a1379bd18a 231 * @param rawWidth - The horizonal number of pixels for the display, defaults to 128
cspista 17:00a1379bd18a 232 */
cspista 17:00a1379bd18a 233 Adafruit_SSD1306_I2c(I2C &i2c, PinName RST, uint8_t i2cAddress = SSD_I2C_ADDRESS, uint8_t rawHeight = 32, uint8_t rawWidth = 128)
cspista 17:00a1379bd18a 234 : Adafruit_SSD1306(RST, rawHeight, rawWidth)
cspista 17:00a1379bd18a 235 , mi2c(i2c)
cspista 17:00a1379bd18a 236 , mi2cAddress(i2cAddress)
cspista 17:00a1379bd18a 237 {
cspista 17:00a1379bd18a 238 begin();
cspista 17:00a1379bd18a 239 splash();
cspista 17:00a1379bd18a 240 display();
cspista 17:00a1379bd18a 241 };
nkhorman 9:ddb97c9850a2 242
cspista 17:00a1379bd18a 243 virtual void command(uint8_t c)
cspista 17:00a1379bd18a 244 {
cspista 17:00a1379bd18a 245 char buff[2];
cspista 17:00a1379bd18a 246 buff[0] = 0; // Command Mode
cspista 17:00a1379bd18a 247 buff[1] = c;
cspista 17:00a1379bd18a 248 mi2c.write(mi2cAddress, buff, sizeof(buff));
cspista 17:00a1379bd18a 249 }
nkhorman 9:ddb97c9850a2 250
cspista 17:00a1379bd18a 251 virtual void data(uint8_t c)
cspista 17:00a1379bd18a 252 {
cspista 17:00a1379bd18a 253 char buff[2];
cspista 17:00a1379bd18a 254 buff[0] = 0x40; // Data Mode
cspista 17:00a1379bd18a 255 buff[1] = c;
cspista 17:00a1379bd18a 256 mi2c.write(mi2cAddress, buff, sizeof(buff));
cspista 17:00a1379bd18a 257 };
nkhorman 9:ddb97c9850a2 258
nkhorman 9:ddb97c9850a2 259 protected:
cspista 17:00a1379bd18a 260 virtual void sendDisplayBuffer()
cspista 17:00a1379bd18a 261 {
nkhorman 9:ddb97c9850a2 262
cspista 17:00a1379bd18a 263 char buff[256];
cspista 17:00a1379bd18a 264 char cmd[4] = {0, 0xB0, 0x00, 0x10};
cspista 19:1b773847a04b 265 for (uint8_t m = 0; m < _rawHeight/8; m++) {
cspista 17:00a1379bd18a 266 buff[0] = 0x40;
cspista 17:00a1379bd18a 267 cmd[1] = 0xB0 + m;
cspista 17:00a1379bd18a 268 for(int i=0; i<128; i++) {
cspista 17:00a1379bd18a 269 buff[i+1]= buffer[m*128+i];
cspista 17:00a1379bd18a 270 }
cspista 17:00a1379bd18a 271 mi2c.write(mi2cAddress, cmd, 4);
cspista 17:00a1379bd18a 272 mi2c.write(mi2cAddress, buff, 129);
cspista 17:00a1379bd18a 273 }
cspista 17:00a1379bd18a 274 };
nkhorman 9:ddb97c9850a2 275
cspista 17:00a1379bd18a 276 I2C &mi2c;
cspista 17:00a1379bd18a 277 uint8_t mi2cAddress;
nkhorman 0:c3dcd4c4983a 278 };
nkhorman 0:c3dcd4c4983a 279
cspista 17:00a1379bd18a 280 /** This is the I2C SH1106 display driver transport class
cspista 17:00a1379bd18a 281 *
cspista 17:00a1379bd18a 282 */
cspista 17:00a1379bd18a 283 class Adafruit_SH1106_I2c : public Adafruit_SSD1306
cspista 17:00a1379bd18a 284 {
cspista 17:00a1379bd18a 285 public:
cspista 17:00a1379bd18a 286 #define SSD_I2C_ADDRESS 0x78
cspista 17:00a1379bd18a 287 /** Create a SSD1306 I2C transport display driver instance with the specified RST pin name, the I2C address, as well as the display dimensions
cspista 17:00a1379bd18a 288 *
cspista 17:00a1379bd18a 289 * Required parameters
cspista 17:00a1379bd18a 290 * @param i2c - A reference to an initialized I2C object
cspista 17:00a1379bd18a 291 * @param RST - The Reset pin name
cspista 17:00a1379bd18a 292 *
cspista 17:00a1379bd18a 293 * Optional parameters
cspista 17:00a1379bd18a 294 * @param i2cAddress - The i2c address of the display
cspista 17:00a1379bd18a 295 * @param rawHeight - The vertical number of pixels for the display, defaults to 32
cspista 17:00a1379bd18a 296 * @param rawWidth - The horizonal number of pixels for the display, defaults to 128
cspista 17:00a1379bd18a 297 */
cspista 17:00a1379bd18a 298 Adafruit_SH1106_I2c(I2C &i2c, PinName RST, uint8_t i2cAddress = SSD_I2C_ADDRESS, uint8_t rawHeight = 64, uint8_t rawWidth = 128)
cspista 17:00a1379bd18a 299 : Adafruit_SSD1306(RST, rawHeight, rawWidth)
cspista 17:00a1379bd18a 300 , mi2c(i2c)
cspista 17:00a1379bd18a 301 , mi2cAddress(i2cAddress)
cspista 17:00a1379bd18a 302 {
cspista 17:00a1379bd18a 303 begin();
cspista 17:00a1379bd18a 304 splash();
cspista 17:00a1379bd18a 305 display();
cspista 17:00a1379bd18a 306 };
cspista 17:00a1379bd18a 307
cspista 17:00a1379bd18a 308 virtual void command(uint8_t c)
cspista 17:00a1379bd18a 309 {
cspista 17:00a1379bd18a 310 char buff[2];
cspista 17:00a1379bd18a 311 buff[0] = 0; // Command Mode
cspista 17:00a1379bd18a 312 buff[1] = c;
cspista 17:00a1379bd18a 313 mi2c.write(mi2cAddress, buff, sizeof(buff));
cspista 17:00a1379bd18a 314 }
cspista 17:00a1379bd18a 315
cspista 17:00a1379bd18a 316 virtual void data(uint8_t c)
cspista 17:00a1379bd18a 317 {
cspista 17:00a1379bd18a 318 char buff[2];
cspista 17:00a1379bd18a 319 buff[0] = 0x40; // Data Mode
cspista 17:00a1379bd18a 320 buff[1] = c;
cspista 17:00a1379bd18a 321 mi2c.write(mi2cAddress, buff, sizeof(buff));
cspista 17:00a1379bd18a 322 };
cspista 17:00a1379bd18a 323
cspista 17:00a1379bd18a 324 protected:
cspista 17:00a1379bd18a 325 virtual void sendDisplayBuffer()
cspista 17:00a1379bd18a 326 {
cspista 17:00a1379bd18a 327
cspista 17:00a1379bd18a 328 char buff[256];
cspista 17:00a1379bd18a 329 char cmd[4] = {0, 0xB0, 0x02, 0x10};
cspista 19:1b773847a04b 330 for (uint8_t m = 0; m < _rawHeight/8; m++) {
cspista 17:00a1379bd18a 331 buff[0] = 0x40;
cspista 17:00a1379bd18a 332 cmd[1] = 0xB0 + m;
cspista 17:00a1379bd18a 333 for(int i=0; i<128; i++) {
cspista 17:00a1379bd18a 334 buff[i+1]= buffer[m*128+i];
cspista 17:00a1379bd18a 335 }
cspista 17:00a1379bd18a 336 mi2c.write(mi2cAddress, cmd, 4);
cspista 17:00a1379bd18a 337 mi2c.write(mi2cAddress, buff, 129);
cspista 17:00a1379bd18a 338 }
cspista 17:00a1379bd18a 339 };
cspista 17:00a1379bd18a 340
cspista 17:00a1379bd18a 341 I2C &mi2c;
cspista 17:00a1379bd18a 342 uint8_t mi2cAddress;
cspista 17:00a1379bd18a 343 };
cspista 17:00a1379bd18a 344
cspista 17:00a1379bd18a 345
cspista 17:00a1379bd18a 346
nkhorman 0:c3dcd4c4983a 347 #endif