main.c.bak
来自「Freescal MC9S08GT60的一些实例源码」· BAK 代码 · 共 23 行
BAK
23 行
#include <hidef.h> /* for EnableInterrupts macro */
#include <MC9S08GB60.h> /* include peripheral declarations */
void main(void) {
DisableInterrupts; //Disable Interrupts
PTADD = 0x00; //Set Port A as input port
PTBDD = 0xFF; //Set Port B as output port
IRQSC = 0x16; //IRQ Interrupt Enable and event on falling edges sensitive
PTBD = PTAD; //Send Port A value to Port B
EnableInterrupts; /* enable interrupts */
for(;;) {
__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
}
interrupt IRQ() {
IRQSC_IRQACK = 1; //IRQ interrupt acknowledge
PTBD = PTAD; //Send Port A value to Port B
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?