startover again and port fd0's loader to the 644

This commit is contained in:
david
2009-07-21 15:28:09 +02:00
parent e45b08a5fb
commit b2bf789b85
23 changed files with 405 additions and 577 deletions

View File

@@ -1,11 +1,11 @@
/* Name: usbdrvasm16.inc
* Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
* Project: AVR USB driver
* Author: Christian Starkjohann
* Creation Date: 2007-06-15
* Tabsize: 4
* Copyright: (c) 2007 by OBJECTIVE DEVELOPMENT Software GmbH
* License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
* Revision: $Id: usbdrvasm16.inc 740 2009-04-13 18:23:31Z cs $
* License: GNU GPL v2 (see License.txt) or proprietary (CommercialLicense.txt)
* Revision: $Id: usbdrvasm16.inc 607 2008-05-13 15:57:28Z cs $
*/
/* Do not link this file! Link usbdrvasm.S instead, which includes the
@@ -41,13 +41,10 @@ USB_INTR_VECTOR:
;----------------------------------------------------------------------------
;sync byte (D-) pattern LSb to MSb: 01010100 [1 = idle = J, 0 = K]
;sync up with J to K edge during sync pattern -- use fastest possible loops
;The first part waits at most 1 bit long since we must be in sync pattern.
;YL is guarenteed to be < 0x80 because I flag is clear. When we jump to
;waitForJ, ensure that this prerequisite is met.
;first part has no timeout because it waits for IDLE or SE1 (== disconnected)
waitForJ:
inc YL
sbis USBIN, USBMINUS
brne waitForJ ; just make sure we have ANY timeout
sbis USBIN, USBMINUS ;[-18] wait for D- == 1
rjmp waitForJ
waitForK:
;The following code results in a sampling window of < 1/4 bit which meets the spec.
sbis USBIN, USBMINUS ;[-15]
@@ -67,9 +64,6 @@ waitForK:
inc YL
sts usbSofCount, YL
#endif /* USB_COUNT_SOF */
#ifdef USB_SOF_HOOK
USB_SOF_HOOK
#endif
rjmp sofError
foundK: ;[-12]
;{3, 5} after falling D- edge, average delay: 4 cycles [we want 5 for center sampling]
@@ -214,13 +208,13 @@ macro POP_STANDARD ; 14 cycles
pop x1
pop shift
pop bitcnt
endm
endm
macro POP_RETI ; 7 cycles
pop YH
pop YL
out SREG, YL
pop YL
endm
endm
#include "asmcommon.inc"