summaryrefslogtreecommitdiff
path: root/cesar/hal/arch/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/hal/arch/platform.h')
-rw-r--r--cesar/hal/arch/platform.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/cesar/hal/arch/platform.h b/cesar/hal/arch/platform.h
new file mode 100644
index 0000000000..9cbc82d7ca
--- /dev/null
+++ b/cesar/hal/arch/platform.h
@@ -0,0 +1,41 @@
+#ifndef hal_arch_platform_h
+#define hal_arch_platform_h
+/* Cesar project {{{
+ *
+ * Copyright (C) 2012 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file hal/arch/platform.h
+ * \brief Platform specific functions.
+ * \ingroup hal_arch
+ */
+#include "hal/arch/inc/regs_addr.h"
+
+BEGIN_DECLS
+
+/**
+ * Return true if the platform is SPC300.
+ * \return true if spc300
+ */
+extern inline bool
+arch_is_spc300 (void)
+{
+ return !ARCH_MARIA_RB_DEVICE_ID;
+}
+
+/**
+ * Return true if the platform is MSE500
+ * \return true if mse500
+ */
+extern inline bool
+arch_is_mse500 (void)
+{
+ return ARCH_MARIA_RB_DEVICE_ID;
+}
+
+END_DECLS
+
+#endif /* hal_arch_platform_h */