CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Jun 2008
    Location
    United States
    Posts
    71

    "Rom" / "rom byte" keywords?

    I'm trying to program a microcontroller in C to communicate with my laptop over a USB connection. The code examples that I've been able to find have the descriptors written either like this:

    Code:
    ROM USB_DEVICE_DESCRIPTOR device_dsc=
    {
        0x12,    // Size of this descriptor in bytes
        USB_DESCRIPTOR_DEVICE,                // DEVICE descriptor type
        0x0200,                 // USB Spec Release Number in BCD format
        0x00,                   // Class Code
        0x00,                   // Subclass code
        0x00,                   // Protocol code
        USB_EP0_BUFF_SIZE,          // Max packet size for EP0, see usb_config.h
        0x04D8,                 // Vendor ID
        0x003F,                 // Product ID: Mouse in a circle fw demo
        0x0002,                 // Device release number in BCD format
        0x01,                   // Manufacturer string index
        0x02,                   // Product string index
        0x00,                   // Device serial number string index
        0x01                    // Number of possible configurations
    };
    Or this:

    Code:
    	rom byte deviceDescriptor[] =
    	{
    		0x12, 0x01, // bLength, bDescriptorType
    		0x00, 0x02, // bcdUSB (low byte), bcdUSB (high byte)
    		0x00, 0x00, // bDeviceClass, bDeviceSubClass
    		0x00, E0SZ, // bDeviceProtocl, bMaxPacketSize
    		0xD8, 0x04, // idVendor (low byte), idVendor (high byte)
    		0xFF, 0x01, // idProduct (low byte), idProduct (high byte)
    		0x01, 0x00, // bcdDevice (low byte), bcdDevice (high byte)
    		0x01, 0x02, // iManufacturer, iProduct
    		0x00, 0x01  // iSerialNumber (none), bNumConfigurations
    	};
    The problem is, I have no idea what the "rom" and "rom byte" words mean. I've looked through my C programming book and have searched Google but have come up with nothing. Can anyone point me in the right direction?

    Thanks
    Last edited by Robotics Guy; December 29th, 2009 at 06:03 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured