CogniBoost/sw/libCogniBoost/cbLibDev.c
static void cbDeviceFlushInput(cbHnd_T hnd, size_t count)
{
  byte_t  buf[1024];
  size_t  block;
  int     n;

  while( count > 0 )
  {
    block = sizeof(buf) >= count? count: sizeof(buf);
    n = cbDeviceRead(hnd, buf, block, CB_TUNE_T_READ);
    if( n <= 0 )
    {
      return;
    }
    count -= (size_t)n;
  }
}
/*!
 * \brief Flush input of <em>count</em> bytes received from device.
 *
 * \param hnd       CogniBoost device handle.
 * \param count     Number of bytes to flush.
 */
\brief Flush input of count bytes received from device.
\param hnd       CogniBoost device handle.
\param count     Number of bytes to flush.
\ brief Flush input of count bytes received from device . \ param hnd CogniBoost device handle . \ param count Number of bytes to flush .
static void cbDeviceFlushInput(cbHnd_T hnd, size_t count)
{
  byte_t  buf[1024];
  size_t  block;
  int     n;
  while( count > 0 )
  {
    block = sizeof(buf) >= count? count: sizeof(buf);
    n = cbDeviceRead(hnd, buf, block, CB_TUNE_T_READ);
    if( n <= 0 )
    {
      return;
    }
    count -= (size_t)n;
  }
}
static void cbDeviceFlushInput ( cbHnd_T hnd , size_t count ) { byte_t buf [ 1024 ] ; size_t block ; int n ; while ( count > 0 ) { block = sizeof ( buf ) >= count ? count : sizeof ( buf ) ; n = cbDeviceRead ( hnd , buf , block , CB_TUNE_T_READ ) ; if ( n <= 0 ) { return ; } count -= ( size_t ) n ; } }
\brief Flush input of <em>count</em> bytes received from device.
\ brief Flush input of <em > count< / em > bytes received from device .