<?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>LPC Microcontrollers中的主题 LPCUSBLib: Endpoint_ConfigureEndpoint() and double-buffering</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCUSBLib-Endpoint-ConfigureEndpoint-and-double-buffering/m-p/586643#M21454</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cfgardiner on Wed Jan 07 09:10:13 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in my customer application I want to be able to stream external ADC data to system memory. On the Windows side I have the driver set up as a continuous reader. I use Endpoint_ConfigureEndpoint() to setup the endpoint configuration in the LPC1837. This function is defined as (in lpcopen/software/LPCUSBLib/Drivers/USB/Core/DCD/LPC18XX/Endpoint_LPC18xx.c). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;bool Endpoint_ConfigureEndpoint(uint8_t corenum, const uint8_t Number, const uint8_t Type,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;const uint8_t Direction, const uint16_t Size, const uint8_t Banks)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed however, that the 'Banks' parameter is never used. Does this mean that the lpcopen USB stack does not support double-buffering? Does this mean that I cannot queue IN transfers asynchronously? i.e. I have to check whether USB&amp;nbsp; IN DMA is inactive before posting a new IN packet? Something like this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Endpoint_IsINReady(pInfo-&amp;gt;config.port_num)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Endpoint_Write_Stream_LE(pInfo-&amp;gt;config.port_num, (void*) pBuf, (uint16_t)bufSz, &amp;amp;xferSz); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Endpoint_ClearIN(pInfo-&amp;gt;config.port_num);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Charles&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:25:59 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:25:59Z</dc:date>
    <item>
      <title>LPCUSBLib: Endpoint_ConfigureEndpoint() and double-buffering</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPCUSBLib-Endpoint-ConfigureEndpoint-and-double-buffering/m-p/586643#M21454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by cfgardiner on Wed Jan 07 09:10:13 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in my customer application I want to be able to stream external ADC data to system memory. On the Windows side I have the driver set up as a continuous reader. I use Endpoint_ConfigureEndpoint() to setup the endpoint configuration in the LPC1837. This function is defined as (in lpcopen/software/LPCUSBLib/Drivers/USB/Core/DCD/LPC18XX/Endpoint_LPC18xx.c). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;bool Endpoint_ConfigureEndpoint(uint8_t corenum, const uint8_t Number, const uint8_t Type,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;const uint8_t Direction, const uint16_t Size, const uint8_t Banks)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed however, that the 'Banks' parameter is never used. Does this mean that the lpcopen USB stack does not support double-buffering? Does this mean that I cannot queue IN transfers asynchronously? i.e. I have to check whether USB&amp;nbsp; IN DMA is inactive before posting a new IN packet? Something like this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (Endpoint_IsINReady(pInfo-&amp;gt;config.port_num)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Endpoint_Write_Stream_LE(pInfo-&amp;gt;config.port_num, (void*) pBuf, (uint16_t)bufSz, &amp;amp;xferSz); &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Endpoint_ClearIN(pInfo-&amp;gt;config.port_num);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Charles&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:25:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPCUSBLib-Endpoint-ConfigureEndpoint-and-double-buffering/m-p/586643#M21454</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:25:59Z</dc:date>
    </item>
  </channel>
</rss>

