1 /**************************************************************************/ 2 /* */ 3 /* Copyright (c) Microsoft Corporation. All rights reserved. */ 4 /* */ 5 /* This software is licensed under the Microsoft Software License */ 6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */ 7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */ 8 /* and in the root directory of this software. */ 9 /* */ 10 /**************************************************************************/ 11 12 13 /**************************************************************************/ 14 /**************************************************************************/ 15 /** */ 16 /** GUIX Component */ 17 /** */ 18 /** System Management (System) */ 19 /** */ 20 /**************************************************************************/ 21 22 #define GX_SOURCE_CODE 23 24 /* Include necessary system files. */ 25 26 /**************************************************************************/ 27 /* */ 28 /* FUNCTION RELEASE */ 29 /* */ 30 /* _gx_system_rtos_bind PORTABLE C */ 31 /* 6.1 */ 32 /* AUTHOR */ 33 /* */ 34 /* Kenneth Maxwell, Microsoft Corporation */ 35 /* */ 36 /* DESCRIPTION */ 37 /* */ 38 /* This file contains a small set of functions that bind GUIX to the */ 39 /* underlying RTOS. This is by default the ThreadX RTOS, but can be */ 40 /* modified to support other operating systems. Refer to the GUIX */ 41 /* User Guide for more information. */ 42 /* */ 43 /* INPUT */ 44 /* */ 45 /* Refer to GUIX User Guide */ 46 /* */ 47 /* OUTPUT */ 48 /* */ 49 /* Refer to GUIX User Guide */ 50 /* */ 51 /* CALLS */ 52 /* */ 53 /* Refer to GUIX User Guide */ 54 /* */ 55 /* CALLED BY */ 56 /* */ 57 /* GUIX system serives */ 58 /* */ 59 /* RELEASE HISTORY */ 60 /* */ 61 /* DATE NAME DESCRIPTION */ 62 /* */ 63 /* 05-19-2020 Kenneth Maxwell Initial Version 6.0 */ 64 /* 09-30-2020 Kenneth Maxwell Modified comment(s), */ 65 /* resulting in version 6.1 */ 66 /* */ 67 /**************************************************************************/ 68 69 #ifdef GX_DISABLE_THREADX_BINDING 70 71 /* If you are porting GUIX to another RTOS, the function shells below serve as prototypes to 72 demonstrate what each RTOS specific service should look like. The user will need to complete 73 each of these functions using syntax and services available within the chosen RTOS 74 */ 75 76 /* types used by GUIX, normally provided by ThreadX API, but replaced here */ 77 78 79 80 VOID gx_generic_rtos_initialize(VOID); 81 UINT gx_generic_thread_start(VOID (*thread_entry)(ULONG)); 82 UINT gx_generic_event_post(GX_EVENT *event_ptr); 83 UINT gx_generic_event_fold(GX_EVENT *event_ptr); 84 VOID gx_generic_event_purge(GX_WIDGET *widget); 85 UINT gx_generic_event_pop(GX_EVENT *put_event, GX_BOOL wait); 86 VOID gx_generic_timer_start(VOID); 87 VOID gx_generic_timer_stop(VOID); 88 VOID gx_generic_system_mutex_lock(VOID); 89 VOID gx_generic_system_mutex_unlock(VOID); 90 ULONG gx_generic_system_time_get(VOID); 91 VOID *gx_generic_thread_identify(VOID); 92 VOID gx_generic_time_delay(INT ticks); 93 94 95 #define GX_RTOS_BINDING_INITIALIZE gx_generic_rtos_initialize() 96 #define GX_SYSTEM_THREAD_START gx_generic_thread_start 97 #define GX_EVENT_PUSH gx_generic_event_post 98 #define GX_EVENT_POP gx_generic_event_pop 99 #define GX_EVENT_FOLD gx_generic_event_fold 100 #define GX_EVENT_PURGE gx_generic_event_purge 101 #define GX_TIMER_START gx_generic_timer_start() 102 #define GX_TIMER_STOP gx_generic_timer_stop() 103 #define GX_SYSTEM_MUTEX_LOCK gx_generic_system_mutex_lock() 104 #define GX_SYSTEM_MUTEX_UNLOCK gx_generic_system_mutex_unlock() 105 #define GX_SYSTEM_TIME_GET gx_generic_system_time_get() 106 #define GX_CURRENT_THREAD gx_generic_thread_identify() 107 #define GX_GENERIC_TIME_DELAY(a) gx_generic_time_delay(a) 108 109 110 111 #endif 112 113