bluesea_07@163. 该用户已被删除
|
void CommPutChar( char *cm){
static unsigned char j=0;
DisableInterrupts; //关中断
if(SCI0SR1_TDRE) {
SCI0DRL=*(cm)++;
j++;
if(j==1){
SCI0CR2=0x80; //允许tx中断
}
}
j=0;
EnableInterrupts; //开中断
}
#pragma CODE_SEG __NEAR_SEG NON_BANKED
interrupt 20 void SCI0_ISR(void){
static unsigned char i=0;
static unsigned char s=0;
unsigned char rc;
if(SCI0SR1_TDRE) { //允许发送中断吗
SCI0DRL=?;
}
else SCI0CR2=0x0C; //关tx中断
}
}
void main()
{
CommPutChar("123");
}
我想实现中断发送,可是中断里面的?不知道怎么实现。应该怎么做呢 |
|