Skip to content

Commit 1189a35

Browse files
Merge pull request #276 from lacklustrlabs/Adafruit_SSD1306_STM32_swap
Add swap() function to ssd1306_128x64_i2c_STM32 as example would not build…
2 parents 8096bb6 + 1d29d13 commit 1189a35

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

STM32F1/libraries/Adafruit_SSD1306/Adafruit_SSD1306_STM32.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ HardWire HWIRE(2,I2C_FAST_MODE); // I2c2
2929
#include "Adafruit_GFX.h"
3030
#include "Adafruit_SSD1306_STM32.h"
3131

32+
#ifndef swap
33+
#define swap(a, b) { int16_t t = a; a = b; b = t; }
34+
#endif
35+
3236
// the memory buffer for the LCD
3337

3438
static uint8_t buffer[SSD1306_LCDHEIGHT * SSD1306_LCDWIDTH / 8] = {

0 commit comments

Comments
 (0)