mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-01 13:10:43 +00:00
Merge pull request #1936 from cesanta/stm32driverdata
Rename driver data structure
This commit is contained in:
8 files changed
+8
-8
No files matched your search
@@ -70,7 +70,7 @@ int main(void) {
|
|||||||
// Initialise Mongoose network stack
|
// Initialise Mongoose network stack
|
||||||
// Specify MAC address, and IP/mask/GW in network byte order for static
|
// Specify MAC address, and IP/mask/GW in network byte order for static
|
||||||
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
||||||
struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
struct mip_driver_stm32_data driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
||||||
struct mip_if mif = {
|
struct mip_if mif = {
|
||||||
.mac = {2, 0, 1, 2, 3, 5},
|
.mac = {2, 0, 1, 2, 3, 5},
|
||||||
.driver = &mip_driver_stm32,
|
.driver = &mip_driver_stm32,
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ static void server(void *args) {
|
|||||||
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
||||||
MG_INFO(("Initializing Ethernet driver"));
|
MG_INFO(("Initializing Ethernet driver"));
|
||||||
ethernet_init();
|
ethernet_init();
|
||||||
struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
struct mip_driver_stm32_data driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
||||||
struct mip_if mif = {
|
struct mip_if mif = {
|
||||||
.mac = {2, 0, 1, 2, 3, 5},
|
.mac = {2, 0, 1, 2, 3, 5},
|
||||||
.driver = &mip_driver_stm32,
|
.driver = &mip_driver_stm32,
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ int main(void) {
|
|||||||
// Initialise Mongoose network stack
|
// Initialise Mongoose network stack
|
||||||
// Specify MAC address, and IP/mask/GW in network byte order for static
|
// Specify MAC address, and IP/mask/GW in network byte order for static
|
||||||
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
||||||
struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
struct mip_driver_stm32_data driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
||||||
struct mip_if mif = {
|
struct mip_if mif = {
|
||||||
.mac = {2, 0, 1, 2, 3, 5},
|
.mac = {2, 0, 1, 2, 3, 5},
|
||||||
.driver = &mip_driver_stm32,
|
.driver = &mip_driver_stm32,
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ static void server(void *args) {
|
|||||||
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
||||||
MG_INFO(("Initializing Ethernet driver"));
|
MG_INFO(("Initializing Ethernet driver"));
|
||||||
ethernet_init();
|
ethernet_init();
|
||||||
struct mip_driver_stm32 driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
struct mip_driver_stm32_data driver_data = {.mdc_cr = 4}; // See driver_stm32.h
|
||||||
struct mip_if mif = {
|
struct mip_if mif = {
|
||||||
.mac = {2, 0, 1, 2, 3, 5},
|
.mac = {2, 0, 1, 2, 3, 5},
|
||||||
.driver = &mip_driver_stm32,
|
.driver = &mip_driver_stm32,
|
||||||
|
|||||||
+1
-1
@@ -102,7 +102,7 @@ static int guess_mdc_cr(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool mip_driver_stm32_init(struct mip_if *ifp) {
|
static bool mip_driver_stm32_init(struct mip_if *ifp) {
|
||||||
struct mip_driver_stm32 *d = (struct mip_driver_stm32 *) ifp->driver_data;
|
struct mip_driver_stm32_data *d = (struct mip_driver_stm32_data *) ifp->driver_data;
|
||||||
s_ifp = ifp;
|
s_ifp = ifp;
|
||||||
|
|
||||||
// Init RX descriptors
|
// Init RX descriptors
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
struct mip_driver_stm32 {
|
struct mip_driver_stm32_data {
|
||||||
// MDC clock divider. MDC clock is derived from HCLK, must not exceed 2.5MHz
|
// MDC clock divider. MDC clock is derived from HCLK, must not exceed 2.5MHz
|
||||||
// HCLK range DIVIDER mdc_cr VALUE
|
// HCLK range DIVIDER mdc_cr VALUE
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
|
|||||||
+1
-1
@@ -6029,7 +6029,7 @@ static int guess_mdc_cr(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool mip_driver_stm32_init(struct mip_if *ifp) {
|
static bool mip_driver_stm32_init(struct mip_if *ifp) {
|
||||||
struct mip_driver_stm32 *d = (struct mip_driver_stm32 *) ifp->driver_data;
|
struct mip_driver_stm32_data *d = (struct mip_driver_stm32_data *) ifp->driver_data;
|
||||||
s_ifp = ifp;
|
s_ifp = ifp;
|
||||||
|
|
||||||
// Init RX descriptors
|
// Init RX descriptors
|
||||||
|
|||||||
+1
-1
@@ -1504,7 +1504,7 @@ void qp_init(void);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct mip_driver_stm32 {
|
struct mip_driver_stm32_data {
|
||||||
// MDC clock divider. MDC clock is derived from HCLK, must not exceed 2.5MHz
|
// MDC clock divider. MDC clock is derived from HCLK, must not exceed 2.5MHz
|
||||||
// HCLK range DIVIDER mdc_cr VALUE
|
// HCLK range DIVIDER mdc_cr VALUE
|
||||||
// -------------------------------------
|
// -------------------------------------
|
||||||
|
|||||||
Reference in new issue
Block a user