aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--os/hal/platforms/SPC5xx/ESCI_v1/serial_lld.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/os/hal/platforms/SPC5xx/ESCI_v1/serial_lld.h b/os/hal/platforms/SPC5xx/ESCI_v1/serial_lld.h
index 93fd94a10..9804507e9 100644
--- a/os/hal/platforms/SPC5xx/ESCI_v1/serial_lld.h
+++ b/os/hal/platforms/SPC5xx/ESCI_v1/serial_lld.h
@@ -82,6 +82,18 @@
/* Derived constants and error checks. */
/*===========================================================================*/
+#if SPC5_USE_ESCIA && !SPC5_HAS_ESCIA
+#error "eSCI-A not present in the selected device"
+#endif
+
+#if SPC5_USE_ESCIB && !SPC5_HAS_ESCIB
+#error "eSCI-B not present in the selected device"
+#endif
+
+#if !SPC5_USE_ESCIA && !SPC5_USE_ESCIB
+#error "SERIAL driver activated but no eSCI peripheral assigned"
+#endif
+
/*===========================================================================*/
/* Driver data structures and types. */
/*===========================================================================*/