-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added SSD1680 Support #1
Open
jeofo
wants to merge
1
commit into
mongoose-os-libs:master
Choose a base branch
from
jeofo:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#ifndef LIB_ADAFRUIT_SSD1680 | ||
#define LIB_ADAFRUIT_SSD1680 | ||
|
||
#include <Arduino.h> | ||
|
||
#include "Adafruit_EPD.h" | ||
|
||
#define SSD1680_DRIVER_CONTROL 0x01 | ||
#define SSD1680_GATE_VOLTAGE 0x03 | ||
#define SSD1680_SOURCE_VOLTAGE 0x04 | ||
#define SSD1680_PROGOTP_INITIAL 0x08 | ||
#define SSD1680_PROGREG_INITIAL 0x09 | ||
#define SSD1680_READREG_INITIAL 0x0A | ||
#define SSD1680_BOOST_SOFTSTART 0x0C | ||
#define SSD1680_DEEP_SLEEP 0x10 | ||
#define SSD1680_DATA_MODE 0x11 | ||
#define SSD1680_SW_RESET 0x12 | ||
#define SSD1680_TEMP_CONTROL 0x18 | ||
#define SSD1680_TEMP_WRITE 0x1A | ||
#define SSD1680_MASTER_ACTIVATE 0x20 | ||
#define SSD1680_DISP_CTRL1 0x21 | ||
#define SSD1680_DISP_CTRL2 0x22 | ||
#define SSD1680_WRITE_RAM1 0x24 | ||
#define SSD1680_WRITE_RAM2 0x26 | ||
#define SSD1680_WRITE_VCOM 0x2C | ||
#define SSD1680_READ_OTP 0x2D | ||
#define SSD1680_READ_STATUS 0x2F | ||
#define SSD1680_WRITE_LUT 0x32 | ||
#define SSD1680_WRITE_BORDER 0x3C | ||
#define SSD1680_SET_RAMXPOS 0x44 | ||
#define SSD1680_SET_RAMYPOS 0x45 | ||
#define SSD1680_SET_RAMXCOUNT 0x4E | ||
#define SSD1680_SET_RAMYCOUNT 0x4F | ||
|
||
/**************************************************************************/ | ||
/*! | ||
@brief Class for interfacing with SSD1680 EPD drivers | ||
*/ | ||
/**************************************************************************/ | ||
class Adafruit_SSD1680 : public Adafruit_EPD { | ||
public: | ||
Adafruit_SSD1680(int width, int height, int16_t SID, int16_t SCLK, int16_t DC, int16_t RST, int16_t CS, int16_t SRCS, int16_t MISO, int16_t BUSY = -1); | ||
Adafruit_SSD1680(int width, int height, int16_t DC, int16_t RST, int16_t CS, int16_t SRCS, int16_t BUSY = -1); | ||
|
||
void begin(bool reset = true); | ||
void powerUp(); | ||
void update(); | ||
void powerDown(); | ||
|
||
protected: | ||
uint8_t writeRAMCommand(uint8_t index); | ||
void setRAMAddress(uint16_t x, uint16_t y); | ||
void busy_wait(); | ||
|
||
int8_t _xram_offset = 1; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we keep this file unchanged?
all examples are currently configured to use
SSD1675
and there's no necessity to change this