20
20
#ifndef MONGOOSE_H
21
21
#define MONGOOSE_H
22
22
23
- #define MG_VERSION " 7.14 "
23
+ #define MG_VERSION " 7.15 "
24
24
25
25
#ifdef __cplusplus
26
26
extern " C" {
@@ -3074,22 +3074,14 @@ struct mg_tcpip_driver_tm4c_data {
3074
3074
#endif
3075
3075
3076
3076
3077
- #if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_XMC ) && MG_ENABLE_DRIVER_XMC
3077
+ #if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_W5500 ) && MG_ENABLE_DRIVER_W5500
3078
3078
3079
- struct mg_tcpip_driver_xmc_data {
3080
- // 13.2.8.1 Station Management Functions
3081
- // MDC clock divider (). MDC clock is derived from ETH MAC clock
3082
- // It must not exceed 2.5MHz
3083
- // ETH Clock range DIVIDER mdc_cr VALUE
3084
- // --------------------------------------------
3085
- // -1 <-- tell driver to guess the value
3086
- // 60-100 MHz ETH Clock/42 0
3087
- // 100-150 MHz ETH Clock/62 1
3088
- // 20-35 MHz ETH Clock/16 2
3089
- // 35-60 MHz ETH Clock/26 3
3090
- // 150-250 MHz ETH Clock/102 4
3091
- // 250-300 MHz ETH Clock/124 5
3092
- // 110, 111 Reserved
3079
+ #endif
3080
+
3081
+
3082
+ #if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_XMC7) && MG_ENABLE_DRIVER_XMC7
3083
+
3084
+ struct mg_tcpip_driver_xmc7_data {
3093
3085
int mdc_cr; // Valid values: -1, 0, 1, 2, 3, 4, 5
3094
3086
uint8_t phy_addr;
3095
3087
};
@@ -3099,31 +3091,45 @@ struct mg_tcpip_driver_xmc_data {
3099
3091
#endif
3100
3092
3101
3093
#ifndef MG_DRIVER_MDC_CR
3102
- #define MG_DRIVER_MDC_CR 4
3094
+ #define MG_DRIVER_MDC_CR 3
3103
3095
#endif
3104
3096
3105
3097
#define MG_TCPIP_DRIVER_INIT (mgr ) \
3106
3098
do { \
3107
- static struct mg_tcpip_driver_xmc_data driver_data_; \
3099
+ static struct mg_tcpip_driver_xmc7_data driver_data_; \
3108
3100
static struct mg_tcpip_if mif_; \
3109
3101
driver_data_.mdc_cr = MG_DRIVER_MDC_CR; \
3110
3102
driver_data_.phy_addr = MG_TCPIP_PHY_ADDR; \
3111
3103
mif_.ip = MG_TCPIP_IP; \
3112
3104
mif_.mask = MG_TCPIP_MASK; \
3113
3105
mif_.gw = MG_TCPIP_GW; \
3114
- mif_.driver = &mg_tcpip_driver_xmc ; \
3106
+ mif_.driver = &mg_tcpip_driver_xmc7 ; \
3115
3107
mif_.driver_data = &driver_data_; \
3116
3108
MG_SET_MAC_ADDRESS (mif_.mac ); \
3117
3109
mg_tcpip_init (mgr, &mif_); \
3118
- MG_INFO ((" Driver: xmc , MAC: %M" , mg_print_mac, mif_.mac )); \
3110
+ MG_INFO ((" Driver: xmc7 , MAC: %M" , mg_print_mac, mif_.mac )); \
3119
3111
} while (0 )
3120
3112
3121
3113
#endif
3122
3114
3123
3115
3124
- #if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_XMC7) && MG_ENABLE_DRIVER_XMC7
3125
3116
3126
- struct mg_tcpip_driver_xmc7_data {
3117
+ #if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_XMC) && MG_ENABLE_DRIVER_XMC
3118
+
3119
+ struct mg_tcpip_driver_xmc_data {
3120
+ // 13.2.8.1 Station Management Functions
3121
+ // MDC clock divider (). MDC clock is derived from ETH MAC clock
3122
+ // It must not exceed 2.5MHz
3123
+ // ETH Clock range DIVIDER mdc_cr VALUE
3124
+ // --------------------------------------------
3125
+ // -1 <-- tell driver to guess the value
3126
+ // 60-100 MHz ETH Clock/42 0
3127
+ // 100-150 MHz ETH Clock/62 1
3128
+ // 20-35 MHz ETH Clock/16 2
3129
+ // 35-60 MHz ETH Clock/26 3
3130
+ // 150-250 MHz ETH Clock/102 4
3131
+ // 250-300 MHz ETH Clock/124 5
3132
+ // 110, 111 Reserved
3127
3133
int mdc_cr; // Valid values: -1, 0, 1, 2, 3, 4, 5
3128
3134
uint8_t phy_addr;
3129
3135
};
@@ -3133,28 +3139,27 @@ struct mg_tcpip_driver_xmc7_data {
3133
3139
#endif
3134
3140
3135
3141
#ifndef MG_DRIVER_MDC_CR
3136
- #define MG_DRIVER_MDC_CR 3
3142
+ #define MG_DRIVER_MDC_CR 4
3137
3143
#endif
3138
3144
3139
3145
#define MG_TCPIP_DRIVER_INIT (mgr ) \
3140
3146
do { \
3141
- static struct mg_tcpip_driver_xmc7_data driver_data_; \
3147
+ static struct mg_tcpip_driver_xmc_data driver_data_; \
3142
3148
static struct mg_tcpip_if mif_; \
3143
3149
driver_data_.mdc_cr = MG_DRIVER_MDC_CR; \
3144
3150
driver_data_.phy_addr = MG_TCPIP_PHY_ADDR; \
3145
3151
mif_.ip = MG_TCPIP_IP; \
3146
3152
mif_.mask = MG_TCPIP_MASK; \
3147
3153
mif_.gw = MG_TCPIP_GW; \
3148
- mif_.driver = &mg_tcpip_driver_xmc7 ; \
3154
+ mif_.driver = &mg_tcpip_driver_xmc ; \
3149
3155
mif_.driver_data = &driver_data_; \
3150
3156
MG_SET_MAC_ADDRESS (mif_.mac ); \
3151
3157
mg_tcpip_init (mgr, &mif_); \
3152
- MG_INFO ((" Driver: xmc7 , MAC: %M" , mg_print_mac, mif_.mac )); \
3158
+ MG_INFO ((" Driver: xmc , MAC: %M" , mg_print_mac, mif_.mac )); \
3153
3159
} while (0 )
3154
3160
3155
3161
#endif
3156
3162
3157
-
3158
3163
#ifdef __cplusplus
3159
3164
}
3160
3165
#endif
0 commit comments