Project Embedded Systems E-ict Denayer
Dependencies: BSP_DISCO_F746NG F7_Ethernet LCD_DISCO_F746NG TS_DISCO_F746NG mbed-rtos mbed
main.h@3:7aef6c427f97, 2017-07-17 (annotated)
- Committer:
- Ayrton_L
- Date:
- Mon Jul 17 01:00:39 2017 +0000
- Revision:
- 3:7aef6c427f97
- Parent:
- 2:1a5565ee8219
- Child:
- 4:860566e5814e
first remote
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Ayrton_L | 0:16bcf70d262e | 1 | #ifndef MAIN_H |
Ayrton_L | 0:16bcf70d262e | 2 | #define MAIN_H |
Ayrton_L | 0:16bcf70d262e | 3 | |
Ayrton_L | 0:16bcf70d262e | 4 | #include "mbed.h" |
Ayrton_L | 0:16bcf70d262e | 5 | |
Ayrton_L | 0:16bcf70d262e | 6 | #include "stdint.h" |
Ayrton_L | 0:16bcf70d262e | 7 | |
Ayrton_L | 0:16bcf70d262e | 8 | #include "rtos.h" |
Ayrton_L | 0:16bcf70d262e | 9 | #include "EthernetInterface.h" |
Ayrton_L | 3:7aef6c427f97 | 10 | |
Ayrton_L | 0:16bcf70d262e | 11 | #include "TS_DISCO_F746NG.h" |
Ayrton_L | 0:16bcf70d262e | 12 | #include "LCD_DISCO_F746NG.h" |
Ayrton_L | 1:a2f7adf6db3d | 13 | |
Ayrton_L | 3:7aef6c427f97 | 14 | |
Ayrton_L | 3:7aef6c427f97 | 15 | |
Ayrton_L | 3:7aef6c427f97 | 16 | #ifndef NTP_SERVER_ADDRESS |
Ayrton_L | 3:7aef6c427f97 | 17 | #define NTP_SERVER_ADDRESS "1.be.pool.ntp.org" |
Ayrton_L | 3:7aef6c427f97 | 18 | #endif |
Ayrton_L | 3:7aef6c427f97 | 19 | |
Ayrton_L | 3:7aef6c427f97 | 20 | #ifndef NTP_SERVER_ADDRESS_IP |
Ayrton_L | 3:7aef6c427f97 | 21 | #define NTP_SERVER_ADDRESS_IP "185.77.199.1" |
Ayrton_L | 3:7aef6c427f97 | 22 | #endif |
Ayrton_L | 3:7aef6c427f97 | 23 | |
Ayrton_L | 3:7aef6c427f97 | 24 | #ifndef NTP_SERVER_PORT |
Ayrton_L | 3:7aef6c427f97 | 25 | #define NTP_SERVER_PORT 123 |
Ayrton_L | 3:7aef6c427f97 | 26 | #endif |
Ayrton_L | 3:7aef6c427f97 | 27 | |
Ayrton_L | 3:7aef6c427f97 | 28 | |
Ayrton_L | 3:7aef6c427f97 | 29 | #ifndef NTP_PACKET_SIZE |
Ayrton_L | 3:7aef6c427f97 | 30 | #define NTP_PACKET_SIZE 48 |
Ayrton_L | 3:7aef6c427f97 | 31 | #endif |
Ayrton_L | 3:7aef6c427f97 | 32 | |
Ayrton_L | 0:16bcf70d262e | 33 | |
Ayrton_L | 1:a2f7adf6db3d | 34 | /*-----------------------------------------------------------*/ |
Ayrton_L | 0:16bcf70d262e | 35 | |
Ayrton_L | 0:16bcf70d262e | 36 | struct Network |
Ayrton_L | 0:16bcf70d262e | 37 | { |
Ayrton_L | 0:16bcf70d262e | 38 | char c_Netmask[16]; |
Ayrton_L | 0:16bcf70d262e | 39 | char c_Gateway[16]; |
Ayrton_L | 0:16bcf70d262e | 40 | char c_IPAddress[16]; |
Ayrton_L | 0:16bcf70d262e | 41 | char c_MACAddress[16]; |
Ayrton_L | 0:16bcf70d262e | 42 | }; |
Ayrton_L | 0:16bcf70d262e | 43 | |
Ayrton_L | 1:a2f7adf6db3d | 44 | |
Ayrton_L | 1:a2f7adf6db3d | 45 | EthernetInterface Eth; |
Ayrton_L | 1:a2f7adf6db3d | 46 | LCD_DISCO_F746NG display; |
Ayrton_L | 1:a2f7adf6db3d | 47 | TS_DISCO_F746NG Touch; |
Ayrton_L | 3:7aef6c427f97 | 48 | |
Ayrton_L | 3:7aef6c427f97 | 49 | |
Ayrton_L | 3:7aef6c427f97 | 50 | |
Ayrton_L | 1:a2f7adf6db3d | 51 | |
Ayrton_L | 2:1a5565ee8219 | 52 | MemoryPool<Network, 64> mpool; |
Ayrton_L | 2:1a5565ee8219 | 53 | Queue<Network, 64> queue; |
Ayrton_L | 0:16bcf70d262e | 54 | |
Ayrton_L | 0:16bcf70d262e | 55 | |
Ayrton_L | 1:a2f7adf6db3d | 56 | /*-----------------------------------------------------------*/ |
Ayrton_L | 1:a2f7adf6db3d | 57 | |
Ayrton_L | 3:7aef6c427f97 | 58 | int32_t l_ResetDisplay( void ); |
Ayrton_L | 3:7aef6c427f97 | 59 | int32_t l_CreateMenu( void ); |
Ayrton_L | 3:7aef6c427f97 | 60 | int32_t l_ShowSettings( void ); |
Ayrton_L | 3:7aef6c427f97 | 61 | int32_t l_sendNTPpacket(void); |
Ayrton_L | 1:a2f7adf6db3d | 62 | |
Ayrton_L | 1:a2f7adf6db3d | 63 | /*-----------------------------------------------------------*/ |
Ayrton_L | 1:a2f7adf6db3d | 64 | |
Ayrton_L | 0:16bcf70d262e | 65 | #endif |