亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sapi.c

?? 一些基于IRA環(huán)境開發(fā)的zigbee實例程序
?? C
?? 第 1 頁 / 共 3 頁
字號:
{

  osal_stop_timerEx(sapi_TaskID, ZB_ALLOW_BIND_TIMER);

  if ( timeout == 0 )
  {
    afSetMatch(sapi_epDesc.simpleDesc->EndPoint, FALSE);
  }
  else
  {
    afSetMatch(sapi_epDesc.simpleDesc->EndPoint, TRUE);
    if ( timeout != 0xFF )
    {
      if ( timeout > 64 )
      {
        timeout = 64;
      }
      osal_start_timerEx(sapi_TaskID, ZB_ALLOW_BIND_TIMER, timeout*1000);
    }
  }
  return;
}
/******************************************************************************
 * @fn          zb_SendDataRequest
 *
 * @brief       The zb_SendDataRequest function initiates transmission of data
 *              to a peer device
 *
 * @param       destination - The destination of the data.  The destination can
 *                            be one of the following:
 *                            - 16-Bit short address of device [0-0xfffD]
 *                            - ZB_BROADCAST_ADDR sends the data to all devices
 *                              in the network.
 *                            - ZB_BINDING_ADDR sends the data to a previously
 *                              bound device.
 *
 *              commandId - The command ID to send with the message.  If the
 *                          ZB_BINDING_ADDR destination is used, this parameter
 *                          also indicates the binding to use.
 *
 *              len - The size of the pData buffer in bytes
 *              handle - A handle used to identify the send data request.
 *              txOptions - TRUE if requesting acknowledgement from the destination.
 *              radius - The max number of hops the packet can travel through
 *                       before it is dropped.
 *
 * @return      none
 */
void zb_SendDataRequest ( uint16 destination, uint16 commandId, uint8 len,
                          uint8 *pData, uint8 handle, uint8 txOptions, uint8 radius )
{
  afStatus_t status;
  afAddrType_t dstAddr;

  txOptions |= AF_DISCV_ROUTE;

  // Set the destination address
  if (destination == ZB_BINDING_ADDR)
  {
    // Binding
    dstAddr.addrMode = afAddrNotPresent;
  }
  else
  {
    // Use short address
    dstAddr.addr.shortAddr = destination;
    dstAddr.addrMode = afAddr16Bit;

    if ( ADDR_NOT_BCAST != NLME_IsAddressBroadcast( destination ) )
    {
      txOptions &= ~AF_ACK_REQUEST;
    }
  }

  // Set the endpoint
  dstAddr.endPoint = sapi_epDesc.simpleDesc->EndPoint;

  // Send the message
  status = AF_DataRequest(&dstAddr, &sapi_epDesc, commandId, len,
                          pData, &handle, txOptions, radius);

  if (status != afStatus_SUCCESS)
  {
    SAPI_SendCback( SAPICB_DATA_CNF, status, handle );
  }
}

/******************************************************************************
 * @fn          zb_ReadConfiguration
 *
 * @brief       The zb_ReadConfiguration function is used to get a
 *              Configuration Protperty from Nonvolatile memory.
 *
 * @param       configId - The identifier for the configuration property
 *              len - The size of the pValue buffer in bytes
 *              pValue - A buffer to hold the configuration property
 *
 * @return      none
 */
uint8 zb_ReadConfiguration( uint8 configId, uint8 len, void *pValue )
{
  uint8 size;

  size = (uint8)osal_nv_item_len( configId );
  if ( size > len )
  {
    return ZFailure;
  }
  else
  {
    return( osal_nv_read(configId, 0, size, pValue) );
  }
}
/******************************************************************************
 * @fn          zb_WriteConfiguration
 *
 * @brief       The zb_WriteConfiguration function is used to write a
 *              Configuration Property to nonvolatile memory.
 *
 * @param       configId - The identifier for the configuration property
 *              len - The size of the pValue buffer in bytes
 *              pValue - A buffer containing the new value of the
 *                       configuration property
 *
 * @return      none
 */
uint8 zb_WriteConfiguration( uint8 configId, uint8 len, void *pValue )
{
  return( osal_nv_write(configId, 0, len, pValue) );
}
/******************************************************************************
 * @fn          zb_GetDeviceInfo
 *
 * @brief       The zb_GetDeviceInfo function retrieves a Device Information
 *              Property.
 *
 * @param       param - The identifier for the device information
 *              pValue - A buffer to hold the device information
 *
 * @return      none
 */
void zb_GetDeviceInfo ( uint8 param, void *pValue )
{
  switch(param)
  {
    case ZB_INFO_DEV_STATE:
      osal_memcpy(pValue, &devState, sizeof(uint8));
      break;
    case ZB_INFO_IEEE_ADDR:
      osal_memcpy(pValue, &aExtendedAddress, Z_EXTADDR_LEN);
      break;
    case ZB_INFO_SHORT_ADDR:
      osal_memcpy(pValue, &_NIB.nwkDevAddress, sizeof(uint16));
      break;
    case ZB_INFO_PARENT_SHORT_ADDR:
      osal_memcpy(pValue, &_NIB.nwkCoordAddress, sizeof(uint16));
      break;
    case ZB_INFO_PARENT_IEEE_ADDR:
      osal_memcpy(pValue, &_NIB.nwkCoordExtAddress, Z_EXTADDR_LEN);
      break;
    case ZB_INFO_CHANNEL:
      osal_memcpy(pValue, &_NIB.nwkLogicalChannel, sizeof(uint8));
      break;
    case ZB_INFO_PAN_ID:
      osal_memcpy(pValue, &_NIB.nwkPanId, sizeof(uint16));
      break;
    case ZB_INFO_EXT_PAN_ID:
      osal_memcpy(pValue, &_NIB.extendedPANID, Z_EXTADDR_LEN);
      break;
  }
}

/******************************************************************************
 * @fn          zb_FindDeviceRequest
 *
 * @brief       The zb_FindDeviceRequest function is used to determine the
 *              short address for a device in the network.  The device initiating
 *              a call to zb_FindDeviceRequest and the device being discovered
 *              must both be a member of the same network.  When the search is
 *              complete, the zv_FindDeviceConfirm callback function is called.
 *
 * @param       searchType - The type of search to perform. Can be one of following:
 *                           ZB_IEEE_SEARCH - Search for 16-bit addr given IEEE addr.
 *              searchKey - Value to search on.
 *
 * @return      none
 */
void zb_FindDeviceRequest( uint8 searchType, void *searchKey )
{
  if (searchType == ZB_IEEE_SEARCH)
  {
    ZDP_NwkAddrReq((uint8*) searchKey, ZDP_ADDR_REQTYPE_SINGLE, 0, 0 );
  }
}
/******************************************************************************
 * @fn          SAPI_StartConfirm
 *
 * @brief       The SAPI_StartConfirm callback is called by the ZigBee stack
 *              after a start request operation completes
 *
 * @param       status - The status of the start operation.  Status of
 *                       ZB_SUCCESS indicates the start operation completed
 *                       successfully.  Else the status is an error code.
 *
 * @return      none
 */
void SAPI_StartConfirm( uint8 status )
{
#if defined ( MT_SAPI_CB_FUNC )
  /* First check if MT has subscribed for this callback. If so , pass it as
  a event to MonitorTest and return control to calling function after that */
  if ( SAPICB_CHECK( SPI_CB_SAPI_START_CNF ) )
  {
    zb_MTCallbackStartConfirm( status );
  }
  else
#endif  //MT_SAPI_CB_FUNC
  {
    zb_StartConfirm( status );
  }
}

/******************************************************************************
 * @fn          SAPI_SendDataConfirm
 *
 * @brief       The SAPI_SendDataConfirm callback function is called by the
 *              ZigBee after a send data operation completes
 *
 * @param       handle - The handle identifying the data transmission.
 *              status - The status of the operation.
 *
 * @return      none
 */
void SAPI_SendDataConfirm( uint8 handle, uint8 status )
{
#if defined ( MT_SAPI_CB_FUNC )
  /* First check if MT has subscribed for this callback. If so , pass it as
  a event to MonitorTest and return control to calling function after that */
  if ( SAPICB_CHECK( SPI_CB_SAPI_SEND_DATA_CNF ) )
  {
    zb_MTCallbackSendDataConfirm( handle, status );
  }
  else
#endif  //MT_SAPI_CB_FUNC
  {
    zb_SendDataConfirm( handle, status );
  }
}

/******************************************************************************
 * @fn          SAPI_BindConfirm
 *
 * @brief       The SAPI_BindConfirm callback is called by the ZigBee stack
 *              after a bind operation completes.
 *
 * @param       commandId - The command ID of the binding being confirmed.
 *              status - The status of the bind operation.
 *              allowBind - TRUE if the bind operation was initiated by a call
 *                          to zb_AllowBindRespones.  FALSE if the operation
 *                          was initiated by a call to ZB_BindDevice
 *
 * @return      none
 */
void SAPI_BindConfirm( uint16 commandId, uint8 status )
{
#if defined ( MT_SAPI_CB_FUNC )
  /* First check if MT has subscribed for this callback. If so , pass it as
  a event to MonitorTest and return control to calling function after that */
  if ( SAPICB_CHECK( SPI_CB_SAPI_BIND_CNF ) )
  {
    zb_MTCallbackBindConfirm( commandId, status );
  }
  else
#endif  //MT_SAPI_CB_FUNC
  {
    zb_BindConfirm( commandId, status );
  }
}
/******************************************************************************
 * @fn          SAPI_AllowBindConfirm
 *
 * @brief       Indicates when another device attempted to bind to this device
 *
 * @param
 *
 * @return      none
 */
void SAPI_AllowBindConfirm( uint16 source )
{
  #if defined ( MT_SAPI_CB_FUNC )
  /* First check if MT has subscribed for this callback. If so , pass it as
  a event to MonitorTest and return control to calling function after that */
  if ( SAPICB_CHECK( SPI_CB_SAPI_ALLOW_BIND_CNF ) )
  {
    zb_MTCallbackAllowBindConfirm( source );
  }
  else
#endif  //MT_SAPI_CB_FUNC
  {
    zb_AllowBindConfirm( source );
  }
}
/******************************************************************************
 * @fn          SAPI_FindDeviceConfirm
 *
 * @brief       The SAPI_FindDeviceConfirm callback function is called by the
 *              ZigBee stack when a find device operation completes.
 *
 * @param       searchType - The type of search that was performed.
 *              searchKey - Value that the search was executed on.
 *              result - The result of the search.
 *
 * @return      none
 */
void SAPI_FindDeviceConfirm( uint8 searchType, uint8 *searchKey, uint8 *result )
{
#if defined ( MT_SAPI_CB_FUNC )
  /* First check if MT has subscribed for this callback. If so , pass it as
  a event to MonitorTest and return control to calling function after that */
  if ( SAPICB_CHECK( SPI_CB_SAPI_FIND_DEV_CNF ) )
  {
    zb_MTCallbackFindDeviceConfirm( searchType, searchKey, result );
  }
  else
#endif  //MT_SAPI_CB_FUNC
  {
    zb_FindDeviceConfirm( searchType, searchKey, result );
  }
}
/******************************************************************************
 * @fn          SAPI_ReceiveDataIndication
 *
 * @brief       The SAPI_ReceiveDataIndication callback function is called
 *              asynchronously by the ZigBee stack to notify the application
 *              when data is received from a peer device.
 *
 * @param       source - The short address of the peer device that sent the data
 *              command - The commandId associated with the data
 *              len - The number of bytes in the pData parameter
 *              pData - The data sent by the peer device
 *
 * @return      none

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕永久在线不卡| 中文字幕二三区不卡| 成人高清免费观看| 国产999精品久久| 国产高清不卡一区| 国产福利不卡视频| 国内精品伊人久久久久影院对白| 老司机午夜精品99久久| 久久99精品国产麻豆婷婷洗澡| 日韩国产成人精品| 蜜桃视频在线观看一区二区| 人人精品人人爱| 狠狠狠色丁香婷婷综合激情 | 亚洲成人动漫一区| 亚洲国产日韩a在线播放性色| 一区视频在线播放| 洋洋成人永久网站入口| 亚洲成人在线免费| 男女性色大片免费观看一区二区 | 久久久国产综合精品女国产盗摄| 精品不卡在线视频| 国产日韩欧美制服另类| 国产精品久久久久久亚洲伦| 亚洲免费看黄网站| 亚洲大片一区二区三区| 蜜臀av一级做a爰片久久| 国产精品亚洲综合一区在线观看| 成人午夜视频在线观看| 91污片在线观看| 欧美日韩视频一区二区| 久久综合五月天婷婷伊人| 日本一区二区三区高清不卡| 亚洲卡通欧美制服中文| 日本不卡高清视频| a亚洲天堂av| 91精品国产欧美一区二区| 久久亚洲一级片| 亚洲精品成人精品456| 日韩精品一卡二卡三卡四卡无卡| 国产一区二区不卡老阿姨| 99久久久久久| 91精品国产美女浴室洗澡无遮挡| 久久久精品国产免费观看同学| 亚洲乱码精品一二三四区日韩在线 | 偷拍日韩校园综合在线| 国产v综合v亚洲欧| 欧美精品久久久久久久久老牛影院| 久久久国产精华| 日本不卡不码高清免费观看| 99热在这里有精品免费| 精品国产免费一区二区三区四区| 亚洲欧美日韩一区二区| 国产高清不卡二三区| 91精品国产综合久久久蜜臀粉嫩| 中文字幕日本乱码精品影院| 蜜臀va亚洲va欧美va天堂| 91成人国产精品| 欧美高清在线精品一区| 久久成人免费网站| 欧美日韩精品一区二区三区| 亚洲三级免费电影| 成人网页在线观看| 久久蜜臀中文字幕| 久久精品噜噜噜成人88aⅴ | 欧美va亚洲va香蕉在线| 亚洲国产日韩综合久久精品| 99久久伊人精品| 国产欧美精品在线观看| 久久精品72免费观看| 欧美精品久久久久久久多人混战| 亚洲精品欧美激情| 99精品偷自拍| 亚洲欧洲精品一区二区三区不卡| 成人一区二区三区中文字幕| 久久综合久久综合久久| 精品制服美女久久| 2021久久国产精品不只是精品| 男女视频一区二区| 日韩免费看网站| 韩国理伦片一区二区三区在线播放| 日韩一区二区影院| 精品在线你懂的| 26uuu亚洲| 国产精品一二二区| 国产精品欧美久久久久无广告| 国产精品一二三四五| 2021国产精品久久精品| 国产成人aaa| 亚洲国产精品v| 91小宝寻花一区二区三区| 最新欧美精品一区二区三区| 91丨porny丨中文| 亚洲国产美女搞黄色| 91精品婷婷国产综合久久| 轻轻草成人在线| www欧美成人18+| caoporen国产精品视频| 夜夜嗨av一区二区三区中文字幕| 欧美性一级生活| 经典一区二区三区| 欧美极品aⅴ影院| 91美女在线视频| 三级在线观看一区二区| 精品久久国产老人久久综合| 成人国产亚洲欧美成人综合网| 综合在线观看色| 欧美精品日韩一本| 成人一区二区三区在线观看| 又紧又大又爽精品一区二区| 日韩一级黄色大片| 成人免费精品视频| 日韩激情在线观看| 亚洲国产精品成人综合| 欧美精品乱码久久久久久| 国产精品综合一区二区| 一区二区三区在线影院| 日韩一区二区视频| 91性感美女视频| 久久91精品久久久久久秒播| 国产精品国产三级国产三级人妇| 欧美三级一区二区| 国产91在线|亚洲| 天堂成人国产精品一区| 国产精品久久久久久久久免费丝袜| 91国模大尺度私拍在线视频| 精品一二三四区| 亚洲h动漫在线| 国产精品久久网站| 日韩欧美中文字幕精品| 色哟哟一区二区三区| 国产传媒久久文化传媒| 香蕉成人伊视频在线观看| 国产精品另类一区| 欧美日韩免费不卡视频一区二区三区| 亚洲国产精品精华液2区45| 4438x成人网最大色成网站| 91影视在线播放| 国产精品主播直播| 免费在线看一区| 亚洲福利视频一区| 中文字幕日韩欧美一区二区三区| 精品盗摄一区二区三区| 欧美精品黑人性xxxx| 欧美三级电影一区| 91久久人澡人人添人人爽欧美| 国产高清精品网站| 国产精品12区| 国产电影精品久久禁18| 精品一区二区三区久久| 老司机精品视频在线| 日韩成人午夜精品| 美女视频免费一区| 国产一区二区视频在线播放| 丝袜美腿成人在线| 日日夜夜免费精品视频| 日韩精品一级中文字幕精品视频免费观看| 一区二区欧美国产| 一区二区免费在线播放| 午夜影院久久久| 午夜精品一区二区三区电影天堂| 午夜精品爽啪视频| 免费观看在线综合| 国产资源精品在线观看| 国产乱人伦偷精品视频免下载| 老司机午夜精品99久久| 六月丁香综合在线视频| 日本中文字幕一区| 国产一区二区三区黄视频| 青草av.久久免费一区| 五月激情丁香一区二区三区| 久久婷婷久久一区二区三区| 欧美激情在线看| 欧美激情一区二区三区四区| 国产日韩精品一区二区三区| 日韩一区欧美小说| 日韩美女视频一区二区| 亚洲精品免费电影| 国产精品萝li| 亚洲va在线va天堂| 日韩国产精品久久久久久亚洲| 亚洲电影你懂得| 国产精品羞羞答答xxdd| 国产精品羞羞答答xxdd| 成人动漫一区二区| av一区二区三区四区| 欧美高清视频一二三区 | 96av麻豆蜜桃一区二区| 91免费国产在线| 97久久超碰国产精品| 777午夜精品免费视频| 日韩一区二区中文字幕| 久久精品欧美一区二区三区不卡| 亚洲男人电影天堂| 午夜av电影一区| 久久99精品国产.久久久久久| 韩日欧美一区二区三区| 成人免费精品视频| 欧美性大战久久久| 精品久久一二三区| 亚洲国产一区二区三区|