Forum: ARM programming with GCC/GNU tools keyboard HID example for WinArm

Author: libed (Guest)
Posted on:

Rate this post
0 useful
not useful

Im using an exampe 
which is keybord HID implementation. Data transfer from device to host 
works fine, but in second direction (from host to device) not. The 
project compiles with no errors.
Function which read data from host call's other 'callbacks' function:

   unsigned char bStatus;

    do {

        bStatus = KBD_ReceiveReport(&sKbd, (Callback_f) ReportReceived, 
    while (bStatus != USB_STATUS_SUCCESS);
static void ReportReceived()

    if (ISSET(sKbd.sOutputReport.bmLeds, 1)) { //read incoming buffer


    else {


but in my program the void ReportReceived() function is never executed.
In program for USB data packet monitor ("USBTrace") i can see that the 
OUTPUT packet are sending correctly.

what is wrong with that project. Has anyone tested it?

Author: Martin Thomas (Guest)
Posted on:

Rate this post
0 useful
not useful
At the time when I ported the code from an Atmel example for IAR/EWARM- 
to the GNU/arm-*-gcc-toolchain I did just a few tests to verify that 
keyboad- and mouse-emulation does work. I have never made a "real world" 
project with HID and AT91SAM7. In the meantime Atmel published a lot 
more code. There is a HID-example in the AT91 software package. Search 
atmel.com for the at91sam7s-ek, in the download-section of the 
eval-board-page you will find the software-package and in it several USB 
examples. The GNU toolchain is supported, so no porting is needed.

For HID there is also interesing code from ARM/Keil available in the 
MDK-ARM-package (I just have an older eval-version here). Even if the 
ARM/Keil-code can not be used because of the license the source might 
give some "inspiration" (It has been for me when playing with HID on 
targets from a different vendor).

Author: libed (Guest)
Posted on:

Rate this post
0 useful
not useful
Thank you for reply,

Yes I found it, and works it fine. Now I must to understand many, many 
code lines...


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.