首页 > 其他 > 详细

si4438 cca 侦听

时间:2016-07-29 16:23:18      阅读:672      评论:0      收藏:0      [点我收藏+]

/* set GPIO0 for RSSI interrupt / CCA */
txbuf[0] = CMD_GPIO_PIN_CFG;
txbuf[1] = 27; /* GPIO[0] = 27: CCA or 37: CCA_LATCH */
txbuf[2] = 0; /* GPIO[1] = DONOTHING */
txbuf[3] = 0; /* GPIO[2] = DONOTHING */
txbuf[4] = 0; /* GPIO[3] = DONOTHING */
txbuf[5] = 0; /* NIRQ = behavior not modified */
txbuf[6] = 0; /* SDO = behavior not modified*/
txbuf[7] = 0; /* GEN_CONFIG = GPIO outputs will have the highest drive strength*/
si446x_SendCommand(8, txbuf);
si446x_WaitForCTS();

 

/* set RSSI threshold */
txbuf[0] = CMD_SET_PROPERTY;
txbuf[1] = PROP_MODEM_GROUP;
txbuf[2] = 0x03; /* num of property */
txbuf[3] = PROP_MODEM_RSSI_THRESH;/* start address */
txbuf[4] = 30; /* MODEM_RSSI_THRESH: if < 30, CCA GPIO0 becomes low */
txbuf[5] = 0x0c; /* MODEM_RSSI_JUMP_THRESH: default */
txbuf[6] = 0x22; /* MODEM_RSSI_CONTROL: check thresh after latch, latch RSSI when sync word is detected */
si446x_SendCommand(5, txbuf);
si446x_WaitForCTS();

si4438 cca 侦听

原文:http://www.cnblogs.com/zym0805/p/5718811.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!