mbed library sources
Fork of mbed-src by
targets/cmsis/TARGET_Atmel/TARGET_SAM21/utils/cmsis/samd21/include/component/comp_pac.h@592:a274ee790e56, 2015-07-17 (annotated)
- Committer:
- mbed_official
- Date:
- Fri Jul 17 09:15:10 2015 +0100
- Revision:
- 592:a274ee790e56
- Parent:
- 579:53297373a894
Synchronized with git revision e7144f83a8d75df80c4877936b6ffe552b0be9e6
Full URL: https://github.com/mbedmicro/mbed/commit/e7144f83a8d75df80c4877936b6ffe552b0be9e6/
More API implementation for SAMR21
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 579:53297373a894 | 1 | #ifndef _SAMD21_PAC_COMPONENT_ |
mbed_official | 579:53297373a894 | 2 | #define _SAMD21_PAC_COMPONENT_ |
mbed_official | 579:53297373a894 | 3 | |
mbed_official | 579:53297373a894 | 4 | /* ========================================================================== */ |
mbed_official | 579:53297373a894 | 5 | /** SOFTWARE API DEFINITION FOR PAC */ |
mbed_official | 579:53297373a894 | 6 | /* ========================================================================== */ |
mbed_official | 579:53297373a894 | 7 | /** \addtogroup SAMD21_PAC Peripheral Access Controller */ |
mbed_official | 579:53297373a894 | 8 | /*@{*/ |
mbed_official | 579:53297373a894 | 9 | |
mbed_official | 579:53297373a894 | 10 | #define PAC_U2211 |
mbed_official | 579:53297373a894 | 11 | #define REV_PAC 0x101 |
mbed_official | 579:53297373a894 | 12 | |
mbed_official | 579:53297373a894 | 13 | /* -------- PAC_WPCLR : (PAC Offset: 0x0) (R/W 32) Write Protection Clear -------- */ |
mbed_official | 579:53297373a894 | 14 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
mbed_official | 579:53297373a894 | 15 | typedef union { |
mbed_official | 579:53297373a894 | 16 | struct { |
mbed_official | 579:53297373a894 | 17 | uint32_t :1; /*!< bit: 0 Reserved */ |
mbed_official | 579:53297373a894 | 18 | uint32_t WP:31; /*!< bit: 1..31 Write Protection Clear */ |
mbed_official | 579:53297373a894 | 19 | } bit; /*!< Structure used for bit access */ |
mbed_official | 579:53297373a894 | 20 | uint32_t reg; /*!< Type used for register access */ |
mbed_official | 579:53297373a894 | 21 | } PAC_WPCLR_Type; |
mbed_official | 579:53297373a894 | 22 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
mbed_official | 579:53297373a894 | 23 | |
mbed_official | 579:53297373a894 | 24 | #define PAC_WPCLR_OFFSET 0x0 /**< \brief (PAC_WPCLR offset) Write Protection Clear */ |
mbed_official | 579:53297373a894 | 25 | #define PAC_WPCLR_RESETVALUE 0x00000000ul /**< \brief (PAC_WPCLR reset_value) Write Protection Clear */ |
mbed_official | 579:53297373a894 | 26 | |
mbed_official | 579:53297373a894 | 27 | #define PAC_WPCLR_WP_Pos 1 /**< \brief (PAC_WPCLR) Write Protection Clear */ |
mbed_official | 579:53297373a894 | 28 | #define PAC_WPCLR_WP_Msk (0x7FFFFFFFul << PAC_WPCLR_WP_Pos) |
mbed_official | 579:53297373a894 | 29 | #define PAC_WPCLR_WP(value) ((PAC_WPCLR_WP_Msk & ((value) << PAC_WPCLR_WP_Pos))) |
mbed_official | 579:53297373a894 | 30 | #define PAC_WPCLR_MASK 0xFFFFFFFEul /**< \brief (PAC_WPCLR) MASK Register */ |
mbed_official | 579:53297373a894 | 31 | |
mbed_official | 579:53297373a894 | 32 | /* -------- PAC_WPSET : (PAC Offset: 0x4) (R/W 32) Write Protection Set -------- */ |
mbed_official | 579:53297373a894 | 33 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
mbed_official | 579:53297373a894 | 34 | typedef union { |
mbed_official | 579:53297373a894 | 35 | struct { |
mbed_official | 579:53297373a894 | 36 | uint32_t :1; /*!< bit: 0 Reserved */ |
mbed_official | 579:53297373a894 | 37 | uint32_t WP:31; /*!< bit: 1..31 Write Protection Set */ |
mbed_official | 579:53297373a894 | 38 | } bit; /*!< Structure used for bit access */ |
mbed_official | 579:53297373a894 | 39 | uint32_t reg; /*!< Type used for register access */ |
mbed_official | 579:53297373a894 | 40 | } PAC_WPSET_Type; |
mbed_official | 579:53297373a894 | 41 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
mbed_official | 579:53297373a894 | 42 | |
mbed_official | 579:53297373a894 | 43 | #define PAC_WPSET_OFFSET 0x4 /**< \brief (PAC_WPSET offset) Write Protection Set */ |
mbed_official | 579:53297373a894 | 44 | #define PAC_WPSET_RESETVALUE 0x00000000ul /**< \brief (PAC_WPSET reset_value) Write Protection Set */ |
mbed_official | 579:53297373a894 | 45 | |
mbed_official | 579:53297373a894 | 46 | #define PAC_WPSET_WP_Pos 1 /**< \brief (PAC_WPSET) Write Protection Set */ |
mbed_official | 579:53297373a894 | 47 | #define PAC_WPSET_WP_Msk (0x7FFFFFFFul << PAC_WPSET_WP_Pos) |
mbed_official | 579:53297373a894 | 48 | #define PAC_WPSET_WP(value) ((PAC_WPSET_WP_Msk & ((value) << PAC_WPSET_WP_Pos))) |
mbed_official | 579:53297373a894 | 49 | #define PAC_WPSET_MASK 0xFFFFFFFEul /**< \brief (PAC_WPSET) MASK Register */ |
mbed_official | 579:53297373a894 | 50 | |
mbed_official | 579:53297373a894 | 51 | /** \brief PAC hardware registers */ |
mbed_official | 579:53297373a894 | 52 | #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) |
mbed_official | 579:53297373a894 | 53 | typedef struct { |
mbed_official | 579:53297373a894 | 54 | __IO PAC_WPCLR_Type WPCLR; /**< \brief Offset: 0x0 (R/W 32) Write Protection Clear */ |
mbed_official | 579:53297373a894 | 55 | __IO PAC_WPSET_Type WPSET; /**< \brief Offset: 0x4 (R/W 32) Write Protection Set */ |
mbed_official | 579:53297373a894 | 56 | } Pac; |
mbed_official | 579:53297373a894 | 57 | #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ |
mbed_official | 579:53297373a894 | 58 | |
mbed_official | 579:53297373a894 | 59 | /*@}*/ |
mbed_official | 579:53297373a894 | 60 | |
mbed_official | 579:53297373a894 | 61 | #endif /* _SAMD21_PAC_COMPONENT_ */ |