Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
Embed:
(wiki syntax)
Show/hide line numbers
IP_FS.h
00001 /********************************************************************* 00002 * SEGGER Software GmbH * 00003 * Solutions for real time microcontroller applications * 00004 ********************************************************************** 00005 * * 00006 * (c) 1996 - 2018 SEGGER Microcontroller GmbH * 00007 * * 00008 * Internet: www.segger.com Support: support@segger.com * 00009 * * 00010 ********************************************************************** 00011 00012 ** emWin V5.48 - 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 by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan 00019 for the purposes of creating libraries for its 00020 Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation 00021 under the terms and conditions of an End User 00022 License Agreement supplied with the libraries. 00023 Full source code is available at: www.segger.com 00024 00025 We appreciate your understanding and fairness. 00026 ---------------------------------------------------------------------- 00027 Licensing information 00028 Licensor: SEGGER Software GmbH 00029 Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan 00030 Licensed SEGGER software: emWin 00031 License number: GUI-00735 00032 License model: emWin License Agreement, signed February 27, 2018 00033 Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation 00034 ---------------------------------------------------------------------- 00035 Support and Update Agreement (SUA) 00036 SUA period: 2018-03-26 - 2019-03-27 00037 Contact to extend SUA: sales@segger.com 00038 -------------------------- END-OF-HEADER ----------------------------- 00039 00040 File : IP_FS.h 00041 Purpose : Header file for file system abstraction layer. 00042 */ 00043 00044 #ifndef IP_FS_H // Avoid multiple inclusion. 00045 #define IP_FS_H 00046 00047 #include "SEGGER.h" 00048 00049 #if defined(__cplusplus) 00050 extern "C" { // Make sure we have C-declarations in C++ programs. 00051 #endif 00052 00053 /********************************************************************* 00054 * 00055 * Types 00056 * 00057 ********************************************************************** 00058 */ 00059 00060 typedef struct { 00061 // 00062 // Read only file operations. These have to be present on ANY file system, even the simplest one. 00063 // 00064 void* (*pfOpenFile) (const char* sFilename); 00065 int (*pfCloseFile) (void* hFile); 00066 int (*pfReadAt) (void* hFile, void* pBuffer, U32 Pos, U32 NumBytes); 00067 long (*pfGetLen) (void* hFile); 00068 // 00069 // Directory query operations. 00070 // 00071 void (*pfForEachDirEntry) (void* pContext, const char* sDir, void (*pf)(void*, void*)); 00072 void (*pfGetDirEntryFileName) (void* pFileEntry, char* sFileName, U32 SizeOfBuffer); 00073 U32 (*pfGetDirEntryFileSize) (void* pFileEntry, U32* pFileSizeHigh); 00074 U32 (*pfGetDirEntryFileTime) (void* pFileEntry); 00075 int (*pfGetDirEntryAttributes)(void* pFileEntry); 00076 // 00077 // Write file operations. 00078 // 00079 void* (*pfCreate) (const char* sFileName); 00080 void* (*pfDeleteFile) (const char* sFilename); 00081 int (*pfRenameFile) (const char* sOldFilename, const char* sNewFilename); 00082 int (*pfWriteAt) (void* hFile, void* pBuffer, U32 Pos, U32 NumBytes); 00083 // 00084 // Additional directory operations 00085 // 00086 int (*pfMKDir) (const char* sDirName); 00087 int (*pfRMDir) (const char* sDirName); 00088 // 00089 // Additional operations 00090 // 00091 int (*pfIsFolder) (const char* sPath); 00092 int (*pfMove) (const char* sOldFilename, const char* sNewFilename); 00093 } IP_FS_API; 00094 00095 typedef struct { 00096 const char* sPath; 00097 const unsigned char* pData; 00098 unsigned int FileSize; 00099 } IP_FS_READ_ONLY_FILE_ENTRY; 00100 00101 typedef struct IP_FS_READ_ONLY_FILE_HOOK_STRUCT IP_FS_READ_ONLY_FILE_HOOK; 00102 struct IP_FS_READ_ONLY_FILE_HOOK_STRUCT { 00103 IP_FS_READ_ONLY_FILE_HOOK* pNext; 00104 IP_FS_READ_ONLY_FILE_ENTRY FileEntry; 00105 }; 00106 00107 /********************************************************************* 00108 * 00109 * API functions 00110 * 00111 ********************************************************************** 00112 */ 00113 00114 #define IP_FS_FS IP_FS_emFile 00115 #define IP_FS_FS_AllowHiddenAccess IP_FS_emFile_AllowHiddenAccess 00116 #define IP_FS_FS_DenyHiddenAccess IP_FS_emFile_DenyHiddenAccess 00117 00118 extern const IP_FS_API IP_FS_ReadOnly; // Read-only file system, typically located in flash memory. 00119 extern const IP_FS_API IP_FS_Win32; // File system interface for Win32. 00120 extern const IP_FS_API IP_FS_Linux; // File system interface for Linux 00121 extern const IP_FS_API IP_FS_emFile; // Target file system (emFile), shows and allows access to hidden files. 00122 extern const IP_FS_API IP_FS_emFile_AllowHiddenAccess; // Target file system (emFile), does not show hidden files but allows access to them. 00123 extern const IP_FS_API IP_FS_emFile_DenyHiddenAccess; // Target file system (emFile), does not show hidden files and does not allow access to them. 00124 00125 // 00126 // Helper functions for Read Only file system layer. 00127 // 00128 void IP_FS_READ_ONLY_ClrFileHooks(void); 00129 void IP_FS_READ_ONLY_AddFileHook (IP_FS_READ_ONLY_FILE_HOOK* pHook, const char* sPath, const unsigned char* pData, unsigned int FileSize); 00130 00131 // 00132 // Helper functions for Win32 file system layer. 00133 // 00134 void IP_FS_WIN32_ConfigBaseDir(const char* sDir); 00135 00136 00137 #if defined(__cplusplus) 00138 } // Make sure we have C-declarations in C++ programs. 00139 #endif 00140 00141 #endif // Avoid multiple inclusion. 00142 00143 /*************************** End of file ****************************/
Generated on Mon Mar 4 2024 07:48:13 by 1.7.2