system.c
来自「本程序为ST公司开发的源代码」· C语言 代码 · 共 78 行
C
78 行
/*____________________________________________________________________________| FILE: system.c| PROJECT: ACCORDO+| SW-COMPONENT: |_____________________________________________________________________________| DESCRIPTION: system init functions|_____________________________________________________________________________| COPYRIGHT: (c) 2005 STMicroelectronics, (APG_SWD) Arzano (ITALY)| HISTORY:| Date | Modification | Author|_____________________________________________________________________________| 05.11.02 | Initial revision | M. De Martino|____________________________________________________________________________*/#if (OS20_MALLOC == 1)#include "system.h"#endif#ifdef __cplusplusextern "C" {#endif/************************************************************************|defines and macros (scope: module-local)|-----------------------------------------------------------------------*//************************************************************************|typedefs (scope: module-local)|-----------------------------------------------------------------------*//************************************************************************| variable definition (scope: global)|-----------------------------------------------------------------------*/#if (OS20_MALLOC == 1)volatile tU32 *HEAP_Base;volatile tU32 *HEAP_Limit;volatile tU32 HEAP_Len;#endif /************************************************************************| variable definition (scope: module-local)|-----------------------------------------------------------------------*//************************************************************************|function prototype (scope: module-local)|-----------------------------------------------------------------------*//************************************************************************|function implementation (scope: module-local)|-----------------------------------------------------------------------*//************************************************************************|function implementation (scope: global)|-----------------------------------------------------------------------*/#if (OS20_MALLOC == 1)tVoid SYS_Init (tVoid){ tUInt heapTop, heapBase; // Setup HEAP dimension HEAP_Base = (tU32*)HEAP_Base_Ptr; HEAP_Limit = (tU32*)HEAP_Limit_Ptr; HEAP_Len = HEAP_Length; // Init Malloc heapBase = (tU32)HEAP_Base; heapTop = heapBase + (tU32)HEAP_Len; _init_alloc ((unsigned)heapBase, (unsigned)heapTop);}#endif#ifdef __cplusplus}#endif/* End of file */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?