Modified version of the DmTftLibrary, optimized for the LPC4088 Experiment Base Board
Dependents: lpc4088_ebb_dm_calc lpc4088_ebb_dm_bubbles
Fork of DmTftLibrary by
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(uint8_t cs=D10, uint8_t dc=D9, uint8_t miso=D12, uint8_t mosi=D11, uint8_t clk=D13); 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 uint8_t _cs, _dc; 00040 static const uint16_t _width; 00041 static const uint16_t _height; 00042 #if defined (DM_TOOLCHAIN_ARDUINO) 00043 regtype *_pinDC; 00044 regsize _bitmaskDC; 00045 uint8_t _spiSettings; 00046 #elif defined (DM_TOOLCHAIN_MBED) 00047 uint8_t _miso, _mosi, _clk; 00048 DigitalOut *_pinDC; 00049 SPI *_spi; 00050 #endif 00051 }; 00052 00053 00054 #endif 00055 00056 00057
Generated on Tue Jul 12 2022 19:30:31 by 1.7.2