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.
Diff: main.cpp
- Revision:
- 18:452b5da21cfd
- Parent:
- 17:54a003ac9610
- Child:
- 21:4d6b26eecdac
diff -r 54a003ac9610 -r 452b5da21cfd main.cpp --- a/main.cpp Wed Jul 17 20:47:41 2013 +0000 +++ b/main.cpp Wed Jul 17 21:09:02 2013 +0000 @@ -20,7 +20,7 @@ DigitalOut cs(PTD0); //SPI chip select char recv; -char temp; + int state; char cha1_pha, cha2_pha; @@ -227,7 +227,7 @@ // In display mode, show current parameters case MODE_DISPLAY: - + pc.printf("\n\n ******** Current Parameters ********\n\n"); pc.printf("Phase shift for RF out1 is %d degrees\n", cha1_pha*-7); pc.printf("Attentuation for RF out1 is %.1f dB\n", cha1_amp*5.0/10.0); pc.printf("Phase shift for RF out2 is %d degrees\n", cha2_pha*-7); @@ -238,7 +238,7 @@ break; //Help mode, displays help info case MODE_HELP: - + pc.printf("\n\n******** Help info ********\n"); pc.printf("%s", msg_help); pc.printf("%s", msg_ret); pc.getc(); @@ -258,6 +258,7 @@ cs = 1; //Start printint... + pc.printf("******** Now sending parameters ********\n\n"); pc.printf("Phase shift for RF out1 is %d degrees\n", cha1_pha*-7); pc.printf("Attentuation for RF out1 is %.1f dB\n", cha1_amp*5.0/10.0); pc.printf("Phase shift for RF out2 is %d degrees\n", cha2_pha*-7); @@ -279,11 +280,11 @@ spi_stream = spi_stream << 1; } - pc.printf("\n\nParameters sent OK\n\n\n\n"); + //pc.printf("\n\nParameters sent OK\n\n\n\n"); //Output the previous parameters: - pc.printf("Now displaying the previous parameters\n"); + pc.printf("\n\n\n******** Now displaying previous parameters ********\n"); pc.printf("\nPrevious phase shift for RF out1 is %d degrees\n", (spi_second_byte_r&0x07)*-7); pc.printf("Previous attentuation for RF out1 is %.1f dB\n", (spi_second_byte_r>>4)*5.0/10.0); pc.printf("Previous phase shift for RF out2 is %d degrees\n", (spi_first_byte_r&0x07)*-7);