RT1050 GUI demo using emWin library

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GUIDRV_DCache_Private.h Source File

GUIDRV_DCache_Private.h

00001 /*********************************************************************
00002 *                SEGGER Microcontroller GmbH & Co. KG                *
00003 *        Solutions for real time microcontroller applications        *
00004 **********************************************************************
00005 *                                                                    *
00006 *        (c) 1996 - 2016  SEGGER Microcontroller GmbH & Co. KG       *
00007 *                                                                    *
00008 *        Internet: www.segger.com    Support:  support@segger.com    *
00009 *                                                                    *
00010 **********************************************************************
00011 
00012 ** emWin V5.38 - Graphical user interface for embedded applications **
00013 All  Intellectual Property rights  in the Software belongs to  SEGGER.
00014 emWin is protected by  international copyright laws.  Knowledge of the
00015 source code may not be used to write a similar product.  This file may
00016 only be used in accordance with the following terms:
00017 
00018 The software has been licensed to  NXP Semiconductors USA, Inc.  whose
00019 registered  office  is  situated  at 411 E. Plumeria Drive, San  Jose,
00020 CA 95134, USA  solely for  the  purposes  of  creating  libraries  for
00021 NXPs M0, M3/M4 and  ARM7/9 processor-based  devices,  sublicensed  and
00022 distributed under the terms and conditions of the NXP End User License
00023 Agreement.
00024 Full source code is available at: www.segger.com
00025 
00026 We appreciate your understanding and fairness.
00027 ----------------------------------------------------------------------
00028 Licensing information
00029 
00030 Licensor:                 SEGGER Microcontroller Systems LLC
00031 Licensed to:              NXP Semiconductors, 1109 McKay Dr, M/S 76, San Jose, CA 95131, USA
00032 Licensed SEGGER software: emWin
00033 License number:           GUI-00186
00034 License model:            emWin License Agreement, dated August 20th 2011
00035 Licensed product:         -
00036 Licensed platform:        NXP's ARM 7/9, Cortex-M0,M3,M4
00037 Licensed number of seats: -
00038 ----------------------------------------------------------------------
00039 File        : GUIDRV_DCache_Private.h
00040 Purpose     : Private declarations for GUIDRV_DCache driver
00041 ---------------------------END-OF-HEADER------------------------------
00042 */
00043 
00044 #ifndef GUIDRV_DCACHE_PRIVATE_H
00045 #define GUIDRV_DCACHE_PRIVATE_H
00046 
00047 #include "GUIDRV_DCache.h"
00048 
00049 #if defined(__cplusplus)
00050 extern "C" {     /* Make sure we have C-declarations in C++ programs */
00051 #endif
00052 
00053 /*********************************************************************
00054 *
00055 *       Defines
00056 *
00057 **********************************************************************
00058 */
00059 //
00060 // Use unique context identified
00061 //
00062 #define DRIVER_CONTEXT DRIVER_CONTEXT_DCACHE
00063 
00064 /*********************************************************************
00065 *
00066 *       Types
00067 *
00068 **********************************************************************
00069 */
00070 /*********************************************************************
00071 *
00072 *       DRIVER_CONTEXT
00073 */
00074 typedef struct {
00075   //
00076   // Data
00077   //
00078   int xSize, ySize;       // Display size
00079   int vxSize, vySize;     // Virtual display size
00080   int BitsPerPixelDriver;
00081   int BitsPerPixel;
00082   int NumColors;
00083   LCD_PIXELINDEX IndexMask;
00084   U32 MemSize;
00085   GUI_RECT rDirty;
00086   const GUI_DEVICE_API * pMemdev_API;
00087   //
00088   // Cache mamagement
00089   //
00090   void           (* pfFlush        )(GUI_DEVICE * pDevice);
00091   void           (* pfSendCacheRect)(GUI_DEVICE * pDevice, int x0, int y0, int x1, int y1);
00092   //
00093   // Setting the rectangle to be filled up within the real driver
00094   //
00095   void           (* pfSetRect      )(GUI_DEVICE * pDevice, int x0, int y0, int x1, int y1, int OnOff);
00096   //
00097   // Mode dependent drawing functions
00098   //
00099   void           (* pfDrawBitmap   )(GUI_DEVICE * pDevice, int x0, int y0, int xsize, int ysize, int _BitsPerPixel, int BytesPerLine, const U8 * pData, int Diff, const LCD_PIXELINDEX * pTrans);
00100   void           (* pfFillRect     )(GUI_DEVICE * pDevice, int x0, int y0, int x1, int y1);
00101   LCD_PIXELINDEX (* pfGetPixelIndex)(GUI_DEVICE * pDevice, int x, int y);
00102   void           (* pfSetPixelIndex)(GUI_DEVICE * pDevice, int x, int y, LCD_PIXELINDEX ColorIndex);
00103   //
00104   // Request information
00105   //
00106   I32            (* pfGetDevProp   )(GUI_DEVICE * pDevice, int Index);
00107   //
00108   // Initialization
00109   //
00110   void           (* pfInit)         (GUI_DEVICE * pDevice);
00111   //
00112   // Conversion array from cache to real display driver
00113   //
00114   LCD_PIXELINDEX * pConvert;
00115   LCD_PIXELINDEX * pIndex;
00116   //
00117   // Cache
00118   //
00119   U8 * pVRAM;
00120   U8 * pVRAM_Lock;
00121   int CacheLocked;
00122   int CacheStat;
00123   int CacheDirty;
00124   //
00125   // The driver which is used for the actual drawing operations
00126   //
00127   GUI_DEVICE * pDriver;
00128 } DRIVER_CONTEXT;
00129 
00130 /*********************************************************************
00131 *
00132 *       Private interface
00133 *
00134 **********************************************************************
00135 */
00136 void GUIDRV_DCache__AddDirtyRect  (DRIVER_CONTEXT * pContext, int x0, int y0, int x1, int y1);
00137 void GUIDRV_DCache__ClearDirtyRect(DRIVER_CONTEXT * pContext);
00138 void GUIDRV_DCache__InitOnce      (GUI_DEVICE * pDevice);
00139 
00140 #if defined(__cplusplus)
00141 }
00142 #endif
00143 
00144 #endif /* GUIDRV_DCACHE_PRIVATE_H */
00145 
00146 /*************************** End of file ****************************/
00147