1
0
forked from me/IronOS

Adjust divider

Update OLED.cpp
This commit is contained in:
Ben V. Brown
2023-06-27 20:52:17 +10:00
parent 0a3dfb34ec
commit 5d04df39e0
2 changed files with 4 additions and 3 deletions

View File

@@ -32,7 +32,7 @@ uint32_t OLED::displayChecksum;
I2C_CLASS::I2C_REG OLED_Setup_Array[] = {
/**/
{0x80, 0xAE, 0}, /*Display off*/
{0x80, 0xD3, 0}, /*Set display clock divide ratio / osc freq*/
{0x80, OLED_DIVIDER, 0}, /*Set display clock divide ratio / osc freq*/
{0x80, 0x52, 0}, /*Divide ratios*/
{0x80, 0xA8, 0}, /*Set Multiplex Ratio*/
{0x80, OLED_HEIGHT - 1, 0}, /*Multiplex ratio adjusts how far down the matrix it scans*/

View File

@@ -46,6 +46,7 @@ extern "C" {
#define OLED_VCOM_LAYOUT 0x12
#define OLED_SEGMENT_MAP_REVERSED
#define OLED_DIVIDER 0xD3
#else
#define OLED_WIDTH 96
#define OLED_HEIGHT 16
@@ -55,8 +56,8 @@ extern "C" {
#define OLED_GRAM_END 0x7F
#define OLED_GRAM_START_FLIP 0
#define OLED_GRAM_END_FLIP 95
#define OLED_SEGMENT_MAP 0xA0
#define OLED_DIVIDER 0xD5
#define OLED_SEGMENT_MAP 0xA0
#endif
#define FRAMEBUFFER_START 17