acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

Arduino_SEPS525.h (1971B)

      1 /*
      2  * start rewrite from:
      3  * https://github.com/adafruit/Adafruit-GFX-Library.git
      4  */
      5 #ifndef _ARDUINO_SEPS525_H_
      6 #define _ARDUINO_SEPS525_H_
      7 
      8 #include <Arduino.h>
      9 #include <Print.h>
     10 #include "../Arduino_GFX.h"
     11 #include "../Arduino_TFT.h"
     12 
     13 #define SEPS525_TFTWIDTH 160  ///< SEPS525 max TFT width
     14 #define SEPS525_TFTHEIGHT 128 ///< SEPS525 max TFT height
     15 
     16 #define SEPS525_RST_DELAY 1
     17 
     18 #define SEPS525_INDEX 0x00
     19 #define SEPS525_STATUS_RD 0x01
     20 #define SEPS525_OSC_CTL 0x02
     21 #define SEPS525_IREF 0x80
     22 #define SEPS525_CLOCK_DIV 0x03
     23 #define SEPS525_REDUCE_CURRENT 0x04
     24 #define SEPS525_SOFT_RST 0x05
     25 #define SEPS525_DISP_ON_OFF 0x06
     26 #define SEPS525_PRECHARGE_TIME_R 0x08
     27 #define SEPS525_PRECHARGE_TIME_G 0x09
     28 #define SEPS525_PRECHARGE_TIME_B 0x0A
     29 #define SEPS525_PRECHARGE_CURRENT_R 0x0B
     30 #define SEPS525_PRECHARGE_CURRENT_G 0x0C
     31 #define SEPS525_PRECHARGE_CURRENT_B 0x0D
     32 #define SEPS525_DRIVING_CURRENT_R 0x10
     33 #define SEPS525_DRIVING_CURRENT_G 0x11
     34 #define SEPS525_DRIVING_CURRENT_B 0x12
     35 #define SEPS525_DISPLAY_MODE_SET 0x13
     36 #define SEPS525_RGB_IF 0x14
     37 #define SEPS525_RGB_POL 0x15
     38 #define SEPS525_MEMORY_WRITE_MODE 0x16
     39 #define SEPS525_MX1_ADDR 0x17
     40 #define SEPS525_MX2_ADDR 0x18
     41 #define SEPS525_MY1_ADDR 0x19
     42 #define SEPS525_MY2_ADDR 0x1a
     43 #define SEPS525_M_AP_X 0x20
     44 #define SEPS525_M_AP_Y 0x21
     45 #define SEPS525_RAMWR 0x22
     46 
     47 class Arduino_SEPS525 : public Arduino_TFT
     48 {
     49 public:
     50   Arduino_SEPS525(
     51       Arduino_DataBus *bus, int8_t rst = GFX_NOT_DEFINED, uint8_t r = 0,
     52       int16_t w = SEPS525_TFTWIDTH, int16_t h = SEPS525_TFTHEIGHT,
     53       uint8_t col_offset1 = 0, uint8_t row_offset1 = 0, uint8_t col_offset2 = 0, uint8_t row_offset2 = 0);
     54 
     55   bool begin(int32_t speed = GFX_NOT_DEFINED) override;
     56   void writeAddrWindow(int16_t x, int16_t y, uint16_t w, uint16_t h) override;
     57   void setRotation(uint8_t r) override;
     58   void invertDisplay(bool) override;
     59   void displayOn() override;
     60   void displayOff() override;
     61 
     62 protected:
     63   void tftInit() override;
     64 
     65 private:
     66 };
     67 
     68 #endif