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_RTLPAR8.h (2699B)
1 #ifdef RTL8722DM 2 3 #ifndef _ARDUINO_RTLPAR8_H_ 4 #define _ARDUINO_RTLPAR8_H_ 5 6 #include "Arduino_DataBus.h" 7 8 class Arduino_RTLPAR8 : public Arduino_DataBus 9 { 10 public: 11 Arduino_RTLPAR8( 12 int8_t dc, int8_t cs, int8_t wr, int8_t rd, 13 int8_t d0, int8_t d1, int8_t d2, int8_t d3, int8_t d4, int8_t d5, int8_t d6, int8_t d7); // Constructor 14 15 bool begin(int32_t speed = GFX_NOT_DEFINED, int8_t dataMode = GFX_NOT_DEFINED) override; 16 void beginWrite() override; 17 void endWrite() override; 18 void writeCommand(uint8_t) override; 19 void writeCommand16(uint16_t) override; 20 void write(uint8_t) override; 21 void write16(uint16_t) override; 22 void writeRepeat(uint16_t p, uint32_t len) override; 23 void writePixels(uint16_t *data, uint32_t len) override; 24 25 void writeC8D8(uint8_t c, uint8_t d) override; 26 void writeC8D16(uint8_t c, uint16_t d) override; 27 void writeC8D16D16(uint8_t c, uint16_t d1, uint16_t d2) override; 28 void writeBytes(uint8_t *data, uint32_t len) override; 29 void writePattern(uint8_t *data, uint8_t len, uint32_t repeat) override; 30 31 void writeIndexedPixels(uint8_t *data, uint16_t *idx, uint32_t len) override; 32 void writeIndexedPixelsDouble(uint8_t *data, uint16_t *idx, uint32_t len) override; 33 34 protected: 35 private: 36 INLINE void WRITE(uint8_t d); 37 INLINE void DC_HIGH(void); 38 INLINE void DC_LOW(void); 39 INLINE void CS_HIGH(void); 40 INLINE void CS_LOW(void); 41 42 int8_t _dc, _cs, _wr, _rd; 43 int8_t _d0, _d1, _d2, _d3, _d4, _d5, _d6, _d7; 44 45 PORTreg_t _dcPort; ///< PORT register for data/command 46 ARDUINOGFX_PORT_t _dcPinMaskSet; ///< Bitmask for data/command SET (OR) 47 ARDUINOGFX_PORT_t _dcPinMaskClr; ///< Bitmask for data/command CLEAR (AND) 48 49 PORTreg_t _csPort; ///< PORT register for data/command 50 ARDUINOGFX_PORT_t _csPinMaskSet; ///< Bitmask for data/command SET (OR) 51 ARDUINOGFX_PORT_t _csPinMaskClr; ///< Bitmask for data/command CLEAR (AND) 52 53 PORTreg_t _wrPort; ///< PORT register for data/command 54 ARDUINOGFX_PORT_t _wrPinMaskSet; ///< Bitmask for data/command SET (OR) 55 ARDUINOGFX_PORT_t _wrPinMaskClr; ///< Bitmask for data/command CLEAR (AND) 56 57 PORTreg_t _rdPort; ///< PORT register for data/command 58 ARDUINOGFX_PORT_t _rdPinMaskSet; ///< Bitmask for data/command SET (OR) 59 ARDUINOGFX_PORT_t _rdPinMaskClr; ///< Bitmask for data/command CLEAR (AND) 60 61 PORTreg_t _dataPort; ///< PORT register for data/command 62 ARDUINOGFX_PORT_t _dataPinMaskClr; ///< Bitmask for data/command CLEAR (AND) 63 64 // Lookup table for ESP32 parallel bus interface uses 1kbyte RAM, 65 uint32_t _xset_mask[256]; 66 }; 67 68 #endif // _ARDUINO_RTLPAR8_H_ 69 70 #endif // #ifdef RTL8722DM