Skip to content

Commit 87325ec

Browse files
author
robert
committed
Removed MG_DRIVER_* macros
1 parent 6cbd9b3 commit 87325ec

File tree

9 files changed

+31
-15
lines changed

9 files changed

+31
-15
lines changed

mongoose.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21820,7 +21820,9 @@ bool mg_wifi_ap_stop(void) {
2182021820
#endif
2182121821

2182221822

21823-
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_IMXRT) && MG_ENABLE_DRIVER_IMXRT
21823+
#if MG_ENABLE_TCPIP && \
21824+
(defined(MG_ENABLE_DRIVER_IMXRT10) && MG_ENABLE_DRIVER_IMXRT10) || \
21825+
(defined(MG_ENABLE_DRIVER_IMXRT11) && MG_ENABLE_DRIVER_IMXRT11)
2182421826
struct imxrt_enet {
2182521827
volatile uint32_t RESERVED0, EIR, EIMR, RESERVED1, RDAR, TDAR, RESERVED2[3],
2182621828
ECR, RESERVED3[6], MMFR, MSCR, RESERVED4[7], MIBC, RESERVED5[7], RCR,
@@ -21846,7 +21848,7 @@ struct imxrt_enet {
2184621848
};
2184721849

2184821850
#undef ENET
21849-
#if defined(MG_DRIVER_IMXRT_RT11) && MG_DRIVER_IMXRT_RT11
21851+
#if defined(MG_ENABLE_DRIVER_IMXRT11) && MG_ENABLE_DRIVER_IMXRT11
2185021852
#define ENET ((struct imxrt_enet *) (uintptr_t) 0x40424000U)
2185121853
#define ETH_DESC_CNT 5 // Descriptors count
2185221854
#else
@@ -22690,7 +22692,9 @@ struct mg_tcpip_driver mg_tcpip_driver_ppp = {mg_ppp_init, mg_ppp_tx, mg_ppp_rx,
2269022692
#endif
2269122693

2269222694

22693-
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_RA) && MG_ENABLE_DRIVER_RA
22695+
#if MG_ENABLE_TCPIP && \
22696+
(defined(MG_ENABLE_DRIVER_RA6) && MG_ENABLE_DRIVER_RA6) || \
22697+
(defined(MG_ENABLE_DRIVER_RA8) && MG_ENABLE_DRIVER_RA8)
2269422698
struct ra_etherc {
2269522699
volatile uint32_t ECMR, RESERVED, RFLR, RESERVED1, ECSR, RESERVED2, ECSIPR,
2269622700
RESERVED3, PIR, RESERVED4, PSR, RESERVED5[5], RDMLR, RESERVED6[3], IPGR,
@@ -22711,7 +22715,7 @@ struct ra_edmac {
2271122715
#undef EDMAC
2271222716
#undef RASYSC
2271322717
#undef ICU_IELSR
22714-
#if defined(MG_DRIVER_RA8) && MG_DRIVER_RA8
22718+
#if defined(MG_ENABLE_DRIVER_RA8) && MG_ENABLE_DRIVER_RA8
2271522719
#define ETHERC ((struct ra_etherc *) (uintptr_t) 0x40354100U)
2271622720
#define EDMAC ((struct ra_edmac *) (uintptr_t) 0x40354000U)
2271722721
#define RASYSC ((uint32_t *) (uintptr_t) 0x4001E000U)

mongoose.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3114,7 +3114,9 @@ struct mg_tcpip_driver_cyw_data {
31143114
#endif
31153115

31163116

3117-
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_IMXRT) && MG_ENABLE_DRIVER_IMXRT
3117+
#if MG_ENABLE_TCPIP && \
3118+
(defined(MG_ENABLE_DRIVER_IMXRT10) && MG_ENABLE_DRIVER_IMXRT10) || \
3119+
(defined(MG_ENABLE_DRIVER_IMXRT11) && MG_ENABLE_DRIVER_IMXRT11)
31183120

31193121
struct mg_tcpip_driver_imxrt_data {
31203122
// MDC clock divider. MDC clock is derived from IPS Bus clock (ipg_clk),
@@ -3230,7 +3232,9 @@ struct mg_tcpip_driver_ppp_data {
32303232
};
32313233

32323234

3233-
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_RA) && MG_ENABLE_DRIVER_RA
3235+
#if MG_ENABLE_TCPIP && \
3236+
(defined(MG_ENABLE_DRIVER_RA6) && MG_ENABLE_DRIVER_RA6) || \
3237+
(defined(MG_ENABLE_DRIVER_RA8) && MG_ENABLE_DRIVER_RA8)
32343238

32353239
struct mg_tcpip_driver_ra_data {
32363240
// MDC clock "divider". MDC clock is software generated,

src/drivers/imxrt.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "net_builtin.h"
22

3-
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_IMXRT) && MG_ENABLE_DRIVER_IMXRT
3+
#if MG_ENABLE_TCPIP && \
4+
(defined(MG_ENABLE_DRIVER_IMXRT10) && MG_ENABLE_DRIVER_IMXRT10) || \
5+
(defined(MG_ENABLE_DRIVER_IMXRT11) && MG_ENABLE_DRIVER_IMXRT11)
46
struct imxrt_enet {
57
volatile uint32_t RESERVED0, EIR, EIMR, RESERVED1, RDAR, TDAR, RESERVED2[3],
68
ECR, RESERVED3[6], MMFR, MSCR, RESERVED4[7], MIBC, RESERVED5[7], RCR,
@@ -26,7 +28,7 @@ struct imxrt_enet {
2628
};
2729

2830
#undef ENET
29-
#if defined(MG_DRIVER_IMXRT_RT11) && MG_DRIVER_IMXRT_RT11
31+
#if defined(MG_ENABLE_DRIVER_IMXRT11) && MG_ENABLE_DRIVER_IMXRT11
3032
#define ENET ((struct imxrt_enet *) (uintptr_t) 0x40424000U)
3133
#define ETH_DESC_CNT 5 // Descriptors count
3234
#else

src/drivers/imxrt.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22

3-
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_IMXRT) && MG_ENABLE_DRIVER_IMXRT
3+
#if MG_ENABLE_TCPIP && \
4+
(defined(MG_ENABLE_DRIVER_IMXRT10) && MG_ENABLE_DRIVER_IMXRT10) || \
5+
(defined(MG_ENABLE_DRIVER_IMXRT11) && MG_ENABLE_DRIVER_IMXRT11)
46

57
struct mg_tcpip_driver_imxrt_data {
68
// MDC clock divider. MDC clock is derived from IPS Bus clock (ipg_clk),

src/drivers/ra.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "net_builtin.h"
22

3-
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_RA) && MG_ENABLE_DRIVER_RA
3+
#if MG_ENABLE_TCPIP && \
4+
(defined(MG_ENABLE_DRIVER_RA6) && MG_ENABLE_DRIVER_RA6) || \
5+
(defined(MG_ENABLE_DRIVER_RA8) && MG_ENABLE_DRIVER_RA8)
46
struct ra_etherc {
57
volatile uint32_t ECMR, RESERVED, RFLR, RESERVED1, ECSR, RESERVED2, ECSIPR,
68
RESERVED3, PIR, RESERVED4, PSR, RESERVED5[5], RDMLR, RESERVED6[3], IPGR,
@@ -21,7 +23,7 @@ struct ra_edmac {
2123
#undef EDMAC
2224
#undef RASYSC
2325
#undef ICU_IELSR
24-
#if defined(MG_DRIVER_RA8) && MG_DRIVER_RA8
26+
#if defined(MG_ENABLE_DRIVER_RA8) && MG_ENABLE_DRIVER_RA8
2527
#define ETHERC ((struct ra_etherc *) (uintptr_t) 0x40354100U)
2628
#define EDMAC ((struct ra_edmac *) (uintptr_t) 0x40354000U)
2729
#define RASYSC ((uint32_t *) (uintptr_t) 0x4001E000U)

src/drivers/ra.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#pragma once
22

3-
#if MG_ENABLE_TCPIP && defined(MG_ENABLE_DRIVER_RA) && MG_ENABLE_DRIVER_RA
3+
#if MG_ENABLE_TCPIP && \
4+
(defined(MG_ENABLE_DRIVER_RA6) && MG_ENABLE_DRIVER_RA6) || \
5+
(defined(MG_ENABLE_DRIVER_RA8) && MG_ENABLE_DRIVER_RA8)
46

57
struct mg_tcpip_driver_ra_data {
68
// MDC clock "divider". MDC clock is software generated,

tutorials/http/http-server/arduino/teensy41-http/mongoose_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
#define MG_ARCH MG_ARCH_NEWLIB // Use ARM toolchain
44
#define MG_ENABLE_TCPIP 1 // Enable built-in network stack
5-
#define MG_ENABLE_DRIVER_IMXRT 1 // Enable RTxx driver
5+
#define MG_ENABLE_DRIVER_IMXRT10 1 // Enable RTxx driver
66
#define MG_ENABLE_CUSTOM_MILLIS 1 // Let user implement mg_millis()
77
#define MG_ENABLE_POSIX_FS 0 // Disable POSIX filesystem
88
#define MG_ENABLE_PACKED_FS 1 // Enable packed filesystem

tutorials/nxp/rt1060-evk-xpresso-baremetal-builtin/source/mongoose_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// See https://mongoose.ws/documentation/#build-options
44
#define MG_ARCH MG_ARCH_NEWLIB
55
#define MG_ENABLE_TCPIP 1
6-
#define MG_ENABLE_DRIVER_IMXRT 1
6+
#define MG_ENABLE_DRIVER_IMXRT10 1
77
#define MG_ENABLE_CUSTOM_MILLIS 1
88
#define MG_ENABLE_CUSTOM_RANDOM 1
99
#define MG_ENABLE_PACKED_FS 1

tutorials/renesas/ek-ra6m4-make-baremetal-builtin/mongoose_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
#define MG_ENABLE_CUSTOM_MILLIS 1
88
#define MG_ENABLE_CUSTOM_RANDOM 0
99
#define MG_ENABLE_PACKED_FS 1
10-
#define MG_ENABLE_DRIVER_RA 1
10+
#define MG_ENABLE_DRIVER_RA6 1
1111
//#define MG_ENABLE_LINES 1

0 commit comments

Comments
 (0)