aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/ports/STM32/LLD')
-rw-r--r--os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c17
-rw-r--r--os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.h4
2 files changed, 17 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c b/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c
index 773f805c8..637871255 100644
--- a/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c
+++ b/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.c
@@ -36,6 +36,23 @@
#define BUFFER_SIZE ((((STM32_MAC_BUFFERS_SIZE - 1) | 3) + 1) / 4)
+/* Fixing inconsistencies in ST headers.*/
+#if !defined(ETH_MACMIIAR_CR_Div102) && defined(ETH_MACMIIAR_CR_DIV102)
+#define ETH_MACMIIAR_CR_Div102 ETH_MACMIIAR_CR_DIV102
+#endif
+#if !defined(ETH_MACMIIAR_CR_Div62) && defined(ETH_MACMIIAR_CR_DIV62)
+#define ETH_MACMIIAR_CR_Div62 ETH_MACMIIAR_CR_DIV62
+#endif
+#if !defined(ETH_MACMIIAR_CR_Div42) && defined(ETH_MACMIIAR_CR_DIV42)
+#define ETH_MACMIIAR_CR_Div42 ETH_MACMIIAR_CR_DIV42
+#endif
+#if !defined(ETH_MACMIIAR_CR_Div26) && defined(ETH_MACMIIAR_CR_DIV26)
+#define ETH_MACMIIAR_CR_Div26 ETH_MACMIIAR_CR_DIV26
+#endif
+#if !defined(ETH_MACMIIAR_CR_Div16) && defined(ETH_MACMIIAR_CR_DIV16)
+#define ETH_MACMIIAR_CR_Div16 ETH_MACMIIAR_CR_DIV16
+#endif
+
/* MII divider optimal value.*/
#if (STM32_HCLK >= 150000000)
#define MACMIIDR_CR ETH_MACMIIAR_CR_Div102
diff --git a/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.h b/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.h
index 5c92b0c1b..b4acbb4b6 100644
--- a/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.h
+++ b/os/hal/ports/STM32/LLD/MACv1/hal_mac_lld.h
@@ -190,10 +190,6 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if (STM32_MAC_PHY_TIMEOUT > 0) && !HAL_IMPLEMENTS_COUNTERS
-#error "STM32_MAC_PHY_TIMEOUT requires the realtime counter service"
-#endif
-
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/