main.c
来自「Freescale Code Warrior中C的编程」· C语言 代码 · 共 34 行
C
34 行
#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
#pragma CODE_SEG INTO_RAM
void any_function(void);
#pragma CODE_SEG DEFAULT_ROM
void MCU_init(void); /* Device initialization function declaration */
void main(void) {
/* Uncomment this function call after using Device Initialization
to use the generated code */
/* MCU_init(); */
EnableInterrupts; /* enable interrupts */
/* include your code here */
for(;;) {
any_function();
__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
/* please make sure that you never leave this function */
}
/* This pragma does not copy the function into RAM */
#pragma CODE_SEG INTO_RAM
void any_function(void)
{
__asm("NOP");
__asm("NOP");
__asm("NOP");
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?