Skip to content

Commit

Permalink
Alternative SSD1362 display
Browse files Browse the repository at this point in the history
  • Loading branch information
tigert committed Jan 30, 2024
1 parent 7204a84 commit 6fe5a06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions GNC255/GNC255.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,19 @@ void GNC255::attach()
Next call the constructor of your custom device
adapt it to the needs of your constructor
********************************************************************************** */
if (!FitInMemory(sizeof(U8G2_SSD1322_NHD_256X64_F_4W_SW_SPI))) {
// if (!FitInMemory(sizeof(U8G2_SSD1322_NHD_256X64_F_4W_SW_SPI))) {
if (!FitInMemory(sizeof(U8G2_SSD1362_256X64_F_4W_HW_SPI))) {
// Error Message to Connector
cmdMessenger.sendCmd(kStatus, F("Custom Device does not fit in Memory"));
return;
}

/* SSD1322 */
//_oledDisplay = new (allocateMemory(sizeof(U8G2_SSD1322_NHD_256X64_F_4W_SW_SPI))) U8G2_SSD1322_NHD_256X64_F_4W_SW_SPI(U8G2_R0, _clk, _data, _cs, _dc);
_oledDisplay = new (allocateMemory(sizeof(U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI))) U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI(U8G2_R0, 53, _dc, _reset);
//_oledDisplay = new (allocateMemory(sizeof(U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI))) U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI(U8G2_R0, 53, _dc, _reset);

// Surenoo SOG25664B2 (SSD1362) 7pin module
_oledDisplay = new (allocateMemory(sizeof(U8G2_SSD1362_256X64_F_4W_HW_SPI))) U8G2_SSD1362_256X64_F_4W_HW_SPI(U8G2_R0, _cs, _dc, _reset);
begin();
}

Expand Down
4 changes: 3 additions & 1 deletion GNC255/GNC255.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class GNC255

private:
// U8G2_SSD1322_NHD_256X64_F_4W_SW_SPI *_oledDisplay;
U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI *_oledDisplay;
// U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI *_oledDisplay;
/* Surenoo SOG25664B2 (SSD1362) 7pin module */
U8G2_SSD1362_256X64_F_4W_HW_SPI *_oledDisplay;
bool _initialised;
uint8_t _clk, _data, _cs, _dc, _reset;
bool _hasChanged;
Expand Down

0 comments on commit 6fe5a06

Please sign in to comment.