Driver Library for our displays

Dependents:   dm_bubbles dm_calc dm_paint dm_sdcard_with_adapter ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DmTftIli9325.h Source File

DmTftIli9325.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_ILI9325_h
00014 #define DM_TFT_ILI9325_h
00015 
00016 #include "DmTftBase.h"
00017 
00018 class DmTftIli9325 : public DmTftBase
00019 {
00020 public:
00021 #if defined (DM_TOOLCHAIN_ARDUINO)
00022   DmTftIli9325(uint8_t wr=A4, uint8_t cs=A3, uint8_t dc=A5, uint8_t rst=A2);
00023 #elif defined (DM_TOOLCHAIN_MBED)  
00024   DmTftIli9325(PinName wr, PinName cs, PinName dc, PinName rst);
00025 #endif   
00026   virtual ~DmTftIli9325();
00027   virtual void init(void);
00028 private:
00029   void send8BitData(uint8_t data);
00030   void writeBus(uint8_t data);
00031 
00032   virtual void setAddress(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1);
00033   virtual void sendCommand(uint8_t index);
00034   virtual void sendData(uint16_t data);
00035 
00036   
00037   static const uint16_t _width;
00038   static const uint16_t _height;
00039 #if defined (DM_TOOLCHAIN_ARDUINO)
00040   uint8_t _wr, _cs, _dc, _rst;
00041   regtype *_pinDC, *_pinRST, *_pinWR;
00042   regsize _bitmaskDC, _bitmaskRST, _bitmaskWR;
00043 #elif defined (DM_TOOLCHAIN_MBED)
00044   PinName _wr, _cs, _dc, _rst;
00045   DigitalOut* _pinDC, *_pinRST, *_pinWR;
00046   BusOut * _virtualPortD;
00047 #endif  
00048 };
00049 #endif
00050 
00051 
00052