C++ DevKit
C++ set of OOP library
Loading...
Searching...
No Matches
commands_SSD1306.h
Go to the documentation of this file.
1
11
#pragma once
12
13
// a definir si besoin
14
// #define SSD1306_WRITE_MODE _u(0xFE)
15
// #define SSD1306_READ_MODE _u(0xFF)
16
17
// ---------- physical screen size ----------
19
#define SSD1306_HEIGHT 64
21
#define SSD1306_WIDTH 128
23
#define SSD1306_PAGE_HEIGHT _u(8)
25
#define SSD1306_NUM_PAGES (SSD1306_HEIGHT / SSD1306_PAGE_HEIGHT)
27
#define SSD1306_BUF_LEN (SSD1306_NUM_PAGES * SSD1306_WIDTH)
28
29
// ---------- SSD1306 commands (see datasheet)----------
32
#define I2C_CMD_FLAG 0x80
35
#define I2C_DATA_FLAG 0x40
36
37
// ----- Fundamental Commands -----
42
#define SSD1306_SET_CONTRAST _u(0x81)
44
#define SSD1306_SET_RAM_DISPLAY _u(0xA4)
46
#define SSD1306_SET_DISPLAY_ON _u(0xA5)
48
#define SSD1306_SET_NORM_DISP _u(0xA6)
50
#define SSD1306_SET_INV_DISP _u(0xA7)
52
#define SSD1306_SET_DISPLAY_SLEEP _u(0xAE)
54
#define SSD1306_SET_DISPLAY_NORMAL_ON _u(0xAF)
55
56
// ----- Scrolling commands -----
57
59
#define SSD1306_SET_R_HORIZ_SCROLL _u(0x26)
78
#define SSD1306_SET_L_HORIZ_SCROLL _u(0x27)
80
#define SSD1306_SET_VERTICAL_R_HORIZ_SCROLL _u(0x29)
100
#define SSD1306_SET_VERTICAL_L_HORIZ_SCROLL _u(0x2A)
101
111
#define SSD1306_SET_SCROLL_ON _u(0x2F)
//
112
115
#define SSD1306_SET_SCROLL_OFF _u(0x2E)
//
116
146
#define SSD1306_SET_VERTICAL_SCROLL_AREA _u(0xA3)
//
147
148
// ----- Addressing setting commands -----
169
#define SSD1306_SET_MEM_MODE _u(0x20)
//
170
171
// ----- Hardware Configuration (Panel resolution & layout related) Command -----
179
#define SSD1306_SET_DISP_START_LINE _u(0x40)
//
180
188
#define SSD1306_SET_COL_ADDR _u(0x21)
189
197
#define SSD1306_SET_PAGE_ADDR _u(0x22)
199
#define SSD1306_SET_SEG_NO_REMAP _u(0xA0)
201
#define SSD1306_SET_SEG_REMAP _u(0xA1)
207
#define SSD1306_SET_MUX_RATIO _u(0xA8)
208
210
#define SSD1306_SET_COM_OUT_DIR _u(0xC0)
212
#define SSD1306_SET_COM_OUT_DIR_REMAP _u(0xC8)
216
#define SSD1306_SET_DISP_OFFSET _u(0xD3)
217
243
#define SSD1306_SET_COM_PIN_CFG _u(0xDA)
244
245
// ----- Timing & Driving Scheme Setting Command -----
260
#define SSD1306_SET_DISP_CLK_DIV _u(0xD5)
//
261
269
#define SSD1306_SET_PRECHARGE _u(0xD9)
//
275
#define SSD1306_SET_VCOM_DESEL _u(0xDB)
//
276
278
#define SSD1306_NOP _u(0xE3)
279
280
// ----- Charge Pump Command -----
281
298
#define SSD1306_SET_CHARGE_PUMP _u(0x8D)
299
// ----------------------------------------------------------------------------------------------------
300
src
device
SSD1306
commands_SSD1306.h
Generated by
1.13.1