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 /* Notes: PRT_HardBootInit接口在栈保护支持随机数设置场景下必须在bss初始化后调用 */ 61 extern void PRT_HardBootInit(void); 62 extern U32 PRT_AppInit(void); 63 64 extern U32 OsQueueRegister(U16 maxQueue); 65 extern U32 OsQueueConfigInit(void); 66 67 #if (OS_INCLUDE_TICK_SWTMER == YES) 68 extern U32 OsSwTmrInit(U32 maxTimerNum); 69 #endif 70 71 typedef U32 (*ConfigInitFunc)(void); 72 struct OsModuleConfigInfo { 73 enum MoudleId moudleId; 74 ConfigInitFunc moudleConfigFunc[OS_MOUDLE_CONFIG]; 75 }; 76 #ifdef __cplusplus 77 #if __cplusplus 78 } 79 #endif /* __cpluscplus */ 80 #endif /* __cpluscplus */ 81 82 #endif /* PRT_CONFIG_INTERNAL_H */ 83