1 /* 2 * Copyright (c) 2009-2022 Huawei Technologies Co., Ltd. All rights reserved. 3 * 4 * UniProton is licensed under Mulan PSL v2. 5 * You can use this software according to the terms and conditions of the Mulan PSL v2. 6 * You may obtain a copy of Mulan PSL v2 at: 7 * http://license.coscl.org.cn/MulanPSL2 8 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 9 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 10 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 11 * See the Mulan PSL v2 for more details. 12 * Create: 2009-12-22 13 * Description: UniProton配置私有文件。 14 */ 15 #ifndef PRT_CONFIG_INTERNAL_H 16 #define PRT_CONFIG_INTERNAL_H 17 18 #include <stdint.h> 19 #include "prt_config.h" 20 #include "prt_sys.h" 21 #include "prt_task.h" 22 #include "prt_sem.h" 23 #include "prt_tick.h" 24 #include "prt_exc.h" 25 #include "prt_cpup.h" 26 #include "prt_mem.h" 27 #include "prt_hook.h" 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 extern "C" { 32 #endif /* __cpluscplus */ 33 #endif /* __cpluscplus */ 34 35 #define WORD_PACK(val) (((val) << 24) | ((val) << 16) | ((val) << 8) | (val)) 36 37 /* UniProton模块注册函数的声明 */ 38 extern U32 OsFscMemInit(U32 addr, U32 size); 39 extern U32 OsSysRegister(struct SysModInfo *modInfo); 40 extern U32 OsTickRegister(struct TickModInfo *modInfo); 41 extern U32 OsTskRegister(struct TskModInfo *modInfo); 42 extern U32 OsCpupRegister(struct CpupModInfo *modInfo); 43 extern U32 OsSemRegister(const struct SemModInfo *modInfo); 44 extern U32 OsHookRegister(struct HookModInfo *modInfo); 45 46 extern U32 OsHwiConfigInit(void); 47 extern U32 OsTickConfigInit(void); 48 extern U32 OsTskInit(void); 49 extern U32 OsCpupInit(void); 50 extern void OsCpupWarnInit(void); 51 extern U32 OsExcConfigInit(void); 52 extern U32 OsSemInit(void); 53 extern U32 OsHookConfigInit(void); 54 55 /* UniProton系统启动相关函数的声明 */ 56 extern void OsHwInit(void); 57 extern U32 OsActivate(void); 58 extern U32 OsTickStart(void); 59 extern U32 PRT_HardDrvInit(void); 60 extern void PRT_HardBootInit(void); 61 extern U32 PRT_AppInit(void); 62 63 extern U32 OsQueueRegister(U16 maxQueue); 64 extern U32 OsQueueConfigInit(void); 65 66 #if (OS_INCLUDE_TICK_SWTMER == YES) 67 extern U32 OsSwTmrInit(U32 maxTimerNum); 68 #endif 69 70 enum OsinitPhaseId { 71 OS_REGISTER_ID = 0, 72 OS_INIT_ID, 73 OS_MOUDLE_CONFIG 74 }; 75 typedef U32 (*ConfigInitFunc)(void); 76 struct OsModuleConfigInfo { 77 enum MoudleId moudleId; 78 ConfigInitFunc moudleConfigFunc[OS_MOUDLE_CONFIG]; 79 }; 80 #ifdef __cplusplus 81 #if __cplusplus 82 } 83 #endif /* __cpluscplus */ 84 #endif /* __cpluscplus */ 85 86 #endif /* PRT_CONFIG_INTERNAL_H */ 87