aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authoredolomb <none@example.com>2017-09-04 14:59:07 +0000
committeredolomb <none@example.com>2017-09-04 14:59:07 +0000
commit82406362c1bb9d6b9f46990cdaac80b665290292 (patch)
treed2c7753725805624fa1e5cc0a84d2cb9db4615e1 /os
parent157d1a243faa5845fc41956632f22b5cbbb468e0 (diff)
downloadChibiOS-82406362c1bb9d6b9f46990cdaac80b665290292.tar.gz
ChibiOS-82406362c1bb9d6b9f46990cdaac80b665290292.tar.bz2
ChibiOS-82406362c1bb9d6b9f46990cdaac80b665290292.zip
Added pmc functions for UARTx
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10554 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h71
1 files changed, 70 insertions, 1 deletions
diff --git a/os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h b/os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h
index 4fb942f22..9a607f9ba 100644
--- a/os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h
+++ b/os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h
@@ -120,7 +120,7 @@
#define pmcDisablePidHigh(mask) { \
pmcDisableWP(); \
PMC->PMC_PCDR1 |= (mask); \
- pmcEnableWP(); \
+ pmcEnableWP(); \
}
/** @} */
@@ -198,6 +198,75 @@
*/
#define pmcDisableSPI1() pmcDisablePidHigh(ID_SPI1_MSK)
+/**
+ * @brief Enables the UART0 peripheral clock.
+ *
+ * @api
+ */
+#define pmcEnableUART0() pmcEnablePidLow(ID_UART0_MSK)
+
+/**
+ * @brief Disables the UART0 peripheral clock.
+ *
+ * @api
+ */
+#define pmcDisableUART0() pmcDisablePidLow(ID_UART0_MSK)
+
+/**
+ * @brief Enables the UART1 peripheral clock.
+ *
+ * @api
+ */
+#define pmcEnableUART1() pmcEnablePidLow(ID_UART1_MSK)
+
+/**
+ * @brief Disables the UART1 peripheral clock.
+ *
+ * @api
+ */
+#define pmcDisableUART1() pmcDisablePidLow(ID_UART1_MSK)
+
+/**
+ * @brief Enables the UART2 peripheral clock.
+ *
+ * @api
+ */
+#define pmcEnableUART2() pmcEnablePidLow(ID_UART2_MSK)
+
+/**
+ * @brief Disables the UART2 peripheral clock.
+ *
+ * @api
+ */
+#define pmcDisableUART2() pmcDisablePidLow(ID_UART2_MSK)
+
+/**
+ * @brief Enables the UART3 peripheral clock.
+ *
+ * @api
+ */
+#define pmcEnableUART3() pmcEnablePidLow(ID_UART3_MSK)
+
+/**
+ * @brief Disables the UART3 peripheral clock.
+ *
+ * @api
+ */
+#define pmcDisableUART3() pmcDisablePidLow(ID_UART3_MSK)
+
+/**
+ * @brief Enables the UART4 peripheral clock.
+ *
+ * @api
+ */
+#define pmcEnableUART4() pmcEnablePidLow(ID_UART4_MSK)
+
+/**
+ * @brief Disables the UART4 peripheral clock.
+ *
+ * @api
+ */
+#define pmcDisableUART4() pmcDisablePidLow(ID_UART4_MSK)
/** @} */