ti的cc2530的WeBEE CC2530 BasicRF的api解释

ti的例子程序里找到的文档,现在进行一下简单的翻译


这是basicRfCfg_t结构体,如果想使用这个api必须要使用的结构体。

myAddr   16位的短地址,这是ZigBee模块自身的地址。

panId     ZigBee协议使用一个16位的个域网标志符(PAN ID)来标识一个网络,panid不同即标志着不同的网络,可以说是网络的名字。

channel    RF的通道(必须在11到26之间);

ackRequest 如果为真,则要求从目的地址的ZigBee模块得到ack信号

最后两个是安全用的,由于我不用安全信息,所以没有详细了解。

函数:

void basicRfInit(basicRfCfg_t* pRfConfig) ;初始化结构体。


uint8 basicRfSendPacket(uint16 destAddr, uint8* pPayload, uint8 length) 

Send packet to the given destination short address. Returns TRUE if packet was sent 

successfully, and FAILED otherwise. If ackRequest is TRUE the return value of this function 
will only be TRUE if an acknowledgment is received from the destination.

发送包到指定的地址-destAddr,如果返回真,标志成功的发送了包,为假则相反。



uint8 basicRfPacketIsReady(void) 
Returns TRUE if a received packet is ready to be retrieved by higher layer. 

如果上层准备好了接收这个发来的包,则返回真。


int8 basicRfGetRssi(void) 
Returns the RSSI value of the last received packet 

返回得到最后一个包的RSSI值,这个函数一般应用于得到网络状况,以是否应该加大或减少发射功率。

uint8 basicRfReceive(uint8* pRxData, uint8 len, int16* pRssi) 
Retrieve packet from basic RF layer. The caller is responsible for allocating buffer space for 
data and the RSSI value. 

//我也不懂

void basicRfReceiveOn(void) 
Turn on receiveron radio. After calling this function the radio is kept on until 
basicRfReceiveOff is called. 

打开射频模块,只要这个函数被调用,如果不调用下面的函数,那么射频模块将一直开着

void basicRfReceiveOff(void) 
Turn off receiver on radio, and keep it off unless for transmitting a packet with Clear Channel 
Assessment. 

关闭射频模块。



、、、、、



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值