main.c
来自「可以利用此文件中的介绍进行非四卡而弹片机的变成」· C语言 代码 · 共 30 行
C
30 行
#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */
void MCU_INIT(void);
void main(void) {
EnableInterrupts; /* enable interrupts */
/* include your code here */
PTBDD_PTBDD6=1;
PTBD_PTBD6=0;
MCU_INIT();
SRTISC=0x16;
for(;;) {
__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
/* please make sure that you never leave main */
}
void MCU_INIT(void){
ICSC1=0x04;
ICSC2=0x40;
ICSTRM=0xa8;
SOPT1=0x43;
SOPT2=0x00;
}
interrupt 23 void RTI_ISR(void) {
SRTISC_RTIACK=1;
PTBD_PTBD6=~PTBD_PTBD6;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?