![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
General testings
Fork of BEACON_CODE_NEW by
Diff: BCN.cpp
- Revision:
- 26:89b6bb0859a1
- Parent:
- 25:6863457ea3d1
- Child:
- 27:eb8c593c4ea8
diff -r 6863457ea3d1 -r 89b6bb0859a1 BCN.cpp --- a/BCN.cpp Fri Oct 30 06:32:46 2015 +0000 +++ b/BCN.cpp Fri Oct 30 21:08:24 2015 +0000 @@ -109,7 +109,7 @@ void SHORT_BCN_TX() { writereg(RF22_REG_6E_TX_DATA_RATE,0x01); - writereg(RF22_REG_6F_TX_DATA_RATE,0x4F);//160bps + writereg(RF22_REG_6F_TX_DATA_RATE,0x50);//160bps writereg(RF22_REG_3E_PACKET_LENGTH,SHORT_TX_DATA); //short packet length wait(0.02); @@ -235,7 +235,7 @@ writereg(RF22_REG_07_OPERATING_MODE1,0x00); //standby mode } -void reset_uC() +void reset_rfm() { FCTN_BCN_INIT(); } @@ -254,7 +254,7 @@ } else if(count == 5) { - reset_uC(), printf("reg = 0x%X\n",reg);break; + reset_rfm(), printf("reg = 0x%X\n",reg);break; } } else @@ -313,7 +313,7 @@ pc.printf("spi connection valid\r\n"); else {pc.printf("error in spi connection\r\n"); - reset_uC(); + reset_rfm(); } writereg(RF22_REG_07_OPERATING_MODE1,0x80); //sw_reset @@ -340,7 +340,7 @@ if((readreg(RF22_REG_02_DEVICE_STATUS)& 0x08)!= 0x00) { pc.printf("frequency not set properly\r\n"); - reset_uC(); + reset_rfm(); } //set Modem Configuration