Store HID-descriptor in flash memory?

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
confus
Posts: 4
Joined: Tue Nov 02, 2010 12:49 pm

Store HID-descriptor in flash memory?

Post by confus » Fri Mar 23, 2012 7:21 pm

Hi,

I have a project where every bit of SRAM counts. So I want to store the hid device descriptor in the flash memory. I seem to recall that this is possible (correct me if I'm wrong here), but I can't remember how. I'd be happy for someone to refresh my memory (no pun intended :lol:)

Also tipps on how to make v-usb use less SRAM would be good.

Thx in advance.

Daid
Rank 2
Rank 2
Posts: 55
Joined: Mon Apr 18, 2011 12:19 pm

Re: Store HID-descriptor in flash memory?

Post by Daid » Mon Mar 26, 2012 3:21 pm

the HID descriptor is stored in flash by default:

Code: Select all

PROGMEM char usbHidReportDescriptor[24] = {

PROGMEM puts it in flash.

V-USB in normal config doesn't use a lot of RAM. You can save 1 or 2 bytes by using the GPIOR registers as SRAM. But that's about it.

Post Reply