please try this
http://www.symbian.com/developer/tec...Constants.html
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
this is just wat i understand about endpoints... wish to share.. i've been working on a usb keyboard from my previous company therefore kinda know a little bout how endpoint works... basicly endpoint 1 is used for setup and cofig and also for mass storage if i am not wrong... the rest is up to you to use and whether u have define its endpoint descriptor... for example u might have a keyboard with a bootloader probably for the display on the keyboard i.e. an lcd... u can use endpoint 2 for ur keyboard and proly endpoint 3 for communicating with the pc just for the bootloader or the lcd display for example.. its more like a databus but with different address for specific thigns.. checkout the HID usage tables from usb.org for more information on descriptor files and such... and if u have a usb hub build in to the keyboard then u can proly also have endpoint 4 for ur mouse for example..
regards..
dan
Thanks nimonia,
Yeah I just use EP 1 for my usb programs and it seems to always work. There is a lot of stuff out there on USB, but most of it's jargon and doesn't explain it easily.
I too have been messing with a HID keyboard interface and almost have it working.
I can mimic the Num lock, scroll lock, and caps lock leds on my test PCB when they're pressed on the main PC keyboard.
I can send the special keys (shift, control, GUI)
I can and send regular key chars but... I have a problem with the chars repeating. So if I press the key "J" for instances it keeps on sending, my program seems to be stuck in the DoUSBout out loop. I've tried sending a $00 code as a keystop but this doesn't work.
Have you run into this problem at all? Anyone else?
Cheers
Squib
----
OK I sussed this one out hrs after posting...always the way!
Last edited by Squibcakes; - 10th May 2007 at 03:05.
Bookmarks