Skip to content

Commit

Permalink
Add custom SSD mode
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlohr committed Feb 10, 2025
1 parent fc254fe commit e623034
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extralibs/ssd1306.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
// comfortable packet size for this OLED
#define SSD1306_PSZ 32

#if defined (SSD1306_CUSTOM)
// Let the caller configure the OLED.
#else
// characteristics of each type
#if !defined (SSD1306_64X32) && !defined (SSD1306_128X32) && !defined (SSD1306_128X64) && !defined (SH1107_128x128) && !(defined(SSD1306_W) && defined(SSD1306_H) && defined(SSD1306_OFFSET) )
#error "Please define the SSD1306_WXH resolution used in your application"
Expand Down Expand Up @@ -47,6 +50,8 @@
#define SSD1306_OFFSET 0
#endif

#endif

/*
* send OLED command byte
*/
Expand Down Expand Up @@ -151,7 +156,9 @@ const uint8_t ssd1306_init_array[] =
SSD1306_SETVCOMDETECT, // 0xDB
0x40,
SSD1306_DISPLAYALLON_RESUME, // 0xA4
#ifndef SSD1327
SSD1306_NORMALDISPLAY, // 0xA6
#endif
SSD1306_DISPLAYON, // 0xAF --turn on oled panel
#endif
SSD1306_TERMINATE_CMDS // 0xFF --fake command to mark end
Expand Down

0 comments on commit e623034

Please sign in to comment.