AnsweredAssumed Answered

how to understand “ping pong manner”

Question asked by QQ123862905 on Mar 8, 2016
Latest reply on Mar 8, 2016 by QQ123862905

Non blocking buffer transaction APIs

The low level drivers are designed to have a minimal footprint and minimal latency(延迟). The low level drivers do not maintain read or write buffer queues(队列). They support only a ping pong buffer scheme that allows the application to have only one or two outstanding(未解决的) transactions at a time.

To use the low level drivers in non-blocking mode and to stream data to or from the driver, an application must allocate two buffers and then proceed to use them in the following ping pong manner.

  application pseudo code
  adi_xxx_SubmitBuffer         // transfer buffer to driver 
     adi_xxx_SubbmitBuffer  // transfer buffer to driver 
     adi_xxx_GetBuffer      // will block until transaction complete 
                            // buffer is owned by application again 
     // buffer processing 


while () is a mistake ?