-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.h
117 lines (94 loc) · 4.33 KB
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/**
******************************************************************************
* @file main.h
* @author MCD Application Team
* @version V1.0.0
* @date 31-October-2011
* @brief This file contains all the functions prototypes for the main.c
* file.
******************************************************************************
* @attention
*
* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
* TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
* DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
* FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
* CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*
* <h2><center>© COPYRIGHT 2011 STMicroelectronics</center></h2>
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include "stm32f4xx.h"
#include "stm32f4x7_eth_bsp.h"
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
//#define USE_LCD /* enable LCD */
//#define USE_DHCP /* enable DHCP, if disabled static address is used*/
/* Uncomment SERIAL_DEBUG to enables retarget of printf to serial port (COM1 on STM32 evalboard)
for debug purpose */
//#define SERIAL_DEBUG
/* MAC ADDRESS*/
#define MAC_ADDR0 0xC2
#define MAC_ADDR1 0xAF
#define MAC_ADDR2 0x51
#define MAC_ADDR3 0x03
#define MAC_ADDR4 0xCF
#define MAC_ADDR5 0x46
/*Static IP ADDRESS*/
#define IP_ADDR0 192
#define IP_ADDR1 168
#define IP_ADDR2 1
#define IP_ADDR3 147
/*NETMASK*/
#define NETMASK_ADDR0 255
#define NETMASK_ADDR1 255
#define NETMASK_ADDR2 255
#define NETMASK_ADDR3 0
/*Gateway Address*/
#define GW_ADDR0 192
#define GW_ADDR1 168
#define GW_ADDR2 1
#define GW_ADDR3 1
#define USE_DHCP 1
/* MII and RMII mode selection, for STM324xG-EVAL Board(MB786) RevB ***********/
#define RMII_MODE // User have to provide the 50 MHz clock by soldering a 50 MHz
// oscillator (ref SM7745HEV-50.0M or equivalent) on the U3
// footprint located under CN3 and also removing jumper on JP5.
// This oscillator is not provided with the board.
// For more details, please refer to STM3240G-EVAL evaluation
// board User manual (UM1461).
//#define MII_MODE
/* Uncomment the define below to clock the PHY from external 25MHz crystal (only for MII mode) */
#ifdef MII_MODE
#define PHY_CLOCK_MCO
#endif
/* STM324xG-EVAL jumpers setting
+==========================================================================================+
+ Jumper | MII mode configuration | RMII mode configuration +
+==========================================================================================+
+ JP5 | 2-3 provide 25MHz clock by MCO(PA8) | Not fitted +
+ | 1-2 provide 25MHz clock by ext. Crystal | +
+ -----------------------------------------------------------------------------------------+
+ JP6 | 2-3 | 1-2 +
+ -----------------------------------------------------------------------------------------+
+ JP8 | Open | Close +
+==========================================================================================+
*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void Time_Update(void);
extern char DHCP_Finished;
void API_Ping_Task(void * pvParameters);
#ifdef __cplusplus
}
#endif
#endif /* __MAIN_H */
/******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/