aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2017-09-17 17:10:31 +0000
committerRocco Marco Guglielmi <roccomarco.guglielmi@gmail.com>2017-09-17 17:10:31 +0000
commite77c71f96a2aa0f0a24985d957b0add42d05b2ac (patch)
tree6bccfa36544014d18a943459a862f07cb8955fbd
parent11e716fc01279f46672b849f24b76415baeda15f (diff)
downloadChibiOS-e77c71f96a2aa0f0a24985d957b0add42d05b2ac.tar.gz
ChibiOS-e77c71f96a2aa0f0a24985d957b0add42d05b2ac.tar.bz2
ChibiOS-e77c71f96a2aa0f0a24985d957b0add42d05b2ac.zip
Added PIO related macros
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10622 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h42
-rw-r--r--os/hal/ports/SAMA/SAMA5D2x/sama_registry.h6
2 files changed, 48 insertions, 0 deletions
diff --git a/os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h b/os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h
index 3bfb58a79..0350fdcdb 100644
--- a/os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h
+++ b/os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h
@@ -171,6 +171,48 @@
#define pmcDisableXDMAC1() pmcDisablePidLow(ID_XDMAC1_MSK)
/**
+ * @brief Enables the H32MX peripheral clock.
+ *
+ * @api
+ */
+#define pmcEnableH32MX() pmcEnablePidLow(ID_MATRIX0_MSK)
+
+/**
+ * @brief Disables the H32MX peripheral clock.
+ *
+ * @api
+ */
+#define pmcDisableH32MX() pmcDisablePidLow(ID_MATRIX0_MSK)
+
+/**
+ * @brief Enables the H64MX peripheral clock.
+ *
+ * @api
+ */
+#define pmcEnableH64MX() pmcEnablePidLow(ID_MATRIX1_MSK)
+
+/**
+ * @brief Disables the H64MX peripheral clock.
+ *
+ * @api
+ */
+#define pmcDisableH64MX() pmcDisablePidLow(ID_MATRIX1_MSK)
+
+/**
+ * @brief Enables the PIO peripheral clock.
+ *
+ * @api
+ */
+#define pmcEnablePIO() pmcEnablePidLow(ID_PIOA_MSK)
+
+/**
+ * @brief Disables the PIO peripheral clock.
+ *
+ * @api
+ */
+#define pmcDisablePIO() pmcDisablePidLow(ID_PIOA_MSK)
+
+/**
* @brief Enables the SPI0 peripheral clock.
*
* @api
diff --git a/os/hal/ports/SAMA/SAMA5D2x/sama_registry.h b/os/hal/ports/SAMA/SAMA5D2x/sama_registry.h
index 591b74e31..35d5e0057 100644
--- a/os/hal/ports/SAMA/SAMA5D2x/sama_registry.h
+++ b/os/hal/ports/SAMA/SAMA5D2x/sama_registry.h
@@ -52,6 +52,12 @@
#endif /* defined(SAMA5D27) */
+/* PIO attributes.*/
+#define SAMA_HAS_PIOA TRUE
+#define SAMA_HAS_PIOB TRUE
+#define SAMA_HAS_PIOC TRUE
+#define SAMA_HAS_PIOD FALSE
+
/** @} */
#endif /* SAMA_REGISTRY_H */