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 /** ThreadX Component */ 17 /** */ 18 /** Initialize */ 19 /** */ 20 /**************************************************************************/ 21 /**************************************************************************/ 22 23 24 /**************************************************************************/ 25 /* */ 26 /* COMPONENT DEFINITION RELEASE */ 27 /* */ 28 /* tx_initialize.h PORTABLE C */ 29 /* 6.1 */ 30 /* AUTHOR */ 31 /* */ 32 /* William E. Lamie, Microsoft Corporation */ 33 /* */ 34 /* DESCRIPTION */ 35 /* */ 36 /* This file defines the ThreadX initialization component, including */ 37 /* data types and external references. It is assumed that tx_api.h */ 38 /* and tx_port.h have already been included. */ 39 /* */ 40 /* RELEASE HISTORY */ 41 /* */ 42 /* DATE NAME DESCRIPTION */ 43 /* */ 44 /* 05-19-2020 William E. Lamie Initial Version 6.0 */ 45 /* 09-30-2020 Yuxin Zhou Modified comment(s), */ 46 /* resulting in version 6.1 */ 47 /* */ 48 /**************************************************************************/ 49 50 #ifndef TX_INITIALIZE_H 51 #define TX_INITIALIZE_H 52 53 54 /* Define constants that indicate initialization is in progress. */ 55 56 #define TX_INITIALIZE_IN_PROGRESS ((ULONG) 0xF0F0F0F0UL) 57 #define TX_INITIALIZE_ALMOST_DONE ((ULONG) 0xF0F0F0F1UL) 58 #define TX_INITIALIZE_IS_FINISHED ((ULONG) 0x00000000UL) 59 60 61 /* Define internal initialization function prototypes. */ 62 63 VOID _tx_initialize_high_level(VOID); 64 VOID _tx_initialize_kernel_setup(VOID); 65 VOID _tx_initialize_low_level(VOID); 66 67 68 /* Define the macro for adding additional port-specific global data. This macro is defined 69 as white space, unless defined by tx_port.h. */ 70 71 #ifndef TX_PORT_SPECIFIC_DATA 72 #define TX_PORT_SPECIFIC_DATA 73 #endif 74 75 76 /* Define the macro for adding additional port-specific pre and post initialization processing. 77 These macros is defined as white space, unless defined by tx_port.h. */ 78 79 #ifndef TX_PORT_SPECIFIC_PRE_INITIALIZATION 80 #define TX_PORT_SPECIFIC_PRE_INITIALIZATION 81 #endif 82 83 #ifndef TX_PORT_SPECIFIC_POST_INITIALIZATION 84 #define TX_PORT_SPECIFIC_POST_INITIALIZATION 85 #endif 86 87 #ifndef TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION 88 #define TX_PORT_SPECIFIC_PRE_SCHEDULER_INITIALIZATION 89 #endif 90 91 92 /* Initialization component data declarations follow. */ 93 94 /* Determine if the initialization function of this component is including 95 this file. If so, make the data definitions really happen. Otherwise, 96 make them extern so other functions in the component can access them. */ 97 98 #ifdef TX_INITIALIZE_INIT 99 #define INITIALIZE_DECLARE 100 #else 101 #define INITIALIZE_DECLARE extern 102 #endif 103 104 105 /* Define the unused memory pointer. The value of the first available 106 memory address is placed in this variable in the low-level 107 initialization function. The content of this variable is passed 108 to the application's system definition function. */ 109 110 INITIALIZE_DECLARE VOID *_tx_initialize_unused_memory; 111 112 113 #endif 114