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:
- 6:11edc8f9d870
- Parent:
- 3:9615ce1548c4
- Parent:
- 5:fb39c8c13b34
- Child:
- 7:59a37ccd06ef
--- a/main.cpp Mon Nov 23 12:59:19 2020 +0000 +++ b/main.cpp Mon Nov 23 13:07:58 2020 +0000 @@ -4,8 +4,13 @@ *********************************** * Round trip delay meter. This is the "echo" module. * A microcontroller board with an Ethernet interface. +<<<<<<< working copy * An other microcontroller with "Round Trip Delay" will be needed. * ST NUCLEO H743ZI2 used for testing. +======= + * An other microcontroller with "Round trip echo" will be needed. + * NXP FRDM-K64F used for testing. +>>>>>>> merge rev * * Timo Karppinen 23.11.2020 ***********************************/ @@ -37,8 +42,13 @@ void udpReceive( void ); void udpSend( void ); +<<<<<<< working copy DigitalIn sw2(PC_13); // Blue button on H743ZI, button pressed = TRUE DigitalOut led2(PE_1); // Yellow LED on H743ZI +======= +DigitalIn sw2(SW2); // sw2 on K64F, button pressed = FALSE +DigitalOut led2(LED2); // RGB LED green on K64F +>>>>>>> merge rev int sw2state = 0; int sw2old = 1; @@ -53,7 +63,11 @@ Timer armedFor; int main() { +<<<<<<< working copy printf("\nEcho for the Round Trip Delay application (using Ethernet)\r\n"); +======= + printf("\nRound trip delay in UDP messaging (using Ethernet)\n"); +>>>>>>> merge rev //Bring up the network interface net.connect(); @@ -85,7 +99,7 @@ while(1) { sw2state = sw2.read(); - printf( "sw2state is %d\n", sw2state); + printf( "\nsw2state is %d\n", sw2state); if((sw2state == 1)&&(sw2state != sw2old)) { led2.write(1); @@ -139,6 +153,10 @@ printf("string: %s\n",in_data); printf("client address: %s\n", clientUDP.get_ip_address()); printf("\n"); +<<<<<<< working copy +======= + +>>>>>>> merge rev } }