Skip to content

Commit e65d88e

Browse files
author
Clang Robot
committed
Committing clang-format changes
1 parent 379bf62 commit e65d88e

File tree

28 files changed

+6578
-5042
lines changed

28 files changed

+6578
-5042
lines changed

src/Inkplate.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ void Inkplate::begin()
4444
// Init low level driver for EPD.
4545
initDriver(this);
4646

47-
// Forward the display mode to the EPD driver
48-
#ifdef MULTIPLE_DISPLAY_MODES
47+
// Forward the display mode to the EPD driver
48+
#ifdef MULTIPLE_DISPLAY_MODES
4949
selectDisplayMode(_mode);
50-
#endif
50+
#endif
5151

5252
// Clean frame buffers.
5353
clearDisplay();

src/Inkplate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
class Inkplate : public Graphics, public InkplateBoardClass, public NetworkController
3333
{
3434
public:
35-
#ifdef MULTIPLE_DISPLAY_MODES
35+
#ifdef MULTIPLE_DISPLAY_MODES
3636
Inkplate(uint8_t mode);
37-
#else
37+
#else
3838
Inkplate();
39-
#endif
39+
#endif
4040
void begin();
4141
void drawPixel(int16_t x, int16_t y, uint16_t color);
4242
void setRotation(uint8_t r);

src/boards/Inkplate2/Inkplate2Driver.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SPISettings epdSpiSettings(1000000UL, MSBFIRST, SPI_MODE0);
2323
*/
2424
void EPDDriver::writePixelInternal(int16_t x0, int16_t y0, uint16_t color)
2525
{
26-
if (x0 > _inkplate->width() - 1 || y0 > _inkplate->height() - 1 || x0 < 0 || y0 < 0)
26+
if (x0 > _inkplate->width() - 1 || y0 > _inkplate->height() - 1 || x0 < 0 || y0 < 0)
2727
return;
2828
if (color > 2)
2929
return;
@@ -49,7 +49,7 @@ void EPDDriver::writePixelInternal(int16_t x0, int16_t y0, uint16_t color)
4949
int _x = x0 / 8;
5050
int _xSub = x0 % 8;
5151

52-
int _position = E_INK_WIDTH/ 8 * y0 + _x;
52+
int _position = E_INK_WIDTH / 8 * y0 + _x;
5353

5454
// Clear both black and red frame buffer.
5555
*(DMemory4Bit + _position) |= (pixelMaskLUT[7 - _xSub]);
@@ -117,7 +117,6 @@ int EPDDriver::initDriver(Inkplate *_inkplatePtr)
117117
}
118118

119119

120-
121120
/**
122121
* @brief clearDisplay function clears memory buffer for display
123122
*
@@ -139,7 +138,7 @@ void EPDDriver::clearDisplay()
139138
*/
140139
void EPDDriver::display(bool _leaveOn)
141140
{
142-
// Wake the panel and wait a bit
141+
// Wake the panel and wait a bit
143142
// The refresh time is long anyway so this delay doesn't make much impact
144143
setPanelDeepSleep(false);
145144
delay(20);
@@ -166,7 +165,6 @@ void EPDDriver::display(bool _leaveOn)
166165
}
167166

168167

169-
170168
uint8_t EPDDriver::getPanelState()
171169
{
172170
return _panelState;
@@ -196,7 +194,7 @@ void EPDDriver::resetPanel()
196194
*/
197195
void EPDDriver::sendCommand(uint8_t _command)
198196
{
199-
digitalWrite(EPAPER_CS_PIN, LOW);
197+
digitalWrite(EPAPER_CS_PIN, LOW);
200198
digitalWrite(EPAPER_DC_PIN, LOW);
201199
delayMicroseconds(10);
202200
epdSPI.beginTransaction(epdSpiSettings);

src/boards/Inkplate2/Inkplate2Driver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class EPDDriver
3838

3939
double readBattery();
4040

41-
//RTC rtc;
41+
// RTC rtc;
4242

4343
ImageColor image;
4444

src/boards/Inkplate6/Inkplate6Driver.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ int EPDDriver::initDriver(Inkplate *_inkplatePtr)
108108
// Init the I2S driver. It will setup a I2S driver.
109109
I2SInit(myI2S);
110110

111-
// CONTROL PINS
111+
// CONTROL PINS
112112
pinMode(0, OUTPUT);
113113
pinMode(2, OUTPUT);
114114
pinMode(32, OUTPUT);
@@ -801,7 +801,6 @@ void EPDDriver::clean(uint8_t c, uint8_t rep)
801801
*/
802802
void EPDDriver::hscan_start(uint32_t _d)
803803
{
804-
805804
}
806805

807806
uint8_t EPDDriver::getDisplayMode()
@@ -862,10 +861,6 @@ void EPDDriver::gpioInit()
862861

863862
// And also disable uSD card supply
864863
internalIO.pinMode(SD_PMOS_PIN, INPUT);
865-
866-
867-
868-
869864
}
870865

871866
/**

src/boards/Inkplate6/waveforms.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{0, 0, 0, 0, 1, 1, 2, 0, 0}, {0, 0, 0, 0, 0, 0, 2, 0, 0}};
1010

1111

12-
#define E_INK_WIDTH 800
12+
#define E_INK_WIDTH 800
1313
#define E_INK_HEIGHT 600
1414
#endif
1515
#endif

src/boards/Inkplate6COLOR/Inkplate6COLORDriver.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ int EPDDriver::initDriver(Inkplate *_inkplatePtr)
108108
}
109109

110110

111-
112111
/**
113112
* @brief clearDisplay function clears memory buffer for display
114113
*
@@ -163,7 +162,6 @@ void EPDDriver::display(bool _leaveOn)
163162
}
164163

165164

166-
167165
uint8_t EPDDriver::getPanelState()
168166
{
169167
return _panelState;
@@ -190,7 +188,7 @@ void EPDDriver::setPanelState(uint8_t state)
190188
*/
191189
void EPDDriver::clean()
192190
{
193-
191+
194192
// Set resolution setting
195193
uint8_t res_set_data[] = {0x02, 0x58, 0x01, 0xc0};
196194
sendCommand(0x61);
@@ -394,7 +392,7 @@ bool EPDDriver::setPanelDeepSleep(bool _state)
394392
void EPDDriver::setIOExpanderForLowPower()
395393
{
396394
Wire.begin();
397-
internalIO.begin(IO_INT_ADDR);
395+
internalIO.begin(IO_INT_ADDR);
398396

399397
// TOUCHPAD PINS
400398
internalIO.pinMode(IO_PIN_B2, OUTPUT);
@@ -439,7 +437,6 @@ void EPDDriver::setIOExpanderForLowPower()
439437
}
440438

441439

442-
443440
/**
444441
* @brief sdCardInit initializes sd card trough SPI
445442
*

src/boards/Inkplate6COLOR/Inkplate6COLORDriver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class EPDDriver
5353

5454
IOExpander internalIO;
5555

56-
//RTC rtc;
56+
// RTC rtc;
5757

5858
ImageColor image;
5959

src/boards/Inkplate6FLICK/Inkplate6FLICKDriver.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void EPDDriver::display3b(bool leaveOn)
295295
*/
296296
void EPDDriver::display1b(bool leaveOn)
297297
{
298-
// Copy everything from partial buffer into main buffer.
298+
// Copy everything from partial buffer into main buffer.
299299
memcpy(DMemoryNew, _partial, E_INK_WIDTH * E_INK_HEIGHT / 8);
300300

301301
// Helper variables.
@@ -507,7 +507,6 @@ uint32_t EPDDriver::partialUpdate(bool _forced, bool leaveOn)
507507
_partialUpdateCounter++;
508508

509509
return changeCount;
510-
511510
}
512511

513512

@@ -782,7 +781,6 @@ void EPDDriver::clean(uint8_t c, uint8_t rep)
782781
*/
783782
void EPDDriver::hscan_start(uint32_t _d)
784783
{
785-
786784
}
787785

788786
uint8_t EPDDriver::getDisplayMode()
@@ -834,7 +832,7 @@ void EPDDriver::gpioInit()
834832
internalIO.pinMode(FRONTLIGHT_EN, OUTPUT);
835833

836834
// For same reason, unused pins of first I/O expander have to be also set as
837-
// outputs, low.
835+
// outputs, low.
838836
internalIO.pinMode(14, OUTPUT);
839837
internalIO.pinMode(15, OUTPUT);
840838
internalIO.digitalWrite(14, LOW);
@@ -855,10 +853,6 @@ void EPDDriver::gpioInit()
855853
internalIO.pinMode(OE, OUTPUT);
856854
internalIO.pinMode(GMOD, OUTPUT);
857855
internalIO.pinMode(SPV, OUTPUT);
858-
859-
860-
861-
862856
}
863857

864858
/**

src/boards/Inkplate6FLICK/pins.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
// Touchscreen defines
1313
#define TOUCHSCREEN_EN IO_PIN_B4
14-
#define TOUCHSCREEN_RST IO_PIN_B2
15-
#define TOUCHSCREEN_INT 36
14+
#define TOUCHSCREEN_RST IO_PIN_B2
15+
#define TOUCHSCREEN_INT 36
1616
#define TOUCHSCREEN_IO_EXPANDER IO_INT_ADDR
1717
#define TOUCHSCREEN_IO_REGS ioRegsInt
1818

0 commit comments

Comments
 (0)