From e77c71f96a2aa0f0a24985d957b0add42d05b2ac Mon Sep 17 00:00:00 2001 From: Rocco Marco Guglielmi Date: Sun, 17 Sep 2017 17:10:31 +0000 Subject: Added PIO related macros git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10622 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/ports/SAMA/SAMA5D2x/sama_pmc.h | 42 ++++++++++++++++++++++++++++++ os/hal/ports/SAMA/SAMA5D2x/sama_registry.h | 6 +++++ 2 files changed, 48 insertions(+) (limited to 'os/hal/ports') 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 @@ -170,6 +170,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. * 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 */ -- cgit v1.2.3