Skip to content

Commit 5b7faa6

Browse files
committed
adagfxswap broke. Fixed
adagfxswap disappeared from Adafruit_GFX. Added a local word swap macro to fix the problem
1 parent c37d510 commit 5b7faa6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Adafruit_SSD1325.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ BSD license, check license.txt for more information
1616
All text above, and the splash screen below must be included in any redistribution
1717
*********************************************************************/
1818

19+
#define wordswap(a, b) { int16_t t = a; a = b; b = t; }
20+
1921
#ifdef __AVR__
2022
#include <avr/pgmspace.h>
2123
#include <util/delay.h>
@@ -117,15 +119,15 @@ void Adafruit_SSD1325::drawPixel(int16_t x, int16_t y, uint16_t color) {
117119
// check rotation, move pixel around if necessary
118120
switch (getRotation()) {
119121
case 1:
120-
adagfxswap(x, y);
122+
wordswap(x, y);
121123
x = WIDTH - x - 1;
122124
break;
123125
case 2:
124126
x = WIDTH - x - 1;
125127
y = HEIGHT - y - 1;
126128
break;
127129
case 3:
128-
adagfxswap(x, y);
130+
wordswap(x, y);
129131
y = HEIGHT - y - 1;
130132
break;
131133
}

0 commit comments

Comments
 (0)