Nuvoton
/
NuMaker-mbed-emWin-example
NuMaker emWin HMI
emWin/Config/GUI_X.c@10:c8165817d92a, 8 months ago (annotated)
- Committer:
- csyang2
- Date:
- Mon Mar 04 15:47:41 2024 +0800
- Revision:
- 10:c8165817d92a
- Parent:
- 1:c0f972361605
Support NuMaker-IoT-M467
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
csyang2 |
1:c0f972361605 | 1 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 2 | * SEGGER Software GmbH * |
csyang2 |
1:c0f972361605 | 3 | * Solutions for real time microcontroller applications * |
csyang2 |
1:c0f972361605 | 4 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 5 | * * |
csyang2 |
1:c0f972361605 | 6 | * (c) 1996 - 2018 SEGGER Microcontroller GmbH * |
csyang2 |
1:c0f972361605 | 7 | * * |
csyang2 |
1:c0f972361605 | 8 | * Internet: www.segger.com Support: support@segger.com * |
csyang2 |
1:c0f972361605 | 9 | * * |
csyang2 |
1:c0f972361605 | 10 | ********************************************************************** |
csyang2 |
1:c0f972361605 | 11 | |
csyang2 |
1:c0f972361605 | 12 | ** emWin V5.48 - Graphical user interface for embedded applications ** |
csyang2 |
1:c0f972361605 | 13 | All Intellectual Property rights in the Software belongs to SEGGER. |
csyang2 |
1:c0f972361605 | 14 | emWin is protected by international copyright laws. Knowledge of the |
csyang2 |
1:c0f972361605 | 15 | source code may not be used to write a similar product. This file may |
csyang2 |
1:c0f972361605 | 16 | only be used in accordance with the following terms: |
csyang2 |
1:c0f972361605 | 17 | |
csyang2 |
1:c0f972361605 | 18 | The software has been licensed by SEGGER Software GmbH to Nuvoton Technology Corporationat the address: No. 4, Creation Rd. III, Hsinchu Science Park, Taiwan |
csyang2 |
1:c0f972361605 | 19 | for the purposes of creating libraries for its |
csyang2 |
1:c0f972361605 | 20 | Arm Cortex-M and Arm9 32-bit microcontrollers, commercialized and distributed by Nuvoton Technology Corporation |
csyang2 |
1:c0f972361605 | 21 | under the terms and conditions of an End User |
csyang2 |
1:c0f972361605 | 22 | License Agreement supplied with the libraries. |
csyang2 |
1:c0f972361605 | 23 | Full source code is available at: www.segger.com |
csyang2 |
1:c0f972361605 | 24 | |
csyang2 |
1:c0f972361605 | 25 | We appreciate your understanding and fairness. |
csyang2 |
1:c0f972361605 | 26 | ---------------------------------------------------------------------- |
csyang2 |
1:c0f972361605 | 27 | Licensing information |
csyang2 |
1:c0f972361605 | 28 | Licensor: SEGGER Software GmbH |
csyang2 |
1:c0f972361605 | 29 | Licensed to: Nuvoton Technology Corporation, No. 4, Creation Rd. III, Hsinchu Science Park, 30077 Hsinchu City, Taiwan |
csyang2 |
1:c0f972361605 | 30 | Licensed SEGGER software: emWin |
csyang2 |
1:c0f972361605 | 31 | License number: GUI-00735 |
csyang2 |
1:c0f972361605 | 32 | License model: emWin License Agreement, signed February 27, 2018 |
csyang2 |
1:c0f972361605 | 33 | Licensed platform: Cortex-M and ARM9 32-bit series microcontroller designed and manufactured by or for Nuvoton Technology Corporation |
csyang2 |
1:c0f972361605 | 34 | ---------------------------------------------------------------------- |
csyang2 |
1:c0f972361605 | 35 | Support and Update Agreement (SUA) |
csyang2 |
1:c0f972361605 | 36 | SUA period: 2018-03-26 - 2019-03-27 |
csyang2 |
1:c0f972361605 | 37 | Contact to extend SUA: sales@segger.com |
csyang2 |
1:c0f972361605 | 38 | ---------------------------------------------------------------------- |
csyang2 |
1:c0f972361605 | 39 | File : GUI_X.C |
csyang2 |
1:c0f972361605 | 40 | Purpose : Config / System dependent externals for GUI |
csyang2 |
1:c0f972361605 | 41 | ---------------------------END-OF-HEADER------------------------------ |
csyang2 |
1:c0f972361605 | 42 | */ |
csyang2 |
1:c0f972361605 | 43 | |
csyang2 |
1:c0f972361605 | 44 | #include "GUI.h" |
csyang2 |
1:c0f972361605 | 45 | |
csyang2 |
1:c0f972361605 | 46 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 47 | * |
csyang2 |
1:c0f972361605 | 48 | * Global data |
csyang2 |
1:c0f972361605 | 49 | */ |
csyang2 |
1:c0f972361605 | 50 | volatile GUI_TIMER_TIME OS_TimeMS; |
csyang2 |
1:c0f972361605 | 51 | |
csyang2 |
1:c0f972361605 | 52 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 53 | * |
csyang2 |
1:c0f972361605 | 54 | * Timing: |
csyang2 |
1:c0f972361605 | 55 | * GUI_X_GetTime() |
csyang2 |
1:c0f972361605 | 56 | * GUI_X_Delay(int) |
csyang2 |
1:c0f972361605 | 57 | |
csyang2 |
1:c0f972361605 | 58 | Some timing dependent routines require a GetTime |
csyang2 |
1:c0f972361605 | 59 | and delay function. Default time unit (tick), normally is |
csyang2 |
1:c0f972361605 | 60 | 1 ms. |
csyang2 |
1:c0f972361605 | 61 | */ |
csyang2 |
1:c0f972361605 | 62 | |
csyang2 |
1:c0f972361605 | 63 | GUI_TIMER_TIME GUI_X_GetTime(void) { |
csyang2 |
1:c0f972361605 | 64 | return OS_TimeMS; |
csyang2 |
1:c0f972361605 | 65 | } |
csyang2 |
1:c0f972361605 | 66 | |
csyang2 |
1:c0f972361605 | 67 | void GUI_X_Delay(int ms) { |
csyang2 |
1:c0f972361605 | 68 | int tEnd = OS_TimeMS + ms; |
csyang2 |
1:c0f972361605 | 69 | while ((tEnd - OS_TimeMS) > 0); |
csyang2 |
1:c0f972361605 | 70 | } |
csyang2 |
1:c0f972361605 | 71 | |
csyang2 |
1:c0f972361605 | 72 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 73 | * |
csyang2 |
1:c0f972361605 | 74 | * GUI_X_Init() |
csyang2 |
1:c0f972361605 | 75 | * |
csyang2 |
1:c0f972361605 | 76 | * Note: |
csyang2 |
1:c0f972361605 | 77 | * GUI_X_Init() is called from GUI_Init is a possibility to init |
csyang2 |
1:c0f972361605 | 78 | * some hardware which needs to be up and running before the GUI. |
csyang2 |
1:c0f972361605 | 79 | * If not required, leave this routine blank. |
csyang2 |
1:c0f972361605 | 80 | */ |
csyang2 |
1:c0f972361605 | 81 | |
csyang2 |
1:c0f972361605 | 82 | void GUI_X_Init(void) {} |
csyang2 |
1:c0f972361605 | 83 | |
csyang2 |
1:c0f972361605 | 84 | |
csyang2 |
1:c0f972361605 | 85 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 86 | * |
csyang2 |
1:c0f972361605 | 87 | * GUI_X_ExecIdle |
csyang2 |
1:c0f972361605 | 88 | * |
csyang2 |
1:c0f972361605 | 89 | * Note: |
csyang2 |
1:c0f972361605 | 90 | * Called if WM is in idle state |
csyang2 |
1:c0f972361605 | 91 | */ |
csyang2 |
1:c0f972361605 | 92 | |
csyang2 |
1:c0f972361605 | 93 | void GUI_X_ExecIdle(void) {} |
csyang2 |
1:c0f972361605 | 94 | |
csyang2 |
1:c0f972361605 | 95 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 96 | * |
csyang2 |
1:c0f972361605 | 97 | * Logging: OS dependent |
csyang2 |
1:c0f972361605 | 98 | |
csyang2 |
1:c0f972361605 | 99 | Note: |
csyang2 |
1:c0f972361605 | 100 | Logging is used in higher debug levels only. The typical target |
csyang2 |
1:c0f972361605 | 101 | build does not use logging and does therefor not require any of |
csyang2 |
1:c0f972361605 | 102 | the logging routines below. For a release build without logging |
csyang2 |
1:c0f972361605 | 103 | the routines below may be eliminated to save some space. |
csyang2 |
1:c0f972361605 | 104 | (If the linker is not function aware and eliminates unreferenced |
csyang2 |
1:c0f972361605 | 105 | functions automatically) |
csyang2 |
1:c0f972361605 | 106 | |
csyang2 |
1:c0f972361605 | 107 | */ |
csyang2 |
1:c0f972361605 | 108 | |
csyang2 |
1:c0f972361605 | 109 | void GUI_X_Log (const char *s) { GUI_USE_PARA(s); } |
csyang2 |
1:c0f972361605 | 110 | void GUI_X_Warn (const char *s) { GUI_USE_PARA(s); } |
csyang2 |
1:c0f972361605 | 111 | void GUI_X_ErrorOut(const char *s) { GUI_USE_PARA(s); } |
csyang2 |
1:c0f972361605 | 112 | |
csyang2 |
1:c0f972361605 | 113 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 114 | * |
csyang2 |
1:c0f972361605 | 115 | * Multitasking: |
csyang2 |
1:c0f972361605 | 116 | * |
csyang2 |
1:c0f972361605 | 117 | * GUI_X_InitOS() |
csyang2 |
1:c0f972361605 | 118 | * GUI_X_GetTaskId() |
csyang2 |
1:c0f972361605 | 119 | * GUI_X_Lock() |
csyang2 |
1:c0f972361605 | 120 | * GUI_X_Unlock() |
csyang2 |
1:c0f972361605 | 121 | * |
csyang2 |
1:c0f972361605 | 122 | * Note: |
csyang2 |
1:c0f972361605 | 123 | * The following routines are required only if emWin is used in a |
csyang2 |
1:c0f972361605 | 124 | * true multi task environment, which means you have more than one |
csyang2 |
1:c0f972361605 | 125 | * thread using the emWin API. |
csyang2 |
1:c0f972361605 | 126 | * In this case the |
csyang2 |
1:c0f972361605 | 127 | * #define GUI_OS 1 |
csyang2 |
1:c0f972361605 | 128 | * needs to be in GUIConf.h |
csyang2 |
1:c0f972361605 | 129 | */ |
csyang2 |
1:c0f972361605 | 130 | |
csyang2 |
1:c0f972361605 | 131 | void GUI_X_InitOS(void) { } |
csyang2 |
1:c0f972361605 | 132 | void GUI_X_Unlock(void) { } |
csyang2 |
1:c0f972361605 | 133 | void GUI_X_Lock(void) { } |
csyang2 |
1:c0f972361605 | 134 | U32 GUI_X_GetTaskId(void) { return 1; } |
csyang2 |
1:c0f972361605 | 135 | |
csyang2 |
1:c0f972361605 | 136 | |
csyang2 |
1:c0f972361605 | 137 | /********************************************************************* |
csyang2 |
1:c0f972361605 | 138 | * |
csyang2 |
1:c0f972361605 | 139 | * Event driving (optional with multitasking) |
csyang2 |
1:c0f972361605 | 140 | * |
csyang2 |
1:c0f972361605 | 141 | * GUI_X_WaitEvent() |
csyang2 |
1:c0f972361605 | 142 | * GUI_X_WaitEventTimed() |
csyang2 |
1:c0f972361605 | 143 | * GUI_X_SignalEvent() |
csyang2 |
1:c0f972361605 | 144 | */ |
csyang2 |
1:c0f972361605 | 145 | |
csyang2 |
1:c0f972361605 | 146 | void GUI_X_WaitEvent(void) { } |
csyang2 |
1:c0f972361605 | 147 | void GUI_X_SignalEvent(void) { } |
csyang2 |
1:c0f972361605 | 148 | void GUI_X_WaitEventTimed(int Period) { } |
csyang2 |
1:c0f972361605 | 149 | |
csyang2 |
1:c0f972361605 | 150 | /*************************** End of file ****************************/ |