fixed hid descriptor in RAM

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Kasia
Posts: 5
Joined: Wed Dec 19, 2012 2:19 pm

fixed hid descriptor in RAM

Post by Kasia » Mon Dec 31, 2012 2:28 am

Hi ... :)
I learn to use v-usb. I train with the system of 1-key-keyboard (http://www.obdev.at/products/vusb/prjdetail.php?pid=64 ). I built and ran the system, compile a program in WinAVR. All working ok. I work to understand the HID descriptor and develop software for their simple needs. I was looking for an example using software v-usb instead of the descriptor located in the flash memory in RAM. I have not found it. My own attempts to modify the 1-key-keyboard failed. The program compiles without errors, but the device did not work properly (in WinXP error 10). I need help finding examples of implementations using software located hid descriptor in RAM. I will also be grateful for your help in modifying the 1-key-keyboard to working with hid descriptor placed in RAM.
Thanks :)

ulao
Rank 4
Rank 4
Posts: 481
Joined: Mon Aug 25, 2008 8:45 pm

Re: fixed hid descriptor in RAM

Post by ulao » Mon Dec 31, 2012 4:18 am

Do you mean PROGMEM ?

Code: Select all

const char  analog_usbHidReportDescriptor[] PROGMEM = {
///// gampad
0x05,0x01,  //    Usage Page Generic Desktop
0x09,0x05,  //    Usage Joystick
0xA1,0x01,  //    Collection Application
//axis
   0x85,0x01,        //    Report ID 1
   //0x05, 0x02,                  //USAGE_PAGE (Simulation Controls)
   //0x09, 0xBB,                //USAGE (Throttle)
...

declan smith
Rank 1
Rank 1
Posts: 32
Joined: Fri Nov 02, 2012 3:26 pm

Re: fixed hid descriptor in RAM

Post by declan smith » Mon Dec 31, 2012 7:46 am

It called Dynamic HID Descriptor.
It looks like the same with yours : http://forums.obdev.at/viewtopic.php?f=8&t=5450

Kasia
Posts: 5
Joined: Wed Dec 19, 2012 2:19 pm

Re: fixed hid descriptor in RAM

Post by Kasia » Tue Jan 01, 2013 7:56 pm

Thank you. I read about it. I used to follow the guidelines, but without success. Now I could see that things are not done well. Try again. Forum V-USB searched carefully. I was thinking about other examples, can anyone else tried this technique. It's easier to understand the subject, seeing a few examples. Thank you again, can now succeed.

Kasia
Posts: 5
Joined: Wed Dec 19, 2012 2:19 pm

Re: fixed hid descriptor in RAM

Post by Kasia » Tue Jan 01, 2013 8:02 pm

ulao wrote:Do you mean PROGMEM ?

...


PROGMEM means that the plate is located in the non-volatile memory (flash memory). And it can not be changed during program execution. Or just I can not. Few even know how ... :roll:

Regards

Kasia
Posts: 5
Joined: Wed Dec 19, 2012 2:19 pm

Re: fixed hid descriptor in RAM

Post by Kasia » Mon Jan 07, 2013 1:31 am

Thank you, I read further about HID and modified the V-USB library and launched a single chip HID two devices: one type Keyboard (http://blog.flipwork.nl/?x=entry:entry081009-142605), the second type of USAGE 1 Aplication (from hid-date, vusb-20121206.zip, http://www.obdev.at/products/vusb/download.html). HID descriptor in flash, no RAM. Device selection is made the switch before starting the program. Devices exchange data via eeprom. "hid-data" (commandline) writes to eeprom character code, that "1-key ..." after starting the download and after pressing send the application running on the computer.
If you would be interested users attach modified code (or all if admin allow). Problem solved.
I turn to further experiments :-)

Regards

Post Reply