LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
GUI_X.c
Go to the documentation of this file.
1 /*********************************************************************
2 * SEGGER Microcontroller GmbH & Co. KG *
3 * Solutions for real time microcontroller applications *
4 **********************************************************************
5 * *
6 * (c) 1996 - 2012 SEGGER Microcontroller GmbH & Co. KG *
7 * *
8 * Internet: www.segger.com Support: support@segger.com *
9 * *
10 **********************************************************************
11 
12 ** emWin V5.18 - Graphical user interface for embedded applications **
13 All Intellectual Property rights in the Software belongs to SEGGER.
14 emWin is protected by international copyright laws. Knowledge of the
15 source code may not be used to write a similar product. This file may
16 only be used in accordance with the following terms:
17 
18 The software has been licensed to NXP Semiconductors USA, Inc. whose
19 registered office is situated at 1109 McKay Dr, M/S 76, San Jose,
20 CA 95131, USA solely for the purposes of creating libraries for
21 NXPs M0, M3/M4 and ARM7/9 processor-based devices, sublicensed and
22 distributed under the terms and conditions of the NXP End User License
23 Agreement.
24 Full source code is available at: www.segger.com
25 
26 We appreciate your understanding and fairness.
27 ----------------------------------------------------------------------
28 File : GUI_X.C
29 Purpose : Config / System dependent externals for GUI
30 ---------------------------END-OF-HEADER------------------------------
31 */
32 
33 #include "GUI.h"
34 #include "lpc_types.h"
35 
36 /*********************************************************************
37 *
38 * Global data
39 */
40 extern volatile uint32_t systick_timems;
41 
42 /*********************************************************************
43 *
44 * Timing:
45 * GUI_X_GetTime()
46 * GUI_X_Delay(int)
47 
48  Some timing dependent routines require a GetTime
49  and delay function. Default time unit (tick), normally is
50 1 ms.
51 */
52 
53 int GUI_X_GetTime(void) {
54  return (int)systick_timems;
55 }
56 
57 void GUI_X_Delay(int ms) {
58  int tEnd = (int) systick_timems + ms;
59  while ((tEnd - (int)systick_timems) > 0);
60 }
61 
62 /*********************************************************************
63 *
64 * GUI_X_Init()
65 *
66 * Note:
67 * GUI_X_Init() is called from GUI_Init is a possibility to init
68 * some hardware which needs to be up and running before the GUI.
69 * If not required, leave this routine blank.
70 */
71 
72 void GUI_X_Init(void) {
73 }
74 
75 
76 /*********************************************************************
77 *
78 * GUI_X_ExecIdle
79 *
80 * Note:
81 * Called if WM is in idle state
82 */
83 
84 void GUI_X_ExecIdle(void) {}
85 
86 /*********************************************************************
87 *
88 * Multitasking:
89 *
90 * GUI_X_InitOS()
91 * GUI_X_GetTaskId()
92 * GUI_X_Lock()
93 * GUI_X_Unlock()
94 *
95 * Note:
96 * The following routines are required only if emWin is used in a
97 * true multi task environment, which means you have more than one
98 * thread using the emWin API.
99 * In this case the
100 * #define GUI_OS 1
101 * needs to be in GUIConf.h
102 */
103 
104 
105 //static OS_RSEMA RSema;
106 
107 void GUI_X_InitOS(void) { /*OS_CreateRSema(&RSema);*/ }
108 void GUI_X_Unlock(void) { /*OS_Unuse(&RSema);*/ }
109 void GUI_X_Lock(void) { /*OS_Use(&RSema);*/ }
110 U32 GUI_X_GetTaskId(void) { return 0; /*(U32)OS_GetTaskID();*/ }
111 
112 /*********************************************************************
113 *
114 * Logging: OS dependent
115 
116 Note:
117  Logging is used in higher debug levels only. The typical target
118  build does not use logging and does therefor not require any of
119  the logging routines below. For a release build without logging
120  the routines below may be eliminated to save some space.
121  (If the linker is not function aware and eliminates unreferenced
122  functions automatically)
123 
124 */
125 
126 void GUI_X_Log (const char *s) { GUI_USE_PARA(s); }
127 void GUI_X_Warn (const char *s) { GUI_USE_PARA(s); }
128 void GUI_X_ErrorOut(const char *s) { GUI_USE_PARA(s); }
129 
130 /*************************** End of file ****************************/