1 | #ifndef NETWORK_INTERFACE_H
|
2 | #define NETWORK_INTERFACE_H
|
3 |
|
4 |
|
5 | //--------------------------------------------------------------
|
6 | // Includes
|
7 | //--------------------------------------------------------------
|
8 | #include "stm32f4xx.h"
|
9 | #include "stm32f4xx_gpio.h"
|
10 | #include "stm32f4xx_rcc.h"
|
11 | #include "stm32f4xx_syscfg.h"
|
12 | #include "stm32f4xx_exti.h"
|
13 | #include "misc.h"
|
14 | #include "stm32f4x7_eth_bsp.h"
|
15 | //#include "stm32f4x7_eth.h"
|
16 | #include "netconf.h"
|
17 |
|
18 |
|
19 | //--------------------------------------------------------------
|
20 | // DHCP-Mode
|
21 | // zum ausschalten, auskommentieren
|
22 | // falls DHCP disable -> wird die statische IP Adresse benutzt
|
23 | //--------------------------------------------------------------
|
24 | //#define USE_DHCP
|
25 | #define RMII_MODE
|
26 | //#define MII_MODE
|
27 |
|
28 |
|
29 |
|
30 | //--------------------------------------------------------------
|
31 | // MAC-Adresse (02:00:00:00:00:00)
|
32 | //--------------------------------------------------------------
|
33 | #define MAC_ADDR0 2
|
34 | #define MAC_ADDR1 0
|
35 | #define MAC_ADDR2 0
|
36 | #define MAC_ADDR3 0
|
37 | #define MAC_ADDR4 0
|
38 | #define MAC_ADDR5 0
|
39 |
|
40 | //--------------------------------------------------------------
|
41 | // statische IP-Adresse (192.168.2.105)
|
42 | // (falls DHCP enable wird diese ignoriert)
|
43 | //--------------------------------------------------------------
|
44 | #define IP_ADDR0 192
|
45 | #define IP_ADDR1 168
|
46 | #define IP_ADDR2 2
|
47 | #define IP_ADDR3 105
|
48 |
|
49 | //--------------------------------------------------------------
|
50 | // Netzmaske (255.255.255.0)
|
51 | //--------------------------------------------------------------
|
52 | #define NETMASK_ADDR0 255
|
53 | #define NETMASK_ADDR1 255
|
54 | #define NETMASK_ADDR2 255
|
55 | #define NETMASK_ADDR3 0
|
56 |
|
57 | //--------------------------------------------------------------
|
58 | // Gateway Adresse (192.168.2.1)
|
59 | //--------------------------------------------------------------
|
60 | #define GW_ADDR0 192
|
61 | #define GW_ADDR1 168
|
62 | #define GW_ADDR2 2
|
63 | #define GW_ADDR3 1
|
64 |
|
65 |
|
66 | //typedef enum {
|
67 | // HTTP_SERVER_OK =0,
|
68 | // HTTP_SERVER_ETH_MACDMA_ERR,
|
69 | // HTTP_SERVER_ETH_PHYINT_ERR
|
70 | //}HTTP_SERVER_STATUS_t;
|
71 |
|
72 |
|
73 | //--------------------------------------------------------------
|
74 | // Globale Funktionen
|
75 | //--------------------------------------------------------------
|
76 | //HTTP_SERVER_STATUS_t UB_HTTP_Server_Init(void);
|
77 | //void UB_HTTP_Server_Do(void);
|
78 |
|
79 |
|
80 | //--------------------------------------------------------------
|
81 | #endif
|