Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
GUI_X_uEZ.c
00001 /********************************************************************* 00002 * SEGGER Microcontroller 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 to Cypress Semiconductor Corporation, 00019 whose registered office is situated at 198 Champion Ct. San Jose, CA 00020 95134 USA solely for the purposes of creating libraries for Cypress 00021 PSoC3 and PSoC5 processor-based devices, sublicensed and distributed 00022 under the terms and conditions of the Cypress 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 Licensor: SEGGER Microcontroller Systems LLC 00030 Licensed to: Cypress Semiconductor Corp, 198 Champion Ct., San Jose, CA 95134, USA 00031 Licensed SEGGER software: emWin 00032 License number: GUI-00319 00033 License model: Services and License Agreement, signed June 10th, 2009 00034 Licensed platform: Any Cypress platform (Initial targets are: PSoC3, PSoC5) 00035 ---------------------------------------------------------------------- 00036 Support and Update Agreement (SUA) 00037 SUA period: 2009-06-12 - 2022-07-27 00038 Contact to extend SUA: sales@segger.com 00039 ---------------------------------------------------------------------- 00040 File : GUI_X_uEZ.c 00041 Purpose : Config / System dependent externals for GUI 00042 ---------------------------END-OF-HEADER------------------------------ 00043 */ 00044 00045 #include <stdio.h> 00046 #include "uEZRTOS.h" 00047 #include "GUI.h" 00048 #include <intrinsics.h> 00049 00050 /********************************************************************* 00051 * 00052 * Static data 00053 * 00054 ********************************************************************** 00055 */ 00056 static T_uezSemaphore _RSema; 00057 00058 /********************************************************************* 00059 * 00060 * Public code 00061 * 00062 ********************************************************************** 00063 */ 00064 /********************************************************************* 00065 * 00066 * Timing: 00067 * GUI_GetTime() 00068 * GUI_Delay(int) 00069 00070 Some timing dependent routines require a GetTime 00071 and delay funtion. Default time unit (tick), normally is 00072 1 ms. 00073 */ 00074 00075 GUI_TIMER_TIME GUI_X_GetTime(void) { 00076 return (GUI_TIMER_TIME)UEZTickCounterGet(); 00077 } 00078 00079 void GUI_X_Delay(int Period) { 00080 UEZTaskDelay(Period); 00081 } 00082 00083 /********************************************************************* 00084 * 00085 * GUI_X_ExecIdle() 00086 * 00087 */ 00088 void GUI_X_ExecIdle(void) { 00089 UEZTaskDelay(1); 00090 } 00091 00092 /********************************************************************* 00093 * 00094 * Multitasking: 00095 * 00096 * GUI_X_InitOS() 00097 * GUI_X_GetTaskId() 00098 * GUI_X_Lock() 00099 * GUI_X_Unlock() 00100 * 00101 * Note: 00102 * The following routines are required only if emWin is used in a 00103 * true multi task environment, which means you have more than one 00104 * thread using the emWin API. 00105 * In this case the 00106 * #define GUI_OS 1 00107 * needs to be in GUIConf.h 00108 */ 00109 void GUI_X_InitOS(void) { UEZSemaphoreCreateRecursiveMutex(&_RSema, UEZ_PRIORITY_VERY_HIGH); } 00110 void GUI_X_Unlock(void) { UEZSemaphoreRecursiveRelease(_RSema); } 00111 void GUI_X_Lock(void) { UEZSemaphoreRecursiveGrab(_RSema, UEZ_TIMEOUT_INFINITE); } 00112 U32 GUI_X_GetTaskId(void) { return UEZTaskGetCurrent(); } 00113 00114 /********************************************************************* 00115 * 00116 * GUI_X_Init() 00117 * 00118 * Note: 00119 * This routine is called from GUI_Init() in any case whether there 00120 * is an RTOS or not. You can use it for additional initializations 00121 * needed. 00122 */ 00123 00124 void GUI_X_Init(void) { 00125 } 00126 00127 /********************************************************************* 00128 * 00129 * Logging: OS dependent 00130 00131 Note: 00132 Logging is used in higher debug levels only. The typical target 00133 build does not use logging and does therefor not require any of 00134 the logging routines below. For a release build without logging 00135 the routines below may be eliminated to save some space. 00136 (If the linker is not function aware and eliminates unreferenced 00137 functions automatically) 00138 00139 */ 00140 #define OS_SendString(s) GUI_USE_PARA(s) 00141 void GUI_X_Log (const char *s) { OS_SendString(s); } 00142 void GUI_X_Warn (const char *s) { OS_SendString(s); } 00143 void GUI_X_ErrorOut(const char *s) { OS_SendString(s); } 00144 00145 /*************************** End of file ****************************/
Generated on Thu Jul 14 2022 12:58:40 by
