<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPCXpresso IDE中的主题 [Submission] Proper Simple 64 Byte Hid Demo</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Submission-Proper-Simple-64-Byte-Hid-Demo/m-p/586103#M27044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by behzat_c on Fri Jul 01 00:32:18 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've managed to write/edit a proper simple hid demo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It uses Endpoint0 for Computer to Device transfers, and Endpoint1 for Device to Computer transfer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Main code is so simple and clean. You can see below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please inform me, if there is any bug in there!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And also, i couldn't manage to change the way the device is seen by computer. :confused: I wanted it to seem like "Generic Hid Device" but it appears as "Hid-compliant game controller". I will be appreaciate if you know how could i do this!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif

#include &amp;lt;cr_section_macros.h&amp;gt;
#include &amp;lt;NXP/crp.h&amp;gt;

// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

#include "string.h"
#include "usbapi.h"
#include "usbDescriptions.h"
#include "usbFunctions.h"

/*
 *&amp;nbsp; Read data from EP0 , send data to EP1
 *&amp;nbsp; - interrupt driven
 *&amp;nbsp; - program enters here only when data
 *&amp;nbsp; received from EP0
 */
void ProcessIO(U8 *receivedBuffer,U16 length)
{
int i;
for(i=0;i&amp;lt;length;i++)
sendBuffer&lt;I&gt;=receivedBuffer&lt;I&gt;+1;

USBHwEPWrite(INTR_IN_EP, sendBuffer, REPORT_SIZE);
}

int main(void) {

usbHidStart();

while(1)
{
// ...
}

return 0 ;
}&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:41:05 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:41:05Z</dc:date>
    <item>
      <title>[Submission] Proper Simple 64 Byte Hid Demo</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Submission-Proper-Simple-64-Byte-Hid-Demo/m-p/586103#M27044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by behzat_c on Fri Jul 01 00:32:18 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've managed to write/edit a proper simple hid demo.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It uses Endpoint0 for Computer to Device transfers, and Endpoint1 for Device to Computer transfer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Main code is so simple and clean. You can see below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please inform me, if there is any bug in there!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And also, i couldn't manage to change the way the device is seen by computer. :confused: I wanted it to seem like "Generic Hid Device" but it appears as "Hid-compliant game controller". I will be appreaciate if you know how could i do this!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#ifdef __USE_CMSIS
#include "LPC17xx.h"
#endif

#include &amp;lt;cr_section_macros.h&amp;gt;
#include &amp;lt;NXP/crp.h&amp;gt;

// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

#include "string.h"
#include "usbapi.h"
#include "usbDescriptions.h"
#include "usbFunctions.h"

/*
 *&amp;nbsp; Read data from EP0 , send data to EP1
 *&amp;nbsp; - interrupt driven
 *&amp;nbsp; - program enters here only when data
 *&amp;nbsp; received from EP0
 */
void ProcessIO(U8 *receivedBuffer,U16 length)
{
int i;
for(i=0;i&amp;lt;length;i++)
sendBuffer&lt;I&gt;=receivedBuffer&lt;I&gt;+1;

USBHwEPWrite(INTR_IN_EP, sendBuffer, REPORT_SIZE);
}

int main(void) {

usbHidStart();

while(1)
{
// ...
}

return 0 ;
}&lt;/I&gt;&lt;/I&gt;&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:41:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Submission-Proper-Simple-64-Byte-Hid-Demo/m-p/586103#M27044</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: [Submission] Proper Simple 64 Byte Hid Demo</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Submission-Proper-Simple-64-Byte-Hid-Demo/m-p/586104#M27045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by behzat_c on Tue Jul 05 01:41:26 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Haven't any anyone tried it yet_? :confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:41:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Submission-Proper-Simple-64-Byte-Hid-Demo/m-p/586104#M27045</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:41:06Z</dc:date>
    </item>
  </channel>
</rss>

