diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-26 12:53:57 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-26 12:53:57 -0400 |
commit | a52fb298607dfbd78b83e3d0787fdf5d508332d9 (patch) | |
tree | c95676e072bc9a37bf8a2bbf9f41ea6c867d21e5 /bootloaders/nuevo_diskloader/src/USBCore.cpp | |
parent | bdfae9f7b7b7e34bc00acdf2889ba3dfaa1f3e87 (diff) |
working (?!?!?!) bootloader. doesn't yet restart chip after upload completes.
Diffstat (limited to 'bootloaders/nuevo_diskloader/src/USBCore.cpp')
-rw-r--r-- | bootloaders/nuevo_diskloader/src/USBCore.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bootloaders/nuevo_diskloader/src/USBCore.cpp b/bootloaders/nuevo_diskloader/src/USBCore.cpp index fffe6f7..453c2ff 100644 --- a/bootloaders/nuevo_diskloader/src/USBCore.cpp +++ b/bootloaders/nuevo_diskloader/src/USBCore.cpp @@ -219,7 +219,8 @@ u8 USB_Available(u8 ep) void USB_Recv_block(u8 ep, u8* dst, int len) { - SetEP(ep); +// SetEP(ep & 7); + LockEP lock(ep); while (len--) { while (!ReadWriteAllowed()) @@ -314,6 +315,9 @@ int USB_Send(u8 ep, const void* d, int len) ReleaseTX(); } } + if (ep & TRANSFER_RELEASE) + ReleaseTX(); + TX_LED_ON(); TxLEDPulse = TX_RX_LED_PULSE_MS; return r; |