EmbDev.net

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


von libed (Guest)


Rate this post
useful
not useful
HI

Im using an exampe 
(http://gandalf.arubi.uni-kl.de/avr_projects/arm_projects/at91_usbfw_core101_hid100_gcc_20070310b.zip) 
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, 
0);
    }
    while (bStatus != USB_STATUS_SUCCESS);
//============================================================
static void ReportReceived()
{

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

        LED_ON(LED_MEM);

    }
    else {

        LED_OFF(LED_MEM);

    }
}
//================================================================
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?

von Martin Thomas (Guest)


Rate this post
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).

von libed (Guest)


Rate this post
useful
not useful
Thank you for reply,

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

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.