⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 submain.c

📁 ADS1.2 samples
💻 C
字号:
/*
** Copyright (C) ARM Limited, 2002. All rights reserved.
*/

/*
** $Sub$$main() is executed immediately before the user defined main() function.  
** Compile this with -DUSE_SERIAL_PORT to initialize serial port on Integrator.
** For information on $Sub and $Super, see ADS 1.2 Linker and Utilities Guide
*/


__weak extern void cache_init(void);
extern void $Super$$main(void);
extern void init_serial_A(void);


void $Sub$$main(void)
{
  int temp;
  cache_init();                    // enables caches
#ifdef USE_SERIAL_PORT
  init_serial_A();                 // initialize the AP serial port A
#endif
	__asm                      // enable IRQs
	{
		MRS temp, CPSR
		BIC temp, temp, #0x80
		MSR CPSR_c, temp
	}
  $Super$$main();                  // calls the original function main()
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -