mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-28 05:39:00 +08:00
Merge pull request #1937 from cesanta/tm4cdriverdata
Rename driver data structure
This commit is contained in:
commit
e8ade14259
@ -86,7 +86,7 @@ int main(void) {
|
||||
// Initialize Mongoose network stack
|
||||
// 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
|
||||
struct mip_driver_tm4c driver_data = {.mdc_cr = 1}; // See driver_tm4c.h
|
||||
struct mip_driver_tm4c_data driver_data = {.mdc_cr = 1}; // See driver_tm4c.h
|
||||
struct mip_if mif = {
|
||||
.mac = {2, 0, 1, 2, 3, 5},
|
||||
.driver = &mip_driver_tm4c,
|
||||
|
@ -60,7 +60,7 @@ static void server(void *args) {
|
||||
// IP configuration. If IP/mask/GW are unset, DHCP is going to be used
|
||||
MG_INFO(("Initializing Ethernet driver"));
|
||||
ethernet_init();
|
||||
struct mip_driver_tm4c driver_data = {.mdc_cr = 1}; // See driver_tm4c.h
|
||||
struct mip_driver_tm4c_data driver_data = {.mdc_cr = 1}; // See driver_tm4c.h
|
||||
struct mip_if mif = {
|
||||
.mac = {2, 0, 1, 2, 3, 5},
|
||||
.driver = &mip_driver_tm4c,
|
||||
|
@ -124,7 +124,7 @@ static int guess_mdc_cr(void) {
|
||||
}
|
||||
|
||||
static bool mip_driver_tm4c_init(struct mip_if *ifp) {
|
||||
struct mip_driver_tm4c *d = (struct mip_driver_tm4c *) ifp->driver_data;
|
||||
struct mip_driver_tm4c_data *d = (struct mip_driver_tm4c_data *) ifp->driver_data;
|
||||
s_ifp = ifp;
|
||||
|
||||
// Init RX descriptors
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
struct mip_driver_tm4c {
|
||||
struct mip_driver_tm4c_data {
|
||||
// MDC clock divider. MDC clock is derived from SYSCLK, must not exceed 2.5MHz
|
||||
// SYSCLK range DIVIDER mdc_cr VALUE
|
||||
// -------------------------------------
|
||||
|
@ -6261,7 +6261,7 @@ static int guess_mdc_cr(void) {
|
||||
}
|
||||
|
||||
static bool mip_driver_tm4c_init(struct mip_if *ifp) {
|
||||
struct mip_driver_tm4c *d = (struct mip_driver_tm4c *) ifp->driver_data;
|
||||
struct mip_driver_tm4c_data *d = (struct mip_driver_tm4c_data *) ifp->driver_data;
|
||||
s_ifp = ifp;
|
||||
|
||||
// Init RX descriptors
|
||||
|
@ -1520,7 +1520,7 @@ struct mip_driver_stm32_data {
|
||||
};
|
||||
|
||||
|
||||
struct mip_driver_tm4c {
|
||||
struct mip_driver_tm4c_data {
|
||||
// MDC clock divider. MDC clock is derived from SYSCLK, must not exceed 2.5MHz
|
||||
// SYSCLK range DIVIDER mdc_cr VALUE
|
||||
// -------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user