LPCUSBLib: Endpoint_ConfigureEndpoint() and double-buffering

Discussion created by lpcware Employee on Jun 15, 2016
Content originally posted in LPCWare by cfgardiner on Wed Jan 07 09:10:13 MST 2015

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).

bool Endpoint_ConfigureEndpoint(uint8_t corenum, const uint8_t Number, const uint8_t Type,
const uint8_t Direction, const uint16_t Size, const uint8_t Banks)

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  IN DMA is inactive before posting a new IN packet? Something like this?

      if (Endpoint_IsINReady(pInfo->config.port_num)) {
         Endpoint_Write_Stream_LE(pInfo->config.port_num, (void*) pBuf, (uint16_t)bufSz, &xferSz);