<?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>topic Re: using USB_DeviceHidSend outside of USB_DeviceHidGenericAction in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1495003#M49688</link>
    <description>&lt;P&gt;can anyone confirm my understanding?, that would be appreciated. thanks&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jul 2022 19:21:13 GMT</pubDate>
    <dc:creator>Seif1</dc:creator>
    <dc:date>2022-07-25T19:21:13Z</dc:date>
    <item>
      <title>using USB_DeviceHidSend outside of USB_DeviceHidGenericAction</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1491184#M49630</link>
      <description>&lt;P&gt;Hi, I use usb HID to send and recive data. I used the sdk to generate the code. the way it is generated,&lt;/P&gt;&lt;P&gt;is when host send data to the micro (interrupt out), it will end up inside&amp;nbsp;USB_DeviceHidGenericAction, then&amp;nbsp;USB_DeviceHidSend is used to send data to host, then&amp;nbsp;USB_DeviceHidRecv , is used to get the data that the host sent. in this case,&amp;nbsp;USB_DeviceHidSend&amp;nbsp; works fine.&lt;/P&gt;&lt;P&gt;However, I can only send data to host, only, when the host try sent data to the micro and I want to send and receive data separately. So what I tried to do is outside USB_DeviceHidGenericAction, and after specific time pass, I call&amp;nbsp;USB_DeviceHidSend to send data to host. however, first time it return&amp;nbsp;kStatus_USB_Success, then every time after it return&amp;nbsp;kStatus_USB_Busy. it worth knowing that the code does not enter USB_DeviceHidInterruptIn even when it returned&amp;nbsp; kStatus_USB_Success so it does not clear the busy flag.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Seif1_0-1658164175303.png" style="width: 672px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/187023i9C23AF756ABA6F05/image-dimensions/672x363?v=v2" width="672" height="363" role="button" title="Seif1_0-1658164175303.png" alt="Seif1_0-1658164175303.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so how I can use&amp;nbsp;USB_DeviceHidSend&amp;nbsp; outside of&amp;nbsp;USB_DeviceHidGenericAction.&lt;/P&gt;&lt;P&gt;any Help is appreciated, thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 17:46:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1491184#M49630</guid>
      <dc:creator>Seif1</dc:creator>
      <dc:date>2022-09-29T17:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: using USB_DeviceHidSend outside of USB_DeviceHidGenericAction</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1492330#M49649</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN class="Q4iAWc"&gt;It is not possible to send data at any time, only when USB master waiting responds from USB device, also the USB bus is not busy.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN class="Q4iAWc"&gt;You can refer to dev_hid_generic demo under SDK, call this function "USB_DeviceHidSend()" inUSB_DeviceHidGenericCallback() function.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN class="Q4iAWc"&gt;BR&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="VIiyi"&gt;&lt;SPAN class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="zh-CN" data-phrase-index="0" data-number-of-phrases="1"&gt;&lt;SPAN class="Q4iAWc"&gt;Alice&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 09:25:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1492330#M49649</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2022-07-20T09:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: using USB_DeviceHidSend outside of USB_DeviceHidGenericAction</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1492627#M49650</link>
      <description>&lt;P&gt;Hi Alice, Thanks for your respond.&lt;/P&gt;&lt;P&gt;I understand, that after the polling time that I specified for the end point IN inside the descriptor, host (pc in my case)will check if the end point have data to read (hardware and lower layer do that for me and I do not need to send anything to check the end point).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So what I am trying to do is after every specific time I write the data to the end point(using USB_DeviceHidSend), and whenever the poling time pass the host can get the data from the end point. On the host side, when I want to read the received report, I use readfile API to read the received data(pc can keep reading up to around 22 report). so I can let the pc lower layer reading the reports and store them, then I can analyze them when it is needed.&lt;/P&gt;&lt;P&gt;is any part of my understanding is wrong?&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;&lt;/P&gt;&lt;P&gt;using readfile does not send any thing to the host. so according to what you said,&amp;nbsp; I will always need to use writefile from the pc to be able to get inside&amp;nbsp;USB_DeviceInterface0HidGenericCallback then use USB_DeviceHidSend ?&lt;/P&gt;&lt;P&gt;Also, the following function is the one you are speaking about?&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Seif1_0-1658337448919.png" style="width: 842px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/187302iB48966BAF192BC32/image-dimensions/842x640?v=v2" width="842" height="640" role="button" title="Seif1_0-1658337448919.png" alt="Seif1_0-1658337448919.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2022 17:20:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1492627#M49650</guid>
      <dc:creator>Seif1</dc:creator>
      <dc:date>2022-07-20T17:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: using USB_DeviceHidSend outside of USB_DeviceHidGenericAction</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1495003#M49688</link>
      <description>&lt;P&gt;can anyone confirm my understanding?, that would be appreciated. thanks&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 19:21:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1495003#M49688</guid>
      <dc:creator>Seif1</dc:creator>
      <dc:date>2022-07-25T19:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: using USB_DeviceHidSend outside of USB_DeviceHidGenericAction</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1502467#M49795</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I think yes, and strongly recommend you debug step by step the HID demo under SDK, you will know the process well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 09:13:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1502467#M49795</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2022-08-08T09:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: using USB_DeviceHidSend outside of USB_DeviceHidGenericAction</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1521338#M50126</link>
      <description>&lt;P&gt;Thanks Alice, I was able to make it work Long time ago. the issue was that I thought that by connecting the USB to the PC and after the enumeration, the Hardware will start taking the data from the specified endpoints, which is not true. in order for the usb Hardware to start taking the data from endpoint, in case of HID, I need to createfile for HID in the host side, in my case PC. this will create the pipeline and the hardware will start reading the endpoint every Period, that was specified in the endpoint descriptor.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 14:57:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/using-USB-DeviceHidSend-outside-of-USB-DeviceHidGenericAction/m-p/1521338#M50126</guid>
      <dc:creator>Seif1</dc:creator>
      <dc:date>2022-09-13T14:57:58Z</dc:date>
    </item>
  </channel>
</rss>

