summaryrefslogtreecommitdiffstats
path: root/firmware/usbdrv/usbdrvasm165.inc
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usbdrv/usbdrvasm165.inc')
-rw-r--r--firmware/usbdrv/usbdrvasm165.inc43
1 files changed, 6 insertions, 37 deletions
diff --git a/firmware/usbdrv/usbdrvasm165.inc b/firmware/usbdrv/usbdrvasm165.inc
index 450d2fd..ae91588 100644
--- a/firmware/usbdrv/usbdrvasm165.inc
+++ b/firmware/usbdrv/usbdrvasm165.inc
@@ -4,9 +4,7 @@
* Creation Date: 2007-04-22
* Tabsize: 4
* Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
- * Portions Copyright: (c) 2012 Louis Beaudoin
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
- * Revision: $Id: usbdrvasm165.inc 740 2009-04-13 18:23:31Z cs $
*/
/* Do not link this file! Link usbdrvasm.S instead, which includes the
@@ -36,41 +34,12 @@ 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
- 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
+ push YL ;[-23] push only what is necessary to sync with edge ASAP
+ in YL, SREG ;[-21]
+ push YL ;[-20]
;----------------------------------------------------------------------------
; Synchronize with sync pattern:
;----------------------------------------------------------------------------
@@ -80,9 +49,9 @@ cleanupBootloaderIntStack:
;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to
;waitForJ, ensure that this prerequisite is met.
waitForJ:
- inc YL ; [-18]
- sbis USBIN, USBMINUS ; [-17]
- brne waitForJ ; [-16] just make sure we have ANY timeout
+ inc YL
+ sbis USBIN, USBMINUS
+ brne waitForJ ; just make sure we have ANY timeout
waitForK:
;The following code results in a sampling window of < 1/4 bit which meets the spec.
sbis USBIN, USBMINUS ;[-15]