1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-22 23:56:13 +01:00

Bump up I2C speed

Speed was 100kHz (default).  Max for OLEDis 400kHz.
This commit is contained in:
Neil McKechnie 2021-02-21 12:30:54 +00:00
parent b36db29edb
commit 1c1168f433
2 changed files with 9 additions and 0 deletions

View File

@ -30,6 +30,7 @@ SSD1306AsciiWire LCDDriver;
LCDDisplay::LCDDisplay() {
// Scan for device on 0x3c and 0x3d.
Wire.begin();
Wire.setClock(400000); // This should really be done centrally somewhere!!
for (byte address=0x3c; address<=0x3d; address++) {
Wire.beginTransmission(address);
byte error = Wire.endTransmission(true);

8
mySetup.h Normal file
View File

@ -0,0 +1,8 @@
//SETUP("D WIFI ON");
//SETUP("D WIT ON");
Wire.begin();
Wire.setClock(400000);
LCD(3,F("192.168.4.1"));
LCD(4,F(__DATE__));
LCD(5,F(__TIME__));