Does anybody understand what end points are?
eg
USBIn endpoint,buffer,countvar, label
USBOut endpoint,buffer,count, label
Trying to get my head around this and not gettin very far
Squib
Does anybody understand what end points are?
eg
USBIn endpoint,buffer,countvar, label
USBOut endpoint,buffer,count, label
Trying to get my head around this and not gettin very far
Squib
The USB 2.0 specification from usb.org discuses endpoints.
Endpoints are just blocks of RAM on the device that are used for inbound
and outbound data exchange between the device & USB host.
Still not getting it.
I guess what i am trying to ask is how do I know what value to set as an endpoint number? ie 0 1 2 or 3?
Squib
With PBP, you have a boat-load of USB assembly language 'framework' files
that get included at compile time. One of these is the 'descriptor' file. This
one includes your endpoint initialization/setup info - along with tons of other
information.
; HID
; Endpoints Allocation
#define HID_INTF_ID 0x00
#define HID_UEP UEP1
#define HID_BD_OUT ep1Bo
#define HID_INT_OUT_EP_SIZE 8
#define HID_BD_IN ep1Bi
#define HID_INT_IN_EP_SIZE 8
#define HID_NUM_OF_DSC 1
If your 'Endpoints Allocation' section looks similar to the one above, then you
would issue USBIn 1, USBBuffer, blah, blah to use endpoint 1.
USBOut would also use endpoint 1.
PBP's USBIn & USBOut commands are pretty generic, and don't really do much
except call the .asm USB framework routines, and pass data. The real meat
of what's going on is handled by the assembler USB framework files.
It's a great deal to learn if you want to get 'really' familiar with USB - for sure.
The Microchip C18 'C' USB framework files are easier to understand than the
.asm files MeLabs ported over from C18. If you're not familiar with assembler,
you might find those easier to decipher.
Thanks Bruce,
I'm away from my pic for a while but will look into it somemorewhen I get back....
Cheers
Squib
Bookmarks