diff options
Diffstat (limited to 'firmware/usbdrv/usbdrvasm165.inc')
-rw-r--r-- | firmware/usbdrv/usbdrvasm165.inc | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/firmware/usbdrv/usbdrvasm165.inc b/firmware/usbdrv/usbdrvasm165.inc index 450d2fd..1433701 100644 --- a/firmware/usbdrv/usbdrvasm165.inc +++ b/firmware/usbdrv/usbdrvasm165.inc @@ -36,41 +36,15 @@ of CPU cycles, but even an exact number of cycles! ; Numbers in brackets are clocks counted from center of last sync bit ; when instruction starts -; the code enabled by TINY85MODE is inteded only for use with the tiny85-compatible USBaspLoader -; project. -; with TINY85MODE set, the beginning of the ISR checks for a magic word "B007" at the very bottom of the stack -; and jumps to the application's ISR if the magic word isn't present -; the max allowable interrupt latency is lower given this additional code before getting to the -; USB-specific portion of the ISR. USB_INTR_VECTOR: ;order of registers pushed: YL, SREG [sofError], r0, YH, shift, x1, x2, x3, x4, cnt + SBI PORTB,0 + push YL ; push only what is necessary to sync with edge ASAP in YL, SREG ; push YL ; - -#ifdef TINY85MODE -; look for magic word "B007" at the bottom of the stack - lds YL, RAMEND - cpi YL, 0xB0 - brne cleanupAndJumpToApp - - lds YL, RAMEND-1 - cpi YL, 0x07 - breq cleanupBootloaderIntStack - -cleanupAndJumpToApp: -; magic word was not found, put registers back to where they were before this ISR ran, and jump to application ISR - pop YL - out SREG, YL - pop YL - - rjmp __vectors - TINYVECTOR_USBPLUS_OFFSET - -cleanupBootloaderIntStack: -; magic word was found, put registers - CLR YL ; [-19] ensure we meet below requirements for YL < 0x80 -#endif + ;---------------------------------------------------------------------------- ; Synchronize with sync pattern: ;---------------------------------------------------------------------------- |