Skip to content

Commit 6744f47

Browse files
committed
Changed definition structure of ETHMEM_SECTION
This structure makes it easier to add more targets/toolchains in the future and it's (arguably) a bit easier to read.
1 parent 1e4c9be commit 6744f47

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

libraries/net/eth/lwip-eth/arch/lpc17_emac.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,14 @@ struct lpc_enetdata {
138138
# else
139139
# define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
140140
# endif
141-
#else
142-
#if defined(TARGET_LPC1768) && defined(TOOLCHAIN_GCC_ARM)
141+
#elif defined(TARGET_LPC1768)
142+
# if defined(TOOLCHAIN_GCC_ARM)
143143
# define ETHMEM_SECTION __attribute__((section("AHBSRAM1"),aligned))
144-
#else
145-
# define ETHMEM_SECTION ALIGNED(8)
144+
# endif
146145
#endif
146+
147+
#ifndef ETHMEM_SECTION
148+
#define ETHMEM_SECTION ALIGNED(8)
147149
#endif
148150

149151
/** \brief LPC EMAC driver work data

0 commit comments

Comments
 (0)