3#include "platform/Stream.h"
54#define SSD1308_SA0 0x78
55#define SSD1308_SA1 0x7A
56#define SSD1308_DEF_SA SSD1308_SA0
61#define PAGES (ROWS / 8)
62#define MAX_PAGE (PAGES - 1)
63#define MAX_ROW (ROWS - 1)
64#define MAX_COL (COLUMNS - 1)
67#define CHARS (COLUMNS / FONT8x8_WIDTH)
70#define COMMAND_MODE 0x80
74#define SET_LOWER_COLUMN 0x00
75#define SET_HIGHER_COLUMN 0x10
77#define HORIZONTAL_ADDRESSING_MODE 0x00
78#define VERTICAL_ADDRESSING_MODE 0x01
79#define PAGE_ADDRESSING_MODE 0x02
80#define SET_MEMORY_ADDRESSING_MODE 0x20
82#define SET_COLUMN_ADDRESS 0x21
83#define SET_PAGE_ADDRESS 0x22
86#define FADE_INTERVAL_8_FRAMES 0x00
87#define FADE_INTERVAL_16_FRAMES 0x01
88#define FADE_INTERVAL_24_FRAMES 0x02
89#define FADE_INTERVAL_32_FRAMES 0x03
90#define FADE_INTERVAL_64_FRAMES 0x07
91#define FADE_INTERVAL_128_FRAMES 0x0F
92#define FADE_BLINK_DISABLE 0x00
93#define FADE_OUT_ENABLE 0x20
94#define BLINK_ENABLE 0x30
95#define SET_FADE_BLINK 0x23
99#define SET_DISPLAY_START_LINE 0x40
101#define SET_CONTRAST 0x81
103#define SET_SEGMENT_REMAP_0 0xA0
104#define SET_SEGMENT_REMAP_127 0xA1
106#define SET_DISPLAY_GDDRAM 0xA4
107#define SET_ENTIRE_DISPLAY_ON 0xA5
109#define SET_NORMAL_DISPLAY 0xA6
110#define SET_INVERSE_DISPLAY 0xA7
112#define SET_MULTIPLEX_RATIO 0xA8
114#define EXTERNAL_IREF 0x10
115#define INTERNAL_IREF 0x00
116#define SET_IREF_SELECTION 0xAD
118#define SET_DISPLAY_POWER_OFF 0xAE
119#define SET_DISPLAY_POWER_ON 0xAF
129#define SET_PAGE_START_ADDRESS 0xB0
131#define SET_COMMON_REMAP_0 0xC0
132#define SET_COMMON_REMAP_63 0xC8
134#define SET_DISPLAY_OFFSET 0xD3
136#define SET_DISPLAY_CLOCK 0xD5
140#define SET_PRECHARGE_TIME 0xD9
145#define COMMON_BASE 0x02
146#define COMMON_SEQUENTIAL 0x00
147#define COMMON_ALTERNATIVE 0x10
148#define COMMON_LEFTRIGHT_NORMAL 0x00
149#define COMMON_LEFTRIGHT_FLIP 0x20
150#define SET_COMMON_CONF 0xDA
153#define VCOMH_DESELECT_0_65_CODE 0x00
154#define VCOMH_DESELECT_0_77_CODE 0x20
155#define VCOMH_DESELECT_0_83_CODE 0x30
156#define SET_VCOMH_DESELECT_LEVEL 0xDB
160#define SCROLL_INTERVAL_5_FRAMES 0x00
161#define SCROLL_INTERVAL_64_FRAMES 0x01
162#define SCROLL_INTERVAL_128_FRAMES 0x02
163#define SCROLL_INTERVAL_256_FRAMES 0x03
164#define SCROLL_INTERVAL_3_FRAMES 0x04
165#define SCROLL_INTERVAL_4_FRAMES 0x05
166#define SCROLL_INTERVAL_25_FRAMES 0x06
167#define SCROLL_INTERVAL_2_FRAMES 0x07
169#define SET_RIGHT_HOR_SCROLL 0x26
170#define SET_LEFT_HOR_SCROLL 0x27
172#define SET_VERT_RIGHT_HOR_SCROLL 0x29
173#define SET_VERT_LEFT_HOR_SCROLL 0x2A
175#define SET_DEACTIVATE_SCROLL 0x2E
176#define SET_ACTIVATE_SCROLL 0x2F
178#define SET_VERTICAL_SCROLL_AREA 0xA3
252 uint8_t start_page=0, uint8_t end_page=
MAX_PAGE,
253 uint8_t start_col=0, uint8_t end_col=
MAX_COL);
264 uint8_t start_page=0, uint8_t end_page=
MAX_PAGE,
265 uint8_t start_col=0, uint8_t end_col=
MAX_COL);
478 uint8_t
offset, uint8_t interval);
499 void _sendCommand(uint8_t command);
503 void _sendCommand(uint8_t command, uint8_t param1);
507 void _sendCommand(uint8_t command, uint8_t param1, uint8_t param2);
512 void _sendCommand(uint8_t command, uint8_t param1, uint8_t param2,
513 uint8_t param3, uint8_t param4,
518 void _sendCommand(uint8_t command, uint8_t param1, uint8_t param2,
519 uint8_t param3, uint8_t param4,
520 uint8_t param5, uint8_t param6);
526 bool _sendData(uint8_t
data);
533 void _sendData(uint8_t len, uint8_t*
data);
542 uint8_t _writeOpcode;
int data[]
Definition Map_placement_new.cpp:1
#define SSD1308_DEF_SA
Definition SSD1308.h:56
#define MAX_PAGE
Definition SSD1308.h:62
#define MAX_COL
Definition SSD1308.h:64
void setDisplayOn()
Enable Display.
Definition SSD1308.cpp:838
void setDisplayNormal()
Show White pixels on Black background.
Definition SSD1308.cpp:861
void setDisplayOff()
Disable Display.
Definition SSD1308.cpp:844
void writeProgressBar(uint8_t page, uint8_t col, int percentage)
write a level meter to the display, Width is (PRG_MAX_SCALE + 2) pixels
Definition SSD1308.cpp:256
virtual int _putc(int value)
Definition SSD1308.h:310
void setEntireDisplay(bool on)
Shows Pixels On or as RAM content.
Definition SSD1308.cpp:954
void setDisplayClock(uint8_t divideRatio, uint8_t oscFreq)
void setMultiplexRatio(uint8_t lines)
void setDisplayScroll(bool on)
Activate or Deactivate Horizontal and Vertical scroll.
Definition SSD1308.cpp:1016
void setDisplayBlink(bool on)
Blink display by fading in and out over a set number of frames.
Definition SSD1308.cpp:874
void setDisplayInverse()
Show Black pixels on White background.
Definition SSD1308.cpp:867
void initialize()
High level Init, most settings remain at Power-On reset value.
Definition SSD1308.cpp:76
virtual int _getc()
Definition SSD1308.h:311
void fillDisplay(uint8_t pattern=0x00, uint8_t start_page=0, uint8_t end_page=MAX_PAGE, uint8_t start_col=0, uint8_t end_col=MAX_COL)
fill the display
Definition SSD1308.cpp:140
void setHorizontalAddressingMode()
Set Horizontal Addressing Mode (cursor incr left-to-right, top-to-bottom)
Definition SSD1308.cpp:746
void setDisplayFade(bool on)
Fade out display in set number of frames.
Definition SSD1308.cpp:887
void setPrechargePeriod(uint8_t phase1, uint8_t phase2)
void setVcomhDeselectLevel(uint8_t level)
void writeLevelBar(uint8_t page, uint8_t col, int percentage)
write a level meter to the display, Width is (PRG_MAX_SCALE + 2) pixels
Definition SSD1308.cpp:340
void setContrastControl(uint8_t contrast)
Set Contrast.
Definition SSD1308.cpp:831
void writeString(uint8_t row, uint8_t col, const char *txt)
Write a string to the display using the 8x8 font.
Definition SSD1308.cpp:446
void writeBitmap(uint8_t *data, uint8_t start_page=0, uint8_t end_page=MAX_PAGE, uint8_t start_col=0, uint8_t end_col=MAX_COL)
write a bitmap to the display
Definition SSD1308.cpp:196
void setPageAddressingMode()
Set Page Addressing Mode (cursor incr left-to-right)
Definition SSD1308.cpp:760
void setEntireDisplayOn()
Shows All Pixels On.
Definition SSD1308.cpp:941
void setEntireDisplayRAM()
Shows Pixels as RAM content.
Definition SSD1308.cpp:947
void setInverted(bool inverted)
Definition SSD1308.h:285
void writeBigChar(uint8_t row, uint8_t col, char chr)
Write large character (16x24 font)
Definition SSD1308.cpp:486
void setInternalIref()
Sets Internal Iref.
Definition SSD1308.cpp:923
void setContinuousVerticalAndHorizontalScroll(bool left, uint8_t start_page, uint8_t end_page, uint8_t offset, uint8_t interval)
Horizontal and Vertical scroll by one column per interval.
Definition SSD1308.cpp:988
void setColumnStartForPageAddressingMode(uint8_t column)
Set Column Start (for Page Addressing Mode only)
Definition SSD1308.cpp:806
void setExternalIref()
Sets External Iref (default)
Definition SSD1308.cpp:932
void setPageAddress(uint8_t start, uint8_t end)
Definition SSD1308.cpp:776
void setPageStartForPageAddressingMode(uint8_t page)
Set Page Start (for Page Addressing Mode only)
Definition SSD1308.cpp:819
void setVerticalScrollArea(uint8_t topRowsFixed, uint8_t scrollRows)
Set Vertical scroll area.
Definition SSD1308.cpp:1003
void clearDisplay()
clear the display
Definition SSD1308.cpp:91
void setVerticalAddressingMode()
Set Vertical Addressing Mode (cursor incr top-to-bottom, left-to-right)
Definition SSD1308.cpp:753
void setDisplayPower(bool on)
Enable or Disable Display.
Definition SSD1308.cpp:851
void setMemoryAddressingMode(uint8_t mode)
Set Addressing Mode.
Definition SSD1308.cpp:767
void setContinuousHorizontalScroll(bool left, uint8_t start_page, uint8_t end_page, uint8_t interval)
Horizontal scroll by one column per interval.
Definition SSD1308.cpp:970
int writeChar(char chr)
Write single character to the display using the 8x8 fontable.
Definition SSD1308.cpp:421
void setColumnAddress(uint8_t start, uint8_t end)
Definition SSD1308.cpp:785
void setDisplayStartLine(uint8_t line)
Set Display StartLine, takes one byte, 0x00-0x3F.
Definition SSD1308.cpp:794
void setDisplayOffset(uint8_t offset)
void setDisplayFlip(bool left, bool down)
Display Flip (Left/Right, Up/Down)
Definition SSD1308.cpp:900
void lines()
Definition geo_hyperplane.cpp:88
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate offset
Definition gnuplot_common_settings.hh:64
uint8_t level
Definition ref_serial.h:254