Driver Library for our displays
Dependents: dm_bubbles dm_calc dm_paint dm_sdcard_with_adapter ... more
DmTftSsd2119.h
00001 /********************************************************************************************** 00002 Copyright (c) 2014 DisplayModule. All rights reserved. 00003 00004 Redistribution and use of this source code, part of this source code or any compiled binary 00005 based on this source code is permitted as long as the above copyright notice and following 00006 disclaimer is retained. 00007 00008 DISCLAIMER: 00009 THIS SOFTWARE IS SUPPLIED "AS IS" WITHOUT ANY WARRANTIES AND SUPPORT. DISPLAYMODULE ASSUMES 00010 NO RESPONSIBILITY OR LIABILITY FOR THE USE OF THE SOFTWARE. 00011 ********************************************************************************************/ 00012 00013 #ifndef DM_TFT_SSD2119_h 00014 #define DM_TFT_SSD2119_h 00015 00016 #include "DmTftBase.h" 00017 00018 class DmTftSsd2119 : public DmTftBase 00019 { 00020 public: 00021 #if defined (DM_TOOLCHAIN_ARDUINO) 00022 DmTftSsd2119(uint8_t cs, uint8_t dc); 00023 #elif defined (DM_TOOLCHAIN_MBED) 00024 DmTftSsd2119(PinName cs, PinName dc, PinName mosi, PinName miso, PinName clk); 00025 #endif 00026 virtual ~DmTftSsd2119(); 00027 virtual void init(void); 00028 virtual void setPixel(uint16_t x, uint16_t y, uint16_t color); 00029 00030 virtual void setAddress(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1); 00031 virtual void sendData(uint16_t data); 00032 00033 private: 00034 void send8BitData(uint8_t data); 00035 void writeBus(uint8_t data); 00036 00037 virtual void sendCommand(uint8_t index); 00038 00039 00040 static const uint16_t _width; 00041 static const uint16_t _height; 00042 #if defined (DM_TOOLCHAIN_ARDUINO) 00043 uint8_t _cs, _dc; 00044 regtype *_pinDC; 00045 regsize _bitmaskDC; 00046 uint8_t _spiSettings; 00047 #elif defined (DM_TOOLCHAIN_MBED) 00048 PinName _cs, _dc; 00049 DigitalOut *_pinDC; 00050 SPI spi; 00051 #endif 00052 }; 00053 00054 00055 #endif 00056 00057 00058
Generated on Wed Jul 13 2022 04:21:40 by 1.7.2