首页 > 电脑

ZigBee模块cc2530中蜂鸣报警器的程序代码

更新时间2018-06-28 08:06:45

求详细代码。。

代码如下:

if( events & SDApp_MY_EVT )   {           chartheMessageData[] = "hello worker.!";         SDApp_DstAddr.addrMode = (afAddrMode_t)AddrGroup; //发送模式为组播的模式    SDApp_DstAddr.addr.shortAddr = 0x0002; //接收模块的组编号    // Take the first endpoint, Can be changed to search through endpoints    SDApp_DstAddr.endPoint = SDApp_ENDPOINT ; //接收模块的端点房间号        //SDApp_epDesc 结构体 端点描述符有源端点的信息,也是10        if(  AF_DataRequest( &SDApp_DstAddr, &SDApp_epDesc,                 / 发送函数                          0x0001,                             //族编号                         (byte)osal_strlen( theMessageData ) + 1,               //发送字符串的长度                         (byte *)&theMessageData,                   //字符串内容数组的首地址                         &SDApp_TransID,                          AF_DISCV_ROUTE, AF_DEFAULT_RADIUS ) == afStatus_SUCCESS )     {       HalLedBlink( HAL_LED_1,5,50,1000 );           }  else    {      P2SEL &= 0xef; //1110 1111     P2DIR |= 0x10; //0001 0000     P2_4 = 1; //在这里触发,但没有任何响应</strong></span>     HalLedBlink( HAL_LED_2,5,50,1000 );                                                                                           }


有详细教程

www.cdle.net上面有。去找一下。

上一篇:为什么我用BP神经网络预测的效果不好,输出的基本是固定的值呢?

下一篇:脚本错误问题