Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP mbed-rtos mbed
Fork of workinQM_10thDec by
Diff: BCN.cpp
- Revision:
- 18:3662058a7c10
- Parent:
- 16:f9e484dc505e
- Child:
- 19:79e69017c855
diff -r fc782f7548c6 -r 3662058a7c10 BCN.cpp --- a/BCN.cpp Fri May 13 11:56:49 2016 +0000 +++ b/BCN.cpp Sat May 14 11:19:13 2016 +0000 @@ -25,14 +25,16 @@ { pc_bcn.printf("FCTN_BCN_INIT\n"); BCN_INIT_STATUS = 1; - if(BCN_FEN == 0) - rf_sl_timeout.attach(&FCTN_BCN_FEN, 30); +/// if(BCN_FEN == 0) +/// rf_sl_timeout.attach(&FCTN_BCN_FEN, 70);//actually 30 \\ so basically not able to call the interrupt .!! is it so? +/// FCTN_BCN_FEN(); + Init_BEACON_HW(); BCN_INIT_STATUS = 0; } -void FCTN_BCN_FEN() +void FCTN_BCN_FEN(void const *args) { - pc_bcn.printf("FCTN_FEN\n"); + printf("\n\n\rFCTN_FEN\n"); BCN_FEN = 1;//write this value to flash } void FCTN_BCN_TX_MAIN() @@ -60,7 +62,7 @@ else { //transmit short beacon and long beacon - //SHORT_BCN_TX(); + SHORT_BCN_TX(); LONG_BCN_TX(); if(Check_ACK_RECEIVED() == 1) @@ -116,6 +118,8 @@ writereg(RF22_REG_6F_TX_DATA_RATE,0x50);//160bps writereg(RF22_REG_3E_PACKET_LENGTH,SHORT_TX_DATA); //short packet length wait(0.02); + + printf("\n\rstage 1"); uint32_t timeout_count = 10e5; //extract values from short_beacon[] @@ -175,10 +179,10 @@ //Check for packet_sent while(timeout_count--)if((readreg(RF22_REG_03_INTERRUPT_STATUS1) & 0x04) == 0x04)break; - //pc_bcn.printf("Short packet sent\r\n"); + pc_bcn.printf("Short packet sent\r\n"); writereg(RF22_REG_07_OPERATING_MODE1,0x00); //standby mode - + } void LONG_BCN_TX() {