📄 main.c
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -