Adafruit SSD1306
Macros
Adafruit_SSD1306.cpp File Reference
#include <util/delay.h>
#include "Adafruit_SSD1306.h"
#include "splash.h"
#include <Adafruit_GFX.h>

Macros

#define pgm_read_byte(addr)   (*(const unsigned char *)(addr))
 PROGMEM workaround for non-AVR.
 
#define WIRE_MAX   32
 Use common Arduino core default.
 
#define ssd1306_swap(a, b)   (((a) ^= (b)), ((b) ^= (a)), ((a) ^= (b)))
 No-temp-var swap operation.
 
#define WIRE_WRITE   wire->send
 Wire write function in older Arduino lib.
 
#define SSD1306_SELECT   digitalWrite(csPin, LOW);
 Device select.
 
#define SSD1306_DESELECT   digitalWrite(csPin, HIGH);
 Device deselect.
 
#define SSD1306_MODE_COMMAND   digitalWrite(dcPin, LOW);
 Command mode.
 
#define SSD1306_MODE_DATA   digitalWrite(dcPin, HIGH);
 Data mode.
 
#define SETWIRECLOCK
 Dummy stand-in define.
 
#define RESWIRECLOCK
 keeps compiler happy
 
#define SPI_TRANSACTION_START
 Dummy stand-in define.
 
#define SPI_TRANSACTION_END
 keeps compiler happy
 
#define TRANSACTION_START
 Wire, SPI or bitbang transfer setup. More...
 
#define TRANSACTION_END
 Wire, SPI or bitbang transfer end. More...
 

Macro Definition Documentation

◆ TRANSACTION_START

#define TRANSACTION_START
Value:
if (wire) { \
SETWIRECLOCK; \
} else { \
if (spi) { \
SPI_TRANSACTION_START; \
} \
SSD1306_SELECT; \
}

Wire, SPI or bitbang transfer setup.

◆ TRANSACTION_END

#define TRANSACTION_END
Value:
if (wire) { \
RESWIRECLOCK; \
} else { \
SSD1306_DESELECT; \
if (spi) { \
SPI_TRANSACTION_END; \
} \
}

Wire, SPI or bitbang transfer end.