Skip to content

Commit

Permalink
Adjust divider
Browse files Browse the repository at this point in the history
Update OLED.cpp
  • Loading branch information
Ralim committed Jun 27, 2023
1 parent 0a3dfb3 commit 5d04df3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/Core/Drivers/OLED.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
Expand Down
5 changes: 3 additions & 2 deletions source/Core/Drivers/OLED.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5d04df3

Please sign in to comment.