📄 stc86.c
字号:
//***********************************************************
//
// - Startup module (stc86.c) -
//
//***********************************************************
#include "Io86ch06.h"
#include <stdlib.h>
extern void main(void);
extern void __interrupt IntTBT(void);
extern void __interrupt IntTC3(void);
extern void __interrupt Int0(void);
extern void __interrupt Int1(void);
extern void __interrupt Int2(void);
extern void __interrupt Int3(void);
extern void __interrupt Int4(void);
extern void __interrupt Int5(void);
extern void __interrupt IntTC1( void ); /* for IR Receive */
extern void __interrupt IntSIO(void);
extern void __interrupt IntTc2(void);
extern void __interrupt IntTc4(void);
extern void __interrupt IntRxd1(void);
extern void __interrupt IntRxd2(void);
extern void __interrupt onlyreti(void);
extern void __interrupt_n onlyretn(void);
void startup(void)
{
__DI();
WDTCR2 = 0x4e; // clear Code
WDTCR1 = 0x31; // WDTEN = 0 And Reset
WDTCR2 = 0xb1; // disable watchdog timer
__SP = _BaseSP; // setup SP
main(); // Main function
}
#pragma section const INT_VECTOR _BaseIntTbl
void * const IntTbl[] = {
Int5, // External interrupt5 0xffb0
IntTc2, // External interrupt 4/UART(ch1) transmit interrupt
onlyreti, // UART2 transmit interrupt
onlyreti, // UART2 receive interrupt
onlyreti, // intc5 input Capture interrupt
onlyreti, // intc6 full count interrupt
onlyreti, // UART1 transmit interrupt
onlyreti, // UART1 receive interrupt
//*****************************************/
onlyreti, // 0xffc0
onlyreti,
onlyreti,
onlyreti,
onlyreti,
onlyreti,
onlyreti,
onlyreti,
//*****************************************/
onlyreti, // 0xffd0
onlyreti,
onlyreti,
onlyreti,
onlyreti,
onlyreti,
onlyreti,
onlyreti,
//*****************************************/
onlyreti, //intadc 0xffe0
onlyreti, //sio2
IntSIO, // sio1
Int3, // INT3 remote
onlyreti, //INTSBI
onlyreti, //INTTC3 Time
IntTc4, //INTTC4 CDC
Int2, //INT2 RDS
//*************
IntTBT, //INTTBT
Int1, //INT1 ENCODE
IntTC1, //INTTC1 remote
Int0, //INT0 for VCD STB
onlyretn,
onlyretn, // Address Trap interrupt
onlyretn, // Software interrupt,Undefined interrupt
startup // Reset
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -