botsense/bsModules/bsI2C/bsI2CServer.c
static BsModCtlBlk_T *bsModCtlBlkFind(const char *sDevUri)
{
  int             index;
  BsModCtlBlk_T  *pCtlBlk;

  // search through modul'es resource table
  for(index=0; index<BSMOD_MAX_HANDLES; ++index)
  {
    if( (pCtlBlk = (BsModCtlBlk_T *)BsModRsrcTbl->m_vecRsrc[index]) != NULL )
    {
      if( !strcmp(pCtlBlk->m_sDevUri, sDevUri) )
      {
        return pCtlBlk;
      }
    }
  }
  return NULL;
}
/*!
 * \brief Find an already allocated resource control block.
 *
 * \param sDevUri   Device URI search parameter.
 *
 * \return
 * If found, returns pointer to matched control block. Else returns NULL.
 */
\brief Find an already allocated resource control block.
\param sDevUri   Device URI search parameter.

\return
If found, returns pointer to matched control block. Else returns NULL.
\ brief Find an already allocated resource control block . \ param sDevUri Device URI search parameter . \ return If found returns pointer to matched control block . Else returns NULL .
static BsModCtlBlk_T *bsModCtlBlkFind(const char *sDevUri)
{
  int             index;
  BsModCtlBlk_T  *pCtlBlk;
  for(index=0; index<BSMOD_MAX_HANDLES; ++index)
  {
    if( (pCtlBlk = (BsModCtlBlk_T *)BsModRsrcTbl->m_vecRsrc[index]) != NULL )
    {
      if( !strcmp(pCtlBlk->m_sDevUri, sDevUri) )
      {
        return pCtlBlk;
      }
    }
  }
  return NULL;
}
static BsModCtlBlk_T * bsModCtlBlkFind ( const char * sDevUri ) { int index ; BsModCtlBlk_T * pCtlBlk ; for ( index = 0 ; index < BSMOD_MAX_HANDLES ; ++ index ) { if ( ( pCtlBlk = ( BsModCtlBlk_T * ) BsModRsrcTbl -> m_vecRsrc [ index ] ) != NULL ) { if ( ! strcmp ( pCtlBlk -> m_sDevUri , sDevUri ) ) { return pCtlBlk ; } } } return NULL ; }
\brief Find an already allocated resource control block.
\ brief Find an already allocated resource control block .
// search through modul'es resource table