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: mbed EthernetNetIf
Diff: main.cpp
- Revision:
- 1:98d377ac0af5
- Parent:
- 0:733a3a171a22
- Child:
- 2:67b04d61fdaf
diff -r 733a3a171a22 -r 98d377ac0af5 main.cpp
--- a/main.cpp Tue May 03 20:07:22 2011 +0000
+++ b/main.cpp Tue May 03 22:10:33 2011 +0000
@@ -1,19 +1,4 @@
-/*
- \file main.cpp
- \version: 1.0
-
- \brief Este fichero contiene ejemplo para sincronizacion de fecha y hora
- mediante TCPClient
-
- \web www.micros-designs.com.ar
- \date 19/01/11
-
-*- Version Log --------------------------------------------------------------*
-* Fecha Autor Comentarios *
-*----------------------------------------------------------------------------*
-* 19/01/11 Suky Original *
-*----------------------------------------------------------------------------*
-*/
+
#include "mbed.h"
#include "EthernetNetIf.h"
#include "TCPSocket.h"
@@ -21,8 +6,6 @@
#define SERVER_ADR IpAddr(192,168,1,110) // server address
#define SERVER_PORT 12345 // server address
// **********************************************************************
-DigitalIn button(p8);
-// **********************************************************************
DigitalOut led4(LED4, "led4");
int global_counter=0;
@@ -90,14 +73,7 @@
while(true){
Net::poll();
- if(!button){
- printf("Conecting host...\n");
- TCPSocketErr err = tcp.connect(server);
- if(err){
- printf("Error connecting\n");
- }
- }
-
+
if(flags.readable==1){
char Buffer[100]={0};
flags.readable=0;