Пример #1
0
/*********************************************************************
 * @fn      gapObserverRole_processStackMsg
 *
 * @brief   Process an incoming task message.
 *
 * @param   pMsg - message to process
 *
 * @return  TRUE if safe to deallocate incoming GAP message, FALSE otherwise.
 */
static uint8_t gapObserverRole_processStackMsg(ICall_Hdr *pMsg)
{
  uint8_t safeToDealloc = TRUE;
  
  switch (pMsg->event)
  {
    case GAP_MSG_EVENT:
      safeToDealloc = gapObserverRole_ProcessGAPMsg((gapEventHdr_t *) pMsg);
      break;

    default:
      break;
  }
  
  return ( safeToDealloc );
}
Пример #2
0
/*********************************************************************
 * @fn      gapObserverRole_ProcessOSALMsg
 *
 * @brief   Process an incoming task message.
 *
 * @param   pMsg - message to process
 *
 * @return  none
 */
static void gapObserverRole_ProcessOSALMsg( osal_event_hdr_t *pMsg )
{
  switch ( pMsg->event )
  {
    case HCI_GAP_EVENT_EVENT:
      if ( pMsg->status == HCI_COMMAND_COMPLETE_EVENT_CODE )
      {
        //hciEvt_CmdComplete_t *pPkt = (hciEvt_CmdComplete_t *) pMsg;
      }
      break;

    case GAP_MSG_EVENT:
      gapObserverRole_ProcessGAPMsg( (gapEventHdr_t *) pMsg );
      break;

    default:
      break;
  }
}
Пример #3
0
/*********************************************************************
 * @fn      gapObserverRole_ProcessOSALMsg
 *
 * @brief   Process an incoming task message.
 *
 * @param   pMsg - message to process
 *
 * @return  TRUE if safe to deallocate incoming GAP message, FALSE otherwise.
 */
static uint8 gapObserverRole_ProcessOSALMsg( osal_event_hdr_t *pMsg )
{
  uint8 safeToDealloc = TRUE;
  
  switch ( pMsg->event )
  {
    case HCI_GAP_EVENT_EVENT:
      if ( pMsg->status == HCI_COMMAND_COMPLETE_EVENT_CODE )
      {
        //hciEvt_CmdComplete_t *pPkt = (hciEvt_CmdComplete_t *) pMsg;
      }
      break;

    case GAP_MSG_EVENT:
      safeToDealloc = gapObserverRole_ProcessGAPMsg( (gapEventHdr_t *) pMsg );
      break;

    default:
      break;
  }
  
  return ( safeToDealloc );
}