I just wanted to write down some more of my notes about USB...
I noticed in usb_drv_core.jal, procedure usb_send_data(..). There is a
for loop that seems to be useless.
for byte_cnt using idx loop
usb_delivery_buffer[idx] = data[idx]
if USB_DEBUG > 0 then
print_byte_hex(serial_data, usb_delivery_buffer[idx)
end if
end loop
I noticed that usb_delivery_buffer is only defined as 8 bytes, but
"idx" will be the size of the data to be transferred which is usually
> 8 bytes for MSD.
const word USB_IN_DELIVERY_BUFFER_LOC = ( USB_BASE_ADDRESS + 0x0078 )
var byte usb_delivery_buffer[ 8 ] at USB_IN_DELIVERY_BUFFER_LOC
It appears that this array copy is also done with
_usb_copy_array_to_ram() later on in the same procedure.
If I remove this for loop completely, MSD still works.
I will not remove the for loop since I don't know for sure. I'll be
making my own usb_send_data procedure for MSD.
Currently I am using an array, then copying it to the USB memory
space, to speed things up, I may be able to get rid of this array and
write directly to USB memory space and send the packet.
Matt.
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/jallib?hl=en.