Project Embedded Systems E-ict Denayer

Dependencies:   BSP_DISCO_F746NG F7_Ethernet LCD_DISCO_F746NG TS_DISCO_F746NG mbed-rtos mbed

main.h

Committer:
Ayrton_L
Date:
2017-07-17
Revision:
3:7aef6c427f97
Parent:
2:1a5565ee8219
Child:
4:860566e5814e

File content as of revision 3:7aef6c427f97:

#ifndef MAIN_H
#define MAIN_H

#include "mbed.h"

#include "stdint.h"

#include "rtos.h"
#include "EthernetInterface.h"

#include "TS_DISCO_F746NG.h"
#include "LCD_DISCO_F746NG.h"



#ifndef NTP_SERVER_ADDRESS                                  
#define NTP_SERVER_ADDRESS          "1.be.pool.ntp.org"
#endif

#ifndef NTP_SERVER_ADDRESS_IP
#define NTP_SERVER_ADDRESS_IP       "185.77.199.1"
#endif

#ifndef NTP_SERVER_PORT                                  
#define NTP_SERVER_PORT             123                     
#endif


#ifndef NTP_PACKET_SIZE
#define NTP_PACKET_SIZE     48
#endif


/*-----------------------------------------------------------*/

struct Network
{
    char c_Netmask[16];
    char c_Gateway[16];
    char c_IPAddress[16];
    char c_MACAddress[16];
};


EthernetInterface Eth;
LCD_DISCO_F746NG display;
TS_DISCO_F746NG Touch;




MemoryPool<Network, 64> mpool;
Queue<Network, 64> queue;


/*-----------------------------------------------------------*/

int32_t l_ResetDisplay( void );
int32_t l_CreateMenu( void );
int32_t l_ShowSettings( void );
int32_t l_sendNTPpacket(void);

/*-----------------------------------------------------------*/

#endif