1 /*************************************************************************** 2 * Copyright (c) 2024 Microsoft Corporation 3 * 4 * This program and the accompanying materials are made available under the 5 * terms of the MIT License which is available at 6 * https://opensource.org/licenses/MIT. 7 * 8 * SPDX-License-Identifier: MIT 9 **************************************************************************/ 10 11 12 /**************************************************************************/ 13 /**************************************************************************/ 14 /** */ 15 /** GUIX Component */ 16 /** */ 17 /** Port Specific */ 18 /** */ 19 /**************************************************************************/ 20 /**************************************************************************/ 21 /**************************************************************************/ 22 /* */ 23 /* APPLICATION INTERFACE DEFINITION RELEASE */ 24 /* */ 25 /* gx_port.h ARC_HS/MetaWare */ 26 /* 6.1.8 */ 27 /* AUTHOR */ 28 /* */ 29 /* Kenneth Maxwell, Microsoft Corporation */ 30 /* */ 31 /* DESCRIPTION */ 32 /* */ 33 /* This file contains data type definitions and constants specific */ 34 /* to the implementation of high-performance GUIX UI framework. */ 35 /* */ 36 /* RELEASE HISTORY */ 37 /* */ 38 /* DATE NAME DESCRIPTION */ 39 /* */ 40 /* 09-30-2020 Kenneth Maxwell Initial Version 6.1 */ 41 /* 04-02-2021 Kenneth Maxwell Modified comment(s), */ 42 /* resulting in version 6.1.6 */ 43 /* 08-02-2021 Kenneth Maxwell Modified comment(s), removed */ 44 /* GX_SYSTEM_TIMER_TICKS and */ 45 /* GX_TICKS_SECOND definitions,*/ 46 /* resulting in version 6.1.8 */ 47 /* */ 48 /**************************************************************************/ 49 50 #ifndef GX_PORT_H 51 #define GX_PORT_H 52 53 /* Determine if the optional GUIX user define file should be used. */ 54 55 #ifdef GX_INCLUDE_USER_DEFINE_FILE 56 57 /* Include the user defines in gx_user.h. The defines in this file may 58 alternately be defined on the command line. */ 59 60 #include "gx_user.h" 61 #endif 62 63 typedef INT GX_BOOL; 64 65 typedef SHORT GX_VALUE; 66 67 #define GX_VALUE_MAX 0x7FFF 68 69 70 /* Define the basic system parameters. */ 71 72 #ifndef GX_THREAD_STACK_SIZE 73 #define GX_THREAD_STACK_SIZE 4096 74 #endif 75 76 #define GX_CONST const 77 78 #define GX_INCLUDE_DEFAULT_COLORS 79 80 #define GX_MAX_ACTIVE_TIMERS 32 81 82 #define GX_MAX_VIEWS 32 83 84 #define GX_MAX_DISPLAY_HEIGHT 800 85 86 87 /* Define several macros for the error checking shell in GUIX. */ 88 89 #ifndef TX_TIMER_PROCESS_IN_ISR 90 91 #define GX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ 92 extern TX_THREAD _tx_timer_thread; \ 93 extern volatile ULONG _tx_thread_system_state; 94 95 #define GX_THREADS_ONLY_CALLER_CHECKING if ((_tx_thread_system_state) || \ 96 (_tx_thread_current_ptr == TX_NULL) || \ 97 (_tx_thread_current_ptr == &_tx_timer_thread)) \ 98 return(GX_CALLER_ERROR); 99 100 #define GX_INIT_AND_THREADS_CALLER_CHECKING if (((_tx_thread_system_state) && (_tx_thread_system_state < ((ULONG) 0xF0F0F0F0))) || \ 101 (_tx_thread_current_ptr == &_tx_timer_thread)) \ 102 return(GX_CALLER_ERROR); 103 104 105 #define GX_NOT_ISR_CALLER_CHECKING if ((_tx_thread_system_state) && (_tx_thread_system_state < ((ULONG) 0xF0F0F0F0))) \ 106 return(GX_CALLER_ERROR); 107 108 #define GX_THREAD_WAIT_CALLER_CHECKING if ((wait_option) && \ 109 ((_tx_thread_current_ptr == NX_NULL) || (_tx_thread_system_state) || (_tx_thread_current_ptr == &_tx_timer_thread))) \ 110 return(GX_CALLER_ERROR); 111 112 113 #else 114 115 116 117 #define GX_CALLER_CHECKING_EXTERNS extern TX_THREAD *_tx_thread_current_ptr; \ 118 extern volatile ULONG _tx_thread_system_state; 119 120 #define GX_THREADS_ONLY_CALLER_CHECKING if ((_tx_thread_system_state) || \ 121 (_tx_thread_current_ptr == TX_NULL)) \ 122 return(GX_CALLER_ERROR); 123 124 #define GX_INIT_AND_THREADS_CALLER_CHECKING if (((_tx_thread_system_state) && (_tx_thread_system_state < ((ULONG) 0xF0F0F0F0)))) \ 125 return(GX_CALLER_ERROR); 126 127 #define GX_NOT_ISR_CALLER_CHECKING if ((_tx_thread_system_state) && (_tx_thread_system_state < ((ULONG) 0xF0F0F0F0))) \ 128 return(GX_CALLER_ERROR); 129 130 #define GX_THREAD_WAIT_CALLER_CHECKING if ((wait_option) && \ 131 ((_tx_thread_current_ptr == NX_NULL) || (_tx_thread_system_state))) \ 132 return(GX_CALLER_ERROR); 133 134 #endif 135 136 137 /* Define the version ID of GUIX. This may be utilized by the application. */ 138 139 #ifdef GX_SYSTEM_INIT 140 CHAR _gx_version_id[] = 141 "Copyright (c) 2024 Microsoft Corporation. * GUIX ARC_HS/MetaWare Version 6.4.1 *"; 142 #else 143 extern CHAR _gx_version_id[]; 144 #endif 145 146 #endif 147 148