<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>lpc1769 usbhid example</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/29025/lpc1769-usbhid-example</link><description> 
Hi all, 

 
I am trying the keil usbhid example with my board and gui. My aim
is to send three adc value to my gui by usb. but i can send only one
adc data, i can&amp;#39;t send the other two. I have tried to change the
descriptor file but i couldn&amp;#39;t. I think</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/148268?ContentTypeID=1</link><pubDate>Mon, 10 Sep 2012 00:59:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a16463cd-e7a3-4dc9-bb4b-c760682da599</guid><dc:creator>Chinzei Tsuneo</dc:creator><description>&lt;p&gt;&lt;p&gt;
Modify report descriptor, so that it defines the report size as
you expect.&lt;/p&gt;

&lt;pre&gt;
#define HID_INPUT_REPORT_BYTES       8              /* size of report in Bytes */
#define HID_OUTPUT_REPORT_BYTES      8              /* size of report in Bytes */
#define HID_FEATURE_REPORT_BYTES     8             /* size of report in Bytes */

const U8 HID_ReportDescriptor[] = {
  HID_UsagePageVendor( 0x00                      ),
  HID_Usage          ( 0x01                      ),
  HID_Collection     ( HID_Application           ),
    HID_LogicalMin   ( 0                         ), /* value range: 0 - 0xFF */
    HID_LogicalMaxS  ( 0xFF                      ),
    HID_ReportSize   ( 8                         ), /* 8 bits */
    HID_ReportCount  ( HID_INPUT_REPORT_BYTES  ),
    HID_Usage        ( 0x01                      ),
    HID_Input        ( HID_Data | HID_Variable | HID_Absolute ),
    HID_ReportCount  ( HID_OUTPUT_REPORT_BYTES ),
    HID_Usage        ( 0x01                      ),
    HID_Output       ( HID_Data | HID_Variable | HID_Absolute ),
    HID_ReportCount  ( HID_FEATURE_REPORT_BYTES),
    HID_Usage        ( 0x01                      ),
    HID_Feature      ( HID_Data | HID_Variable | HID_Absolute ),
  HID_EndCollection,
};
&lt;/pre&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/152282?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2012 10:54:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:903a6e68-ca41-4530-902d-dbb2de4735cf</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
I&amp;#39;m really not good with USB, but one thing makes me curious.&lt;/p&gt;

&lt;p&gt;
When something has a name wMaxPacketSize, that seems to indicate
that the packet can actually be smaller. So if the packet can be max
8 bytes - how do the USB stack know if you want to send 8 bytes, or
only 3 or 5? When data is processed in the other direction, there is
a struct with a member SetupPacket.wLength that informs about about
the amount of data.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/147825?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2012 10:34:30 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ed151669-a612-4984-aa86-afb6a0b0a36b</guid><dc:creator>mustafa bakaci</dc:creator><description>&lt;p&gt;&lt;p&gt;
for now, simplehidwrite can only get InReport[0] data but it can&amp;#39;t
get the others. my edited last desc files are below:&lt;/p&gt;

&lt;p&gt;
usbdesc.c:&lt;/p&gt;

&lt;pre&gt;
#define HID_INPUT_REPORT_BYTES       8              /* size of report in Bytes */
#define HID_OUTPUT_REPORT_BYTES      8              /* size of report in Bytes */
#define HID_FEATURE_REPORT_BYTES     8             /* size of report in Bytes */

const U8 HID_ReportDescriptor[] = {
  HID_UsagePageVendor(0x00),
  HID_Usage(0x01),
  HID_Collection(HID_Application),
    HID_UsagePage(HID_USAGE_PAGE_BUTTON),
    HID_UsageMin(1),
    HID_UsageMax(3),
    HID_LogicalMin(0),
    HID_LogicalMax(1),
    HID_ReportCount(3),
    HID_ReportSize(1),
    HID_Input(HID_Data | HID_Variable | HID_Absolute),
    HID_ReportCount(1),
    HID_ReportSize(5),
    HID_Input(HID_Constant),
    HID_UsagePage(HID_USAGE_PAGE_LED),
    HID_Usage(HID_USAGE_LED_GENERIC_INDICATOR),
    HID_LogicalMin(0),
    HID_LogicalMax(1),
    HID_ReportCount(8),
    HID_ReportSize(8),
    HID_Output(HID_Data | HID_Variable | HID_Absolute),
  HID_EndCollection,
};


const U16 HID_ReportDescSize = sizeof(HID_ReportDescriptor);


/* USB Standard Device Descriptor */
const U8 USB_DeviceDescriptor[] = {
  USB_DEVICE_DESC_SIZE,              /* bLength */
  USB_DEVICE_DESCRIPTOR_TYPE,        /* bDescriptorType */
  WBVAL(0x0200), /* 2.00 */          /* bcdUSB */
  0x00,                              /* bDeviceClass */
  0x00,                              /* bDeviceSubClass */
  0x00,                              /* bDeviceProtocol */
  USB_MAX_PACKET0,                   /* bMaxPacketSize0 */
  WBVAL(0xC251),                     /* idVendor */
  WBVAL(0x2201),                     /* idProduct */
  WBVAL(0x0100), /* 1.00 */          /* bcdDevice */
  0x01,                              /* iManufacturer */
  0x02,                              /* iProduct */
  0x03,                              /* iSerialNumber */
  0x01                               /* bNumConfigurations: one possible configuration*/
};

/* USB Configuration Descriptor */
/*   All Descriptors (Configuration, Interface, Endpoint, Class, Vendor) */
const U8 USB_ConfigDescriptor[] = {
/* Configuration 1 */
  USB_CONFIGUARTION_DESC_SIZE,       /* bLength */
  USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */
  WBVAL(                             /* wTotalLength */
    USB_CONFIGUARTION_DESC_SIZE +
    USB_INTERFACE_DESC_SIZE     +
    HID_DESC_SIZE               +
    USB_ENDPOINT_DESC_SIZE                     // added
                //     added
  ),
  0x01,                              /* bNumInterfaces */
  0x01,                              /* bConfigurationValue: 0x01 is used to select this configuration */
  0x00,                              /* iConfiguration: no string to describe this configuration */
  USB_CONFIG_BUS_POWERED /*|*/       /* bmAttributes */
/*USB_CONFIG_REMOTE_WAKEUP*/,
  USB_CONFIG_POWER_MA(100),          /* bMaxPower, device power consumption is 100 mA */

/* Interface 0, Alternate Setting 0, HID Class */
  USB_INTERFACE_DESC_SIZE,           /* bLength */
  USB_INTERFACE_DESCRIPTOR_TYPE,     /* bDescriptorType */
  0x00,                              /* bInterfaceNumber */
  0x00,                              /* bAlternateSetting */
//  0x01,                              /* bNumEndpoints */
  0x01,                              /* bNumEndpoints */
  USB_DEVICE_CLASS_HUMAN_INTERFACE,  /* bInterfaceClass */
  HID_SUBCLASS_NONE,                 /* bInterfaceSubClass */
  HID_PROTOCOL_NONE,                 /* bInterfaceProtocol */
  0x04,                              /* iInterface */
/* HID Class Descriptor */
/* HID_DESC_OFFSET = 0x0012 */
  HID_DESC_SIZE,                     /* bLength */
  HID_HID_DESCRIPTOR_TYPE,           /* bDescriptorType */
  WBVAL(0x0100), /* 1.00 */          /* bcdHID */
  0x00,                              /* bCountryCode */
  0x01,                              /* bNumDescriptors */
  HID_REPORT_DESCRIPTOR_TYPE,        /* bDescriptorType */
  WBVAL(HID_REPORT_DESC_SIZE),       /* wDescriptorLength */
/* Endpoint, HID Interrupt In */
  USB_ENDPOINT_DESC_SIZE,            /* bLength */
  USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType */
  USB_ENDPOINT_IN(1),                /* bEndpointAddress */
  USB_ENDPOINT_TYPE_INTERRUPT,       /* bmAttributes */
//  WBVAL(0x0004),                     /* wMaxPacketSize */
  WBVAL(0x0008),                     /* wMaxPacketSize */
  0x01,          /* 32ms */          /* bInterval */
//  0x01,          /* 1ms */          /* bInterval */

/* Endpoint, HID Interrupt Out */
  USB_ENDPOINT_DESC_SIZE,            /* bLength */
  USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType */
  USB_ENDPOINT_OUT(1),               /* bEndpointAddress */
  USB_ENDPOINT_TYPE_INTERRUPT,       /* bmAttributes */
//  WBVAL(0x0004),                     /* wMaxPacketSize */
  WBVAL(0x0008),                     /* wMaxPacketSize */
  0x01,          /* 32ms */          /* bInterval */
//  0x01,          /* 1ms */          /* bInterval */

/* Terminator */
  0                                  /* bLength */
};
&lt;/pre&gt;

&lt;p&gt;
hiduser.c&lt;/p&gt;

&lt;pre&gt;
BOOL HID_GetReport (void) {

&lt;br /&gt;

  /* ReportID = SetupPacket.wValue.WB.L; */
  switch (SetupPacket.wValue.WB.H) {
    case HID_REPORT_INPUT:
      GetInReport();
    //  EP0Buf[0] = InReport;
          // memcpy( EP0Buf, InReport, SetupPacket.wLength );
           memcpy(&amp;amp;EP0Buf[0],&amp;amp;InReport[0], 8);
      break;
    case HID_REPORT_OUTPUT:
      return (__FALSE);        /* Not Supported */
    case HID_REPORT_FEATURE:
      /* EP0Buf[] = ...; */
      /* break; */
      return (__FALSE);        /* Not Supported */
  }
  return (__TRUE);
}


&lt;br /&gt;

/*
 *  HID Set Report Request Callback
 *   Called automatically on HID Set Report Request
 *    Parameters:      None (global SetupPacket and EP0Buf)
 *    Return Value:    TRUE - Success, FALSE - Error
 */

&lt;br /&gt;

BOOL HID_SetReport (void) {

&lt;br /&gt;

  /* ReportID = SetupPacket.wValue.WB.L; */
  switch (SetupPacket.wValue.WB.H) {
    case HID_REPORT_INPUT:
      return (__FALSE);        /* Not Supported */
    case HID_REPORT_OUTPUT:
      //OutReport = EP0Buf[0];
          memcpy( &amp;amp;OutReport[0], &amp;amp;EP0Buf[0], SetupPacket.wLength );
      SetOutReport();
      break;
    case HID_REPORT_FEATURE:
      return (__FALSE);        /* Not Supported */
  }
  return (__TRUE);
}
&lt;/pre&gt;

&lt;p&gt;
demo.c&lt;/p&gt;

&lt;pre&gt;
U8 InReport[8];
U8 OutReport[8];
void GetInReport (void) {

        InReport[0]=50;

   }
&lt;/pre&gt;

&lt;p&gt;
if you can see something wrong please inform me .&lt;br /&gt;
By the way thanks for replies.&lt;/p&gt;

&lt;p&gt;
bakaci.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/146911?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2012 09:11:37 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bfbccaa8-f796-4b2c-991f-9df20a4d8e2f</guid><dc:creator>mustafa bakaci</dc:creator><description>&lt;p&gt;&lt;p&gt;
I have edit it as&lt;/p&gt;

&lt;pre&gt;
void USB_EndPoint1 (uint32_t event) {

  switch (event) {
    case USB_EVT_IN:
      GetInReport();
      USB_WriteEP(HID_EP_IN, &amp;amp;InReport[0], sizeof(InReport));
      break;
  }
}
&lt;/pre&gt;

&lt;p&gt;
but the result didn&amp;#39;t changed. it didnt work again.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/145381?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2012 04:45:15 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:06c67e10-0dea-429d-9c6a-7bc5fb9d9cb6</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Correct size?&lt;/p&gt;

&lt;pre&gt;
extern uint8_t InReport[8];
&lt;/pre&gt;

&lt;p&gt;
&lt;/p&gt;

&lt;pre&gt;
USB_WriteEP(HID_EP_IN, &amp;amp;InReport[0], sizeof(InReport[0]));
&lt;/pre&gt;

&lt;p&gt;
&lt;br /&gt;
Note that sizeof(InReport[0]) isn&amp;#39;t the size of the array, but the
size of one element in the array. Was that what you intended?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/143237?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2012 04:09:58 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3831a73b-9bd3-4635-8cbb-85b3d73c397a</guid><dc:creator>mustafa bakaci</dc:creator><description>&lt;p&gt;&lt;p&gt;
I also changed the function in usbuser.c, but it didn&amp;#39;t work:&lt;/p&gt;

&lt;pre&gt;
void USB_EndPoint1 (uint32_t event) {

  switch (event) {
    case USB_EVT_IN:
      GetInReport();
      USB_WriteEP(HID_EP_IN, &amp;amp;InReport[0], sizeof(InReport[0]));
      break;
  }
}
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/140365?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2012 23:51:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cf69c5c5-870e-42ea-9089-71ac7c819a49</guid><dc:creator>mustafa bakaci</dc:creator><description>&lt;p&gt;&lt;p&gt;
I have tried my usbhid example code with SimpleHIDWrite and it
didn&amp;#39;t get the correct data.For example my InReport[3] data is 55,
but in SimpleHIDWrite the incoming data is 00 .&lt;br /&gt;
My usbhid code doesn&amp;#39;t work, maybe i have missed something but i
don&amp;#39;t know what the reason is.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/136850?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2012 23:30:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e5b3b567-cb7c-4bb1-947e-0d82fd5a5f6a</guid><dc:creator>Chinzei Tsuneo</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;gt; my gui remains motionless and it doesn&amp;#39;t do
anything&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
I don&amp;#39;t know what is &lt;b&gt;your gui&lt;/b&gt; is, but it would also require
to modify.&lt;br /&gt;
It is the reason why I recommend you SimpleHIDWrite, to test the
firmware separately.&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/131080?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2012 23:25:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5b245f44-0e51-448f-b134-1826b550e091</guid><dc:creator>mustafa bakaci</dc:creator><description>&lt;p&gt;&lt;p&gt;
I am using keil sample code bundle usbhid example.&lt;/p&gt;

&lt;p&gt;
&lt;a href="http://ics.nxp.com/support/software/code.bundle.lpc17xx.keil/"&gt;ics.nxp.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/127730?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2012 13:39:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c95e5469-6be6-45fb-a0d5-ebbd4f016e01</guid><dc:creator>mustafa bakaci</dc:creator><description>&lt;p&gt;&lt;p&gt;
usbdesc.c&lt;/p&gt;

&lt;pre&gt;
#define HID_INPUT_REPORT_BYTES       8              /* size of report in Bytes */
#define HID_OUTPUT_REPORT_BYTES      8              /* size of report in Bytes */
#define HID_FEATURE_REPORT_BYTES     8              /* size of report in Bytes */

const uint8_t HID_ReportDescriptor[] = {
  HID_UsagePageVendor(0x00),
  HID_Usage(0x01),
  HID_Collection(HID_Application),
    HID_UsagePage(HID_USAGE_PAGE_BUTTON),
    HID_UsageMin(1),
    HID_UsageMax(3),
    HID_LogicalMin(0),
    HID_LogicalMax(1),
    HID_ReportCount(3),
    HID_ReportSize(1),
    HID_Input(HID_Data | HID_Variable | HID_Absolute),
    HID_ReportCount(1),
    HID_ReportSize(5),
    HID_Input(HID_Constant),
    HID_UsagePage(HID_USAGE_PAGE_LED),
    HID_Usage(HID_USAGE_LED_GENERIC_INDICATOR),
    HID_LogicalMin(0),
    HID_LogicalMax(1),
    HID_ReportCount(8),
    HID_ReportSize(1),
    HID_Output(HID_Data | HID_Variable | HID_Absolute),
  HID_EndCollection,
};

const uint16_t HID_ReportDescSize = sizeof(HID_ReportDescriptor);


/* USB Standard Device Descriptor */
const uint8_t USB_DeviceDescriptor[] = {
  USB_DEVICE_DESC_SIZE,              /* bLength */
  USB_DEVICE_DESCRIPTOR_TYPE,        /* bDescriptorType */
  WBVAL(0x0200), /* 2.00 */          /* bcdUSB */
  0x00,                              /* bDeviceClass */
  0x00,                              /* bDeviceSubClass */
  0x00,                              /* bDeviceProtocol */
  USB_MAX_PACKET0,                   /* bMaxPacketSize0 */
  WBVAL(0x1FC9),                     /* idVendor */
  WBVAL(0x8002),                     /* idProduct */
  WBVAL(0x0100), /* 1.00 */          /* bcdDevice */
  0x01,                              /* iManufacturer */
  0x02,                              /* iProduct */
  0x03,                              /* iSerialNumber */
  0x01                               /* bNumConfigurations: one possible configuration*/
};

/* USB Configuration Descriptor */
/*   All Descriptors (Configuration, Interface, Endpoint, Class, Vendor) */
const uint8_t USB_ConfigDescriptor[] = {
/* Configuration 1 */
  USB_CONFIGUARTION_DESC_SIZE,       /* bLength */
  USB_CONFIGURATION_DESCRIPTOR_TYPE, /* bDescriptorType */
  WBVAL(                             /* wTotalLength */
    USB_CONFIGUARTION_DESC_SIZE +
    USB_INTERFACE_DESC_SIZE     +
    HID_DESC_SIZE               +
    USB_ENDPOINT_DESC_SIZE              +
        USB_ENDPOINT_DESC_SIZE
  ),
  0x01,                              /* bNumInterfaces */
  0x01,                              /* bConfigurationValue */
  0x00,                              /* iConfiguration */
  USB_CONFIG_BUS_POWERED /*|*/       /* bmAttributes */
/*USB_CONFIG_REMOTE_WAKEUP*/,
  USB_CONFIG_POWER_MA(100),          /* bMaxPower */
/* Interface 0, Alternate Setting 0, HID Class */
  USB_INTERFACE_DESC_SIZE,           /* bLength */
  USB_INTERFACE_DESCRIPTOR_TYPE,     /* bDescriptorType */
  0x00,                              /* bInterfaceNumber */
  0x00,                              /* bAlternateSetting */
  0x02,                              /* bNumEndpoints */
  USB_DEVICE_CLASS_HUMAN_INTERFACE,  /* bInterfaceClass */
  HID_SUBCLASS_NONE,                 /* bInterfaceSubClass */
  HID_PROTOCOL_NONE,                 /* bInterfaceProtocol */
  0x04,                              /* iInterface */
/* HID Class Descriptor */
/* HID_DESC_OFFSET = 0x0012 */
  HID_DESC_SIZE,                     /* bLength */
  HID_HID_DESCRIPTOR_TYPE,           /* bDescriptorType */
  WBVAL(0x0100), /* 1.00 */          /* bcdHID */
  0x00,                              /* bCountryCode */
  0x01,                              /* bNumDescriptors */
  HID_REPORT_DESCRIPTOR_TYPE,        /* bDescriptorType */
  WBVAL(HID_REPORT_DESC_SIZE),       /* wDescriptorLength */
/* Endpoint, HID Interrupt In */
  USB_ENDPOINT_DESC_SIZE,            /* bLength */
  USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType */
  USB_ENDPOINT_IN(1),                /* bEndpointAddress */
  USB_ENDPOINT_TYPE_INTERRUPT,       /* bmAttributes */
  WBVAL(0x0008),                     /* wMaxPacketSize */
  0x20,          /* 32ms */          /* bInterval */
   USB_ENDPOINT_DESC_SIZE,            /* bLength */
  USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType */
  USB_ENDPOINT_OUT(1),                /* bEndpointAddress */
  USB_ENDPOINT_TYPE_INTERRUPT,       /* bmAttributes */
  WBVAL(0x0008),                     /* wMaxPacketSize */
  0x20,          /* 32ms */          /* bInterval */
/* Terminator */
  0                                  /* bLength */
};
&lt;/pre&gt;

&lt;p&gt;
demo.c&lt;/p&gt;

&lt;pre&gt;
uint8_t InReport[8];                              /* HID Input Report    */
                                            /*   Bit0   : Buttons  */
                                            /*   Bit1..7: Reserved */

uint8_t OutReport[8];                             /* HID Out Report      */
                                            /*   Bit0..7: LEDs     */


/*
 *  Get HID Input Report -&amp;gt; InReport
 */

void GetInReport (void) {


         InReport[1]=55;


}
&lt;/pre&gt;

&lt;p&gt;
my demo.c and usbdesc.c files are above. when it sends inreport
data to host, my gui remains motionless and it doesn&amp;#39;t do
anything&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/119800?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2012 13:00:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:7bea733e-7a51-410c-bf24-a41f76ef1b16</guid><dc:creator>Chinzei Tsuneo</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;gt; I am trying the keil usbhid example with my board and
gui.&lt;/i&gt;&lt;br /&gt;
Is this example?&lt;br /&gt;
C:\Keil\ARM\Boards\Keil\MCB1700\USBHID&lt;/p&gt;

&lt;p&gt;
You may increase wMaxPacketSize of the endpoint, so that your
8-bytes input report is sent in single transaction. Also, you may
change bInterval value, to send the input report more
frequently.&lt;/p&gt;

&lt;pre&gt;
&lt;b&gt;usbdesc.c&lt;/b&gt;

const U8 USB_ConfigDescriptor[] = {
  ...
  ...
/* Endpoint, HID Interrupt In */
  USB_ENDPOINT_DESC_SIZE,            /* bLength */
  USB_ENDPOINT_DESCRIPTOR_TYPE,      /* bDescriptorType */
  USB_ENDPOINT_IN(1),                /* bEndpointAddress */
  USB_ENDPOINT_TYPE_INTERRUPT,       /* bmAttributes */
  WBVAL(0x0004),                     /* wMaxPacketSize */  // &amp;lt;----- WBVAL(HID_INPUT_REPORT_BYTES),
  0x20,          /* 32ms */          /* bInterval */       // &amp;lt;----- 0x01, // 1ms
/* Terminator */
  0                                  /* bLength */
};
&lt;/pre&gt;
&lt;pre&gt;
&lt;b&gt;demo.c&lt;/b&gt;

// U8 InReport;                                /* HID Input Report    */
U8 InReport[HID_INPUT_REPORT_BYTES];           /* HID Input Report    */

void GetInReport (void) {
   //
   // fill InReport[] with your data, here
   //
}
&lt;/pre&gt;

&lt;p&gt;
Test the firmware change using SimpleHIDWrite.exe, first.&lt;/p&gt;

&lt;p&gt;
SimpleHIDWrite on Jan Axelson&amp;#39;s site&lt;br /&gt;
&lt;a href="http://www.lvr.com/files/SimpleHIDWrite3.zip"&gt;www.lvr.com/.../SimpleHIDWrite3.zip&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
Plug-in your device, and run SimpleHIDWrite.&lt;br /&gt;
Click &amp;quot;Keil MCB1700 HID&amp;quot; on the top list.&lt;br /&gt;
The input reports are displayed on the pane.&lt;/p&gt;

&lt;p&gt;
Tsuneo&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/106337?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2012 11:27:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:98e8331c-4c53-4885-b012-a170cbca39dc</guid><dc:creator>mustafa bakaci</dc:creator><description>&lt;p&gt;&lt;p&gt;
is there anyone can help me? :)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/80517?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2012 02:53:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b6d6ef1c-8d72-46a2-b9b9-9d167c592725</guid><dc:creator>mustafa bakaci</dc:creator><description>&lt;p&gt;&lt;p&gt;
No it isn&amp;#39;t. I mean when i tried to change some descriptions the
code didn&amp;#39;t work. Maybe i have done wrong something. For example i
have changed the descriptor sizes and Inreport/OutReport to arrays
the code didn&amp;#39;t work. Like this;&lt;/p&gt;

&lt;p&gt;
#define HID_INPUT_REPORT_BYTES 8 /* size of report in Bytes */&lt;br /&gt;
#define HID_OUTPUT_REPORT_BYTES 8 /* size of report in Bytes */&lt;br /&gt;
#define HID_FEATURE_REPORT_BYTES 8 /* size of report in Bytes */&lt;/p&gt;

&lt;p&gt;
extern uint8_t InReport[8];&lt;br /&gt;
extern uint8_t OutReport[8];&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: lpc1769 usbhid example</title><link>https://community.arm.com/thread/61090?ContentTypeID=1</link><pubDate>Mon, 03 Sep 2012 01:48:00 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:49e5f3a8-0caa-40d0-a895-952ddfac20ca</guid><dc:creator>eric neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;I have tried to change the descriptor file but i
couldn&amp;#39;t.&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Is the file read only?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>