From 82406362c1bb9d6b9f46990cdaac80b665290292 Mon Sep 17 00:00:00 2001 From: edolomb Date: Mon, 4 Sep 2017 14:59:07 +0000 Subject: Added pmc functions for UARTx git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10554 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h | 71 ++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) 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) /** @} */ -- cgit v1.2.3