diff options
author | edolomb <none@example.com> | 2018-01-04 10:27:43 +0000 |
---|---|---|
committer | edolomb <none@example.com> | 2018-01-04 10:27:43 +0000 |
commit | 6f3e9953a763240f02098714a42445f7c860aee4 (patch) | |
tree | 5e88f5674c07deef17738502380f6f838d191e0d /os/hal/ports/SAMA | |
parent | e440de2e714b0385bca2d44bd69a5711e65b7674 (diff) | |
download | ChibiOS-6f3e9953a763240f02098714a42445f7c860aee4.tar.gz ChibiOS-6f3e9953a763240f02098714a42445f7c860aee4.tar.bz2 ChibiOS-6f3e9953a763240f02098714a42445f7c860aee4.zip |
Added Matrix MACROs
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11218 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/SAMA')
-rw-r--r-- | os/hal/ports/SAMA/SAMA5D2x/sama_matrix.h | 184 |
1 files changed, 183 insertions, 1 deletions
diff --git a/os/hal/ports/SAMA/SAMA5D2x/sama_matrix.h b/os/hal/ports/SAMA/SAMA5D2x/sama_matrix.h index b9133a85b..aa18720a8 100644 --- a/os/hal/ports/SAMA/SAMA5D2x/sama_matrix.h +++ b/os/hal/ports/SAMA/SAMA5D2x/sama_matrix.h @@ -28,47 +28,200 @@ /*===========================================================================*/ /* Driver constants. */ /*===========================================================================*/ - +/** + * @name SECURE MATRIX mode macros + * @{ + */ +/** + * @brief The low area of region is the securable one. + */ #define LOWER_AREA_SECURABLE 0x0u + +/** + * @brief The low area of region is the non-securable one. + */ #define UPPER_AREA_SECURABLE 0x1u +/** + * @brief Securable area is secured for reads. + */ #define SECURE_READ 0x0u + +/** + * @brief Securable area is secured for writes. + */ #define SECURE_WRITE 0x0u + +/** + * @brief Securable area is non-secured for reads. + */ #define NOT_SECURE_READ 0x1u + +/** + * @brief Securable area is non-secured for writes. + */ #define NOT_SECURE_WRITE 0x1u +/** + * @brief Peripheral Securable as secure. + */ #define SECURE_PER FALSE + +/** + * @brief Peripheral Securable as not-secure. + */ #define NOT_SECURE_PER TRUE +/** @} */ +/** + * @name MASTER TYPE MATRIX macros + * @{ + */ +/** + * @brief No Default Master. + */ #define NO_DEFAULT_MASTER 0x0u + +/** + * @brief Last Default Master. + */ #define LAST_DEFAULT_MASTER 0x1u + +/** + * @brief Fixed Default Master. + */ #define FIXED_DEFAULT_MASTER 0x2u +/** @} */ +/** + * @name REGION MATRIX macros + * @{ + */ +/** + * @brief Region 0. + */ #define REGION_0 (0x1u << 0) + +/** + * @brief Region 1. + */ #define REGION_1 (0x1u << 1) + +/** + * @brief Region 2. + */ #define REGION_2 (0x1u << 2) + +/** + * @brief Region 3. + */ #define REGION_3 (0x1u << 3) + +/** + * @brief Region 4. + */ #define REGION_4 (0x1u << 4) + +/** + * @brief Region 5. + */ #define REGION_5 (0x1u << 5) + +/** + * @brief Region 6. + */ #define REGION_6 (0x1u << 6) + +/** + * @brief Region 7. + */ #define REGION_7 (0x1u << 7) +/** @} */ +/** + * @name AREA SIZE MATRIX macros + * @{ + */ +/** + * @brief Area size 4 KB. + */ #define MATRIX_AREA_SIZE_4K 0x0u + +/** + * @brief Area size 8 KB. + */ #define MATRIX_AREA_SIZE_8K 0x1u + +/** + * @brief Area size 16 KB. + */ #define MATRIX_AREA_SIZE_16K 0x2u + +/** + * @brief Area size 32 KB. + */ #define MATRIX_AREA_SIZE_32K 0x3u + +/** + * @brief Area size 64 KB. + */ #define MATRIX_AREA_SIZE_64K 0x4u + +/** + * @brief Area size 128 KB. + */ #define MATRIX_AREA_SIZE_128K 0x5u + +/** + * @brief Area size 256 KB. + */ #define MATRIX_AREA_SIZE_256K 0x6u + +/** + * @brief Area size 512 KB. + */ #define MATRIX_AREA_SIZE_512K 0x7u + +/** + * @brief Area size 1 MB. + */ #define MATRIX_AREA_SIZE_1M 0x8u + +/** + * @brief Area size 2 MB. + */ #define MATRIX_AREA_SIZE_2M 0x9u + +/** + * @brief Area size 4 MB. + */ #define MATRIX_AREA_SIZE_4M 0xAu + +/** + * @brief Area size 8 MB. + */ #define MATRIX_AREA_SIZE_8M 0xBu + +/** + * @brief Area size 16 MB. + */ #define MATRIX_AREA_SIZE_16M 0xCu + +/** + * @brief Area size 32 MB. + */ #define MATRIX_AREA_SIZE_32M 0xDu + +/** + * @brief Area size 64 MB. + */ #define MATRIX_AREA_SIZE_64M 0xEu + +/** + * @brief Area size 128 MB. + */ #define MATRIX_AREA_SIZE_128M 0xFu +/** @} */ /*===========================================================================*/ /* Driver pre-compile time settings. */ @@ -85,6 +238,35 @@ /*===========================================================================*/ /* Driver macros. */ /*===========================================================================*/ +/** + * @brief Configure LANSECH per Region. + * + * @param[in] region Region to configure. + * @param[in] lansech Securable mode. + * + * @api + */ +#define mtxRegionLansech(region, lansech) (lansech << region) + +/** + * @brief Configure RDNSECH per Region. + * + * @param[in] region Region to configure. + * @param[in] rdnsech Read securable mode. + * + * @api + */ +#define mtxRegionRdnsech(region, rdnsech) (rdnsech << region) + +/** + * @brief Configure WRNSECH per Region. + * + * @param[in] region Region to configure. + * @param[in] wrnsech Write securable mode. + * + * @api + */ +#define mtxRegionWrnsech(region, wrnsech) (wrnsech << region) /*===========================================================================*/ /* External declarations. */ |