NXP
/
rt1050_emwin_gui_demo
RT1050 GUI demo using emWin library
Embed:
(wiki syntax)
Show/hide line numbers
GUI_GIF_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 : GUI_GIF_Private.h 00040 Purpose : Private header file for GUI_GIF... functions 00041 ---------------------------END-OF-HEADER------------------------------ 00042 */ 00043 00044 #ifndef GUI_GIF_PRIVATE_H 00045 #define GUI_GIF_PRIVATE_H 00046 00047 #include "GUI_Private.h" 00048 00049 /********************************************************************* 00050 * 00051 * Defines 00052 * 00053 ********************************************************************** 00054 */ 00055 #define MAX_NUM_LWZ_BITS 12 00056 00057 /********************************************************************* 00058 * 00059 * Types 00060 * 00061 ********************************************************************** 00062 */ 00063 /* Context structure */ 00064 typedef struct { 00065 /* Required for getting input */ 00066 unsigned NumBytesInBuffer; /* Remaining bytes in buffer */ 00067 const U8 * pBuffer; /* Pointer into buffer for reading data */ 00068 GUI_GET_DATA_FUNC * pfGetData; /* Function pointer */ 00069 void * pParam; /* Parameter pointer passed to function */ 00070 U32 Off; /* Data pointer */ 00071 /* Decompression data */ 00072 U8 aBuffer[258]; /* Input buffer for data block */ 00073 short aCode [(1 << MAX_NUM_LWZ_BITS)]; /* This array stores the LZW codes for the compressed strings */ 00074 U8 aPrefix[(1 << MAX_NUM_LWZ_BITS)]; /* Prefix character of the LZW code. */ 00075 U8 aDecompBuffer[3000]; /* Decompression buffer. The higher the compression, the more bytes are needed in the buffer. */ 00076 U8 * sp; /* Pointer into the decompression buffer */ 00077 int CurBit; 00078 int LastBit; 00079 int GetDone; 00080 int LastByte; 00081 int ReturnClear; 00082 int CodeSize; 00083 int SetCodeSize; 00084 int MaxCode; 00085 int MaxCodeSize; 00086 int ClearCode; 00087 int EndCode; 00088 int FirstCode; 00089 int OldCode; 00090 /* Palette buffer */ 00091 GUI_COLOR aColorTable[256]; 00092 } GUI_GIF_CONTEXT; 00093 00094 typedef struct { 00095 int XPos; 00096 int YPos; 00097 int XSize; 00098 int YSize; 00099 int Flags; 00100 int NumColors; 00101 } IMAGE_DESCRIPTOR; 00102 00103 /* Default parameter structure for reading data from memory */ 00104 typedef struct { 00105 const U8 * pFileData; 00106 U32 FileSize; 00107 } GUI_GIF_PARAM; 00108 00109 typedef int DRAW_FROM_DATABLOCK(GUI_GIF_CONTEXT * pContext, IMAGE_DESCRIPTOR * pDescriptor, int x0, int y0, int Transparency, int Disposal, int Num, int Denom); 00110 typedef void CLEAR_UNUSED_PIXELS(int x0, int y0, IMAGE_DESCRIPTOR * pDescriptor, GUI_GIF_IMAGE_INFO * pInfo, int Num, int Denom); 00111 00112 /********************************************************************* 00113 * 00114 * Private data 00115 * 00116 ********************************************************************** 00117 */ 00118 extern const int GUI_GIF__aInterlaceOffset[4]; 00119 extern const int GUI_GIF__aInterlaceYPos[4]; 00120 00121 /********************************************************************* 00122 * 00123 * Interface 00124 * 00125 ********************************************************************** 00126 */ 00127 int GUI_GIF__ReadData(GUI_GIF_CONTEXT * pContext, unsigned NumBytes, const U8 ** ppData, unsigned StartOfFile); 00128 int GUI_GIF__GetData(void * p, const U8 ** ppData, unsigned NumBytesReq, U32 Off); 00129 int GUI_GIF__DrawFromFilePointer(GUI_GIF_CONTEXT * pContext, int x0, int y0, int Index, int Num, int Denom, DRAW_FROM_DATABLOCK pfDrawFromDataBlock, CLEAR_UNUSED_PIXELS pfClearUnusedPixels); 00130 void GUI_GIF__InitLZW(GUI_GIF_CONTEXT * pContext, int InputCodeSize); 00131 int GUI_GIF__GetNextByte(GUI_GIF_CONTEXT * pContext); 00132 00133 #endif /* GUI_GIF_PRIVATE_H */
Generated on Tue Jul 12 2022 19:43:36 by 1.7.2