// sends all accumulated events. if a xmit fifo is empty then this call returns in about 14us. // it takes about 860us if we send 225 events. void sendEvents(){ // EA=0; //USB_Int_Disable(); // disable USB interrupt while writing buffer to FIFO LedBlueOn(); // toggle LED on each packet EIE1 &= ~0x02; Block_Write((BYTE*)AEBuffer, AECounter*4); EIE1 |= 0x02; AECounter=0; // reset counter and pointer for event buffering AEPtr=AEBuffer; LedBlueOff(); // toggle LED on each packet // EA=1; //USB_Int_Enable(); }
void LedTest(void) { while(1) { LedRedOn(); DelayNmS(200); LedRedOff(); DelayNmS(200); LedBlueOn(); DelayNmS(200); LedBlueOff(); DelayNmS(200); } }
void DisplayOK(void) { unsigned char i = 0; for(i=0;i<3;i++) { BellOn(); LedBlueOn(); DelayNmS(50); BellOff(); LedBlueOff(); DelayNmS(50); } }
void DisplayErr(void) { unsigned char i = 0; for(i=0;i<2;i++) { BellOn(); LedRedOn(); LedBlueOn(); DelayNmS(200); BellOff(); LedRedOff(); LedBlueOff(); DelayNmS(200); } }