Project Embedded Systems E-ict Denayer

Dependencies:   BSP_DISCO_F746NG F7_Ethernet LCD_DISCO_F746NG TS_DISCO_F746NG mbed-rtos mbed

Revision:
4:860566e5814e
Parent:
3:7aef6c427f97
Child:
5:0518cef07365
--- a/main.cpp	Mon Jul 17 01:00:39 2017 +0000
+++ b/main.cpp	Thu Aug 17 13:32:25 2017 +0000
@@ -10,50 +10,6 @@
 
 /*-----------------------------------------------------------*/
 
-int32_t l_CheckDHCP( void )                                     
-{
-    uint32_t ul_MyReturn = 2;
-    Network *x_DynNetwork = mpool.alloc();                                      //waarschijnlijk loopt het hier mis met een memory pool
-    //Network *x_DynNetwork;
-    
-    if( Eth.init( ) == 0 )
-    {
-        char c_NewIP[16];
-        Eth.connect( );
-        strncpy( c_NewIP, Eth.getIPAddress( ), 16 );
-        if( strcmp( x_DynNetwork->c_IPAddress, c_NewIP ) == false )
-        {
-            strncpy( x_DynNetwork->c_IPAddress, c_NewIP, 16 );
-            //display.DisplayStringAt( 270, 10, ( uint8_t * )x_DynNetwork->c_IPAddress, LEFT_MODE );
-            //display.DisplayStringAt( 270, 50, ( uint8_t * )Eth.getIPAddress( ), LEFT_MODE ); 
-            strncpy( x_DynNetwork->c_MACAddress, Eth.getMACAddress( ), 16 );
-            strncpy( x_DynNetwork->c_Netmask, Eth.getNetworkMask( ), 16 );
-            strncpy( x_DynNetwork->c_Gateway, Eth.getGateway( ), 16 );
-            queue.put(x_DynNetwork);
-        }
-        ul_MyReturn = 0;
-    }
-    else
-    {
-            ul_MyReturn =1;
-    }
-    return ul_MyReturn;
-}
-
-/*-----------------------------------------------------------*/
-
-int32_t l_CreateMenu( void )
-{
-    //480x272
-    display.DrawRect( 0, 0, 105, 68);
-    display.DisplayStringAt( 2, 34, ( uint8_t * )"DHCP", LEFT_MODE );
-    display.DrawRect( 0, 68, 105, 68);
-    display.DisplayStringAt( 2, 102, ( uint8_t * )"STATIC", LEFT_MODE );
-    return 0;
-}
-
-/*-----------------------------------------------------------*/
-
 int32_t l_ShowSettings( void )
 {
     l_ResetDisplay( );
@@ -72,7 +28,6 @@
         
         strncpy( c_NewIP, Eth.getIPAddress( ), 16 );
         l_ResetDisplay( );
-        l_CreateMenu( );
         
         display.DisplayStringAt( 130, 10, ( uint8_t * )"IP address: ", LEFT_MODE ); 
         display.DisplayStringAt( 270, 10, ( uint8_t * )c_NewIP, LEFT_MODE );  
@@ -88,9 +43,6 @@
 }
 
 /*-----------------------------------------------------------*/
-
-Serial pc(USBTX, USBRX); // tx, rx
-
 int32_t l_sendNTPpacket(void)
 {
     UDPSocket x_Sock;