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
Revision 99:df6f43921af4, committed 2017-02-17
- Comitter:
- azaddevarm
- Date:
- Fri Feb 17 15:39:16 2017 +0000
- Parent:
- 98:321edb143f26
- Commit message:
- printing bcn data in bcn_tx
Changed in this revision
BCN.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/BCN.cpp Tue Feb 14 16:18:16 2017 +0000 +++ b/BCN.cpp Fri Feb 17 15:39:16 2017 +0000 @@ -4,6 +4,7 @@ #include "pin_config.h" #define short_bcn_print 1 //For printing short bcn data in SHORT_HK_data_AQ() +#define bcn_data_print 1 //For printing short and long bcn data in BCN_TX() //Check the pin names //Takes max 4 sec in void FCTN_BCN_TX_MAIN() (temp.calc. + long_beacon + short_beacon) @@ -102,7 +103,7 @@ SHORT_HK_data[14] = crc8_short(); #if short_bcn_print - pc_bcn.printf("\n\rShort BCN data:\n"); + pc_bcn.printf("\n\rShort BCN data in DATA_AQ:\n"); for(int ib = 0;ib<15;ib++) pc_bcn.printf("\n\r%02x",SHORT_HK_data[ib]); pc_bcn.printf("\n\rV_D = %d\n",quant_data.voltage_quant[6]); pc_bcn.printf("V_C = %d\n",quant_data.voltage_quant[5]); @@ -284,7 +285,16 @@ void BCN_TX() // main function for transmitting { pc_bcn.printf("BCN_TX\n\r"); - + #if bcn_data_print + //Printing Beacon data: + pc_bcn.printf("Short beacon data in BCN_TX:\n\r"); + for (int i = 0; i<15 ; i++) + pc_bcn.printf("%d\n\r",SHORT_HK_data[i]); + pc_bcn.printf("Long beacon data:\n\r"); + for (int i = 0; i<134 ; i++) + pc_bcn.printf("%d\n\r",LONG_HK_data[BCN_LONG_MSG_TYPE][i]); + //Done printing + #endif writereg(RF22_REG_6E_TX_DATA_RATE,0x0A); writereg(RF22_REG_6F_TX_DATA_RATE,0x7C);//1280bps wait(0.02);