-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
3,057 additions
and
1,800 deletions.
There are no files selected for viewing
Empty file.
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
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,50 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
#include "freertos/FreeRTOS.h" | ||
#include "esp_system.h" | ||
#include <stdint.h> | ||
#include <math.h> | ||
#include "sdkconfig.h" | ||
#include "esp_log.h" | ||
#include <string> | ||
#include <epdParallel.h> | ||
#include <Adafruit_GFX.h> | ||
#include <epdspi.h> | ||
#include "epd_driver.h" | ||
#include "epd_highlevel.h" | ||
#include "parallel/grayscales.h" | ||
|
||
#define HAS_16_LEVELS_GRAY 1 | ||
#define ED060SC4_WIDTH 800 | ||
#define ED060SC4_HEIGHT 600 | ||
|
||
class Ed060SC4 : public EpdParallel | ||
{ | ||
public: | ||
Ed060SC4(); | ||
|
||
uint8_t *framebuffer; | ||
uint8_t colors_supported = 1; | ||
|
||
void drawPixel(int16_t x, int16_t y, uint16_t color); // Override GFX own drawPixel method | ||
|
||
void init(bool debug = false); | ||
void clearScreen(); | ||
void clearArea(EpdRect area); | ||
void powerOn(); | ||
void powerOff(); | ||
|
||
void fillScreen(uint16_t color); | ||
void update(enum EpdDrawMode mode = MODE_GC16); | ||
|
||
// Partial update of rectangle from buffer to screen, does not power off | ||
void updateWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h, enum EpdDrawMode mode = MODE_EPDIY_BLACK_TO_GL16, bool using_rotation = true); | ||
|
||
private: | ||
EpdiyHighlevelState hl; | ||
bool _tempalert = false; | ||
bool _initial = true; | ||
bool _debug_buffer = false; | ||
void _rotate(uint16_t& x, uint16_t& y, uint16_t& w, uint16_t& h); | ||
}; |
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,9 @@ | ||
// COLOR defines (Only 8 but actually this epapers have 16 levels) | ||
#define EPD_WHITE 255 | ||
#define EPD_WHITISH 223 | ||
#define EPD_SLGRAY 200 | ||
#define EPD_LGRAY 150 | ||
#define EPD_GRAY 100 | ||
#define EPD_DGRAY 50 | ||
#define EPD_SDGRAY 25 | ||
#define EPD_BLACK 0 |
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
Oops, something went wrong.