Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
elijahorr
Date:
Thu Apr 14 07:28:54 2016 +0000
Revision:
121:672067c3ada4
Parent:
111:4336505e4b1c
.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 111:4336505e4b1c 1 /**
Kojto 111:4336505e4b1c 2 * \file
Kojto 111:4336505e4b1c 3 *
Kojto 111:4336505e4b1c 4 * \brief Component description for RTC
Kojto 111:4336505e4b1c 5 *
Kojto 111:4336505e4b1c 6 * Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.
Kojto 111:4336505e4b1c 7 *
Kojto 111:4336505e4b1c 8 * \asf_license_start
Kojto 111:4336505e4b1c 9 *
Kojto 111:4336505e4b1c 10 * \page License
Kojto 111:4336505e4b1c 11 *
Kojto 111:4336505e4b1c 12 * Redistribution and use in source and binary forms, with or without
Kojto 111:4336505e4b1c 13 * modification, are permitted provided that the following conditions are met:
Kojto 111:4336505e4b1c 14 *
Kojto 111:4336505e4b1c 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 111:4336505e4b1c 16 * this list of conditions and the following disclaimer.
Kojto 111:4336505e4b1c 17 *
Kojto 111:4336505e4b1c 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 111:4336505e4b1c 19 * this list of conditions and the following disclaimer in the documentation
Kojto 111:4336505e4b1c 20 * and/or other materials provided with the distribution.
Kojto 111:4336505e4b1c 21 *
Kojto 111:4336505e4b1c 22 * 3. The name of Atmel may not be used to endorse or promote products derived
Kojto 111:4336505e4b1c 23 * from this software without specific prior written permission.
Kojto 111:4336505e4b1c 24 *
Kojto 111:4336505e4b1c 25 * 4. This software may only be redistributed and used in connection with an
Kojto 111:4336505e4b1c 26 * Atmel microcontroller product.
Kojto 111:4336505e4b1c 27 *
Kojto 111:4336505e4b1c 28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
Kojto 111:4336505e4b1c 29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
Kojto 111:4336505e4b1c 30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
Kojto 111:4336505e4b1c 31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
Kojto 111:4336505e4b1c 32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 111:4336505e4b1c 33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
Kojto 111:4336505e4b1c 34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
Kojto 111:4336505e4b1c 35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
Kojto 111:4336505e4b1c 36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
Kojto 111:4336505e4b1c 37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Kojto 111:4336505e4b1c 38 * POSSIBILITY OF SUCH DAMAGE.
Kojto 111:4336505e4b1c 39 *
Kojto 111:4336505e4b1c 40 * \asf_license_stop
Kojto 111:4336505e4b1c 41 *
Kojto 111:4336505e4b1c 42 */
Kojto 111:4336505e4b1c 43 /*
Kojto 111:4336505e4b1c 44 * Support and FAQ: visit <a href="http://www.atmel.com/design-support/">Atmel Support</a>
Kojto 111:4336505e4b1c 45 */
Kojto 111:4336505e4b1c 46
Kojto 111:4336505e4b1c 47 #ifndef _SAMD21_RTC_COMPONENT_
Kojto 111:4336505e4b1c 48 #define _SAMD21_RTC_COMPONENT_
Kojto 111:4336505e4b1c 49
Kojto 111:4336505e4b1c 50 /* ========================================================================== */
Kojto 111:4336505e4b1c 51 /** SOFTWARE API DEFINITION FOR RTC */
Kojto 111:4336505e4b1c 52 /* ========================================================================== */
Kojto 111:4336505e4b1c 53 /** \addtogroup SAMD21_RTC Real-Time Counter */
Kojto 111:4336505e4b1c 54 /*@{*/
Kojto 111:4336505e4b1c 55
Kojto 111:4336505e4b1c 56 #define RTC_U2202
Kojto 111:4336505e4b1c 57 #define REV_RTC 0x101
Kojto 111:4336505e4b1c 58
Kojto 111:4336505e4b1c 59 /* -------- RTC_MODE0_CTRL : (RTC Offset: 0x00) (R/W 16) MODE0 MODE0 Control -------- */
Kojto 111:4336505e4b1c 60 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 61 typedef union {
Kojto 111:4336505e4b1c 62 struct {
Kojto 111:4336505e4b1c 63 uint16_t SWRST:1; /*!< bit: 0 Software Reset */
Kojto 111:4336505e4b1c 64 uint16_t ENABLE:1; /*!< bit: 1 Enable */
Kojto 111:4336505e4b1c 65 uint16_t MODE:2; /*!< bit: 2.. 3 Operating Mode */
Kojto 111:4336505e4b1c 66 uint16_t :3; /*!< bit: 4.. 6 Reserved */
Kojto 111:4336505e4b1c 67 uint16_t MATCHCLR:1; /*!< bit: 7 Clear on Match */
Kojto 111:4336505e4b1c 68 uint16_t PRESCALER:4; /*!< bit: 8..11 Prescaler */
Kojto 111:4336505e4b1c 69 uint16_t :4; /*!< bit: 12..15 Reserved */
Kojto 111:4336505e4b1c 70 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 71 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 72 } RTC_MODE0_CTRL_Type;
Kojto 111:4336505e4b1c 73 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 74
Kojto 111:4336505e4b1c 75 #define RTC_MODE0_CTRL_OFFSET 0x00 /**< \brief (RTC_MODE0_CTRL offset) MODE0 Control */
Kojto 111:4336505e4b1c 76 #define RTC_MODE0_CTRL_RESETVALUE 0x0000ul /**< \brief (RTC_MODE0_CTRL reset_value) MODE0 Control */
Kojto 111:4336505e4b1c 77
Kojto 111:4336505e4b1c 78 #define RTC_MODE0_CTRL_SWRST_Pos 0 /**< \brief (RTC_MODE0_CTRL) Software Reset */
Kojto 111:4336505e4b1c 79 #define RTC_MODE0_CTRL_SWRST (0x1ul << RTC_MODE0_CTRL_SWRST_Pos)
Kojto 111:4336505e4b1c 80 #define RTC_MODE0_CTRL_ENABLE_Pos 1 /**< \brief (RTC_MODE0_CTRL) Enable */
Kojto 111:4336505e4b1c 81 #define RTC_MODE0_CTRL_ENABLE (0x1ul << RTC_MODE0_CTRL_ENABLE_Pos)
Kojto 111:4336505e4b1c 82 #define RTC_MODE0_CTRL_MODE_Pos 2 /**< \brief (RTC_MODE0_CTRL) Operating Mode */
Kojto 111:4336505e4b1c 83 #define RTC_MODE0_CTRL_MODE_Msk (0x3ul << RTC_MODE0_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 84 #define RTC_MODE0_CTRL_MODE(value) ((RTC_MODE0_CTRL_MODE_Msk & ((value) << RTC_MODE0_CTRL_MODE_Pos)))
Kojto 111:4336505e4b1c 85 #define RTC_MODE0_CTRL_MODE_COUNT32_Val 0x0ul /**< \brief (RTC_MODE0_CTRL) Mode 0: 32-bit Counter */
Kojto 111:4336505e4b1c 86 #define RTC_MODE0_CTRL_MODE_COUNT16_Val 0x1ul /**< \brief (RTC_MODE0_CTRL) Mode 1: 16-bit Counter */
Kojto 111:4336505e4b1c 87 #define RTC_MODE0_CTRL_MODE_CLOCK_Val 0x2ul /**< \brief (RTC_MODE0_CTRL) Mode 2: Clock/Calendar */
Kojto 111:4336505e4b1c 88 #define RTC_MODE0_CTRL_MODE_COUNT32 (RTC_MODE0_CTRL_MODE_COUNT32_Val << RTC_MODE0_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 89 #define RTC_MODE0_CTRL_MODE_COUNT16 (RTC_MODE0_CTRL_MODE_COUNT16_Val << RTC_MODE0_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 90 #define RTC_MODE0_CTRL_MODE_CLOCK (RTC_MODE0_CTRL_MODE_CLOCK_Val << RTC_MODE0_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 91 #define RTC_MODE0_CTRL_MATCHCLR_Pos 7 /**< \brief (RTC_MODE0_CTRL) Clear on Match */
Kojto 111:4336505e4b1c 92 #define RTC_MODE0_CTRL_MATCHCLR (0x1ul << RTC_MODE0_CTRL_MATCHCLR_Pos)
Kojto 111:4336505e4b1c 93 #define RTC_MODE0_CTRL_PRESCALER_Pos 8 /**< \brief (RTC_MODE0_CTRL) Prescaler */
Kojto 111:4336505e4b1c 94 #define RTC_MODE0_CTRL_PRESCALER_Msk (0xFul << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 95 #define RTC_MODE0_CTRL_PRESCALER(value) ((RTC_MODE0_CTRL_PRESCALER_Msk & ((value) << RTC_MODE0_CTRL_PRESCALER_Pos)))
Kojto 111:4336505e4b1c 96 #define RTC_MODE0_CTRL_PRESCALER_DIV1_Val 0x0ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/1 */
Kojto 111:4336505e4b1c 97 #define RTC_MODE0_CTRL_PRESCALER_DIV2_Val 0x1ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/2 */
Kojto 111:4336505e4b1c 98 #define RTC_MODE0_CTRL_PRESCALER_DIV4_Val 0x2ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/4 */
Kojto 111:4336505e4b1c 99 #define RTC_MODE0_CTRL_PRESCALER_DIV8_Val 0x3ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/8 */
Kojto 111:4336505e4b1c 100 #define RTC_MODE0_CTRL_PRESCALER_DIV16_Val 0x4ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/16 */
Kojto 111:4336505e4b1c 101 #define RTC_MODE0_CTRL_PRESCALER_DIV32_Val 0x5ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/32 */
Kojto 111:4336505e4b1c 102 #define RTC_MODE0_CTRL_PRESCALER_DIV64_Val 0x6ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/64 */
Kojto 111:4336505e4b1c 103 #define RTC_MODE0_CTRL_PRESCALER_DIV128_Val 0x7ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/128 */
Kojto 111:4336505e4b1c 104 #define RTC_MODE0_CTRL_PRESCALER_DIV256_Val 0x8ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/256 */
Kojto 111:4336505e4b1c 105 #define RTC_MODE0_CTRL_PRESCALER_DIV512_Val 0x9ul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/512 */
Kojto 111:4336505e4b1c 106 #define RTC_MODE0_CTRL_PRESCALER_DIV1024_Val 0xAul /**< \brief (RTC_MODE0_CTRL) CLK_RTC_CNT = GCLK_RTC/1024 */
Kojto 111:4336505e4b1c 107 #define RTC_MODE0_CTRL_PRESCALER_DIV1 (RTC_MODE0_CTRL_PRESCALER_DIV1_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 108 #define RTC_MODE0_CTRL_PRESCALER_DIV2 (RTC_MODE0_CTRL_PRESCALER_DIV2_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 109 #define RTC_MODE0_CTRL_PRESCALER_DIV4 (RTC_MODE0_CTRL_PRESCALER_DIV4_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 110 #define RTC_MODE0_CTRL_PRESCALER_DIV8 (RTC_MODE0_CTRL_PRESCALER_DIV8_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 111 #define RTC_MODE0_CTRL_PRESCALER_DIV16 (RTC_MODE0_CTRL_PRESCALER_DIV16_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 112 #define RTC_MODE0_CTRL_PRESCALER_DIV32 (RTC_MODE0_CTRL_PRESCALER_DIV32_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 113 #define RTC_MODE0_CTRL_PRESCALER_DIV64 (RTC_MODE0_CTRL_PRESCALER_DIV64_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 114 #define RTC_MODE0_CTRL_PRESCALER_DIV128 (RTC_MODE0_CTRL_PRESCALER_DIV128_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 115 #define RTC_MODE0_CTRL_PRESCALER_DIV256 (RTC_MODE0_CTRL_PRESCALER_DIV256_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 116 #define RTC_MODE0_CTRL_PRESCALER_DIV512 (RTC_MODE0_CTRL_PRESCALER_DIV512_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 117 #define RTC_MODE0_CTRL_PRESCALER_DIV1024 (RTC_MODE0_CTRL_PRESCALER_DIV1024_Val << RTC_MODE0_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 118 #define RTC_MODE0_CTRL_MASK 0x0F8Ful /**< \brief (RTC_MODE0_CTRL) MASK Register */
Kojto 111:4336505e4b1c 119
Kojto 111:4336505e4b1c 120 /* -------- RTC_MODE1_CTRL : (RTC Offset: 0x00) (R/W 16) MODE1 MODE1 Control -------- */
Kojto 111:4336505e4b1c 121 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 122 typedef union {
Kojto 111:4336505e4b1c 123 struct {
Kojto 111:4336505e4b1c 124 uint16_t SWRST:1; /*!< bit: 0 Software Reset */
Kojto 111:4336505e4b1c 125 uint16_t ENABLE:1; /*!< bit: 1 Enable */
Kojto 111:4336505e4b1c 126 uint16_t MODE:2; /*!< bit: 2.. 3 Operating Mode */
Kojto 111:4336505e4b1c 127 uint16_t :4; /*!< bit: 4.. 7 Reserved */
Kojto 111:4336505e4b1c 128 uint16_t PRESCALER:4; /*!< bit: 8..11 Prescaler */
Kojto 111:4336505e4b1c 129 uint16_t :4; /*!< bit: 12..15 Reserved */
Kojto 111:4336505e4b1c 130 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 131 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 132 } RTC_MODE1_CTRL_Type;
Kojto 111:4336505e4b1c 133 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 134
Kojto 111:4336505e4b1c 135 #define RTC_MODE1_CTRL_OFFSET 0x00 /**< \brief (RTC_MODE1_CTRL offset) MODE1 Control */
Kojto 111:4336505e4b1c 136 #define RTC_MODE1_CTRL_RESETVALUE 0x0000ul /**< \brief (RTC_MODE1_CTRL reset_value) MODE1 Control */
Kojto 111:4336505e4b1c 137
Kojto 111:4336505e4b1c 138 #define RTC_MODE1_CTRL_SWRST_Pos 0 /**< \brief (RTC_MODE1_CTRL) Software Reset */
Kojto 111:4336505e4b1c 139 #define RTC_MODE1_CTRL_SWRST (0x1ul << RTC_MODE1_CTRL_SWRST_Pos)
Kojto 111:4336505e4b1c 140 #define RTC_MODE1_CTRL_ENABLE_Pos 1 /**< \brief (RTC_MODE1_CTRL) Enable */
Kojto 111:4336505e4b1c 141 #define RTC_MODE1_CTRL_ENABLE (0x1ul << RTC_MODE1_CTRL_ENABLE_Pos)
Kojto 111:4336505e4b1c 142 #define RTC_MODE1_CTRL_MODE_Pos 2 /**< \brief (RTC_MODE1_CTRL) Operating Mode */
Kojto 111:4336505e4b1c 143 #define RTC_MODE1_CTRL_MODE_Msk (0x3ul << RTC_MODE1_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 144 #define RTC_MODE1_CTRL_MODE(value) ((RTC_MODE1_CTRL_MODE_Msk & ((value) << RTC_MODE1_CTRL_MODE_Pos)))
Kojto 111:4336505e4b1c 145 #define RTC_MODE1_CTRL_MODE_COUNT32_Val 0x0ul /**< \brief (RTC_MODE1_CTRL) Mode 0: 32-bit Counter */
Kojto 111:4336505e4b1c 146 #define RTC_MODE1_CTRL_MODE_COUNT16_Val 0x1ul /**< \brief (RTC_MODE1_CTRL) Mode 1: 16-bit Counter */
Kojto 111:4336505e4b1c 147 #define RTC_MODE1_CTRL_MODE_CLOCK_Val 0x2ul /**< \brief (RTC_MODE1_CTRL) Mode 2: Clock/Calendar */
Kojto 111:4336505e4b1c 148 #define RTC_MODE1_CTRL_MODE_COUNT32 (RTC_MODE1_CTRL_MODE_COUNT32_Val << RTC_MODE1_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 149 #define RTC_MODE1_CTRL_MODE_COUNT16 (RTC_MODE1_CTRL_MODE_COUNT16_Val << RTC_MODE1_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 150 #define RTC_MODE1_CTRL_MODE_CLOCK (RTC_MODE1_CTRL_MODE_CLOCK_Val << RTC_MODE1_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 151 #define RTC_MODE1_CTRL_PRESCALER_Pos 8 /**< \brief (RTC_MODE1_CTRL) Prescaler */
Kojto 111:4336505e4b1c 152 #define RTC_MODE1_CTRL_PRESCALER_Msk (0xFul << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 153 #define RTC_MODE1_CTRL_PRESCALER(value) ((RTC_MODE1_CTRL_PRESCALER_Msk & ((value) << RTC_MODE1_CTRL_PRESCALER_Pos)))
Kojto 111:4336505e4b1c 154 #define RTC_MODE1_CTRL_PRESCALER_DIV1_Val 0x0ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/1 */
Kojto 111:4336505e4b1c 155 #define RTC_MODE1_CTRL_PRESCALER_DIV2_Val 0x1ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/2 */
Kojto 111:4336505e4b1c 156 #define RTC_MODE1_CTRL_PRESCALER_DIV4_Val 0x2ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/4 */
Kojto 111:4336505e4b1c 157 #define RTC_MODE1_CTRL_PRESCALER_DIV8_Val 0x3ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/8 */
Kojto 111:4336505e4b1c 158 #define RTC_MODE1_CTRL_PRESCALER_DIV16_Val 0x4ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/16 */
Kojto 111:4336505e4b1c 159 #define RTC_MODE1_CTRL_PRESCALER_DIV32_Val 0x5ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/32 */
Kojto 111:4336505e4b1c 160 #define RTC_MODE1_CTRL_PRESCALER_DIV64_Val 0x6ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/64 */
Kojto 111:4336505e4b1c 161 #define RTC_MODE1_CTRL_PRESCALER_DIV128_Val 0x7ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/128 */
Kojto 111:4336505e4b1c 162 #define RTC_MODE1_CTRL_PRESCALER_DIV256_Val 0x8ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/256 */
Kojto 111:4336505e4b1c 163 #define RTC_MODE1_CTRL_PRESCALER_DIV512_Val 0x9ul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/512 */
Kojto 111:4336505e4b1c 164 #define RTC_MODE1_CTRL_PRESCALER_DIV1024_Val 0xAul /**< \brief (RTC_MODE1_CTRL) CLK_RTC_CNT = GCLK_RTC/1024 */
Kojto 111:4336505e4b1c 165 #define RTC_MODE1_CTRL_PRESCALER_DIV1 (RTC_MODE1_CTRL_PRESCALER_DIV1_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 166 #define RTC_MODE1_CTRL_PRESCALER_DIV2 (RTC_MODE1_CTRL_PRESCALER_DIV2_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 167 #define RTC_MODE1_CTRL_PRESCALER_DIV4 (RTC_MODE1_CTRL_PRESCALER_DIV4_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 168 #define RTC_MODE1_CTRL_PRESCALER_DIV8 (RTC_MODE1_CTRL_PRESCALER_DIV8_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 169 #define RTC_MODE1_CTRL_PRESCALER_DIV16 (RTC_MODE1_CTRL_PRESCALER_DIV16_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 170 #define RTC_MODE1_CTRL_PRESCALER_DIV32 (RTC_MODE1_CTRL_PRESCALER_DIV32_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 171 #define RTC_MODE1_CTRL_PRESCALER_DIV64 (RTC_MODE1_CTRL_PRESCALER_DIV64_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 172 #define RTC_MODE1_CTRL_PRESCALER_DIV128 (RTC_MODE1_CTRL_PRESCALER_DIV128_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 173 #define RTC_MODE1_CTRL_PRESCALER_DIV256 (RTC_MODE1_CTRL_PRESCALER_DIV256_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 174 #define RTC_MODE1_CTRL_PRESCALER_DIV512 (RTC_MODE1_CTRL_PRESCALER_DIV512_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 175 #define RTC_MODE1_CTRL_PRESCALER_DIV1024 (RTC_MODE1_CTRL_PRESCALER_DIV1024_Val << RTC_MODE1_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 176 #define RTC_MODE1_CTRL_MASK 0x0F0Ful /**< \brief (RTC_MODE1_CTRL) MASK Register */
Kojto 111:4336505e4b1c 177
Kojto 111:4336505e4b1c 178 /* -------- RTC_MODE2_CTRL : (RTC Offset: 0x00) (R/W 16) MODE2 MODE2 Control -------- */
Kojto 111:4336505e4b1c 179 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 180 typedef union {
Kojto 111:4336505e4b1c 181 struct {
Kojto 111:4336505e4b1c 182 uint16_t SWRST:1; /*!< bit: 0 Software Reset */
Kojto 111:4336505e4b1c 183 uint16_t ENABLE:1; /*!< bit: 1 Enable */
Kojto 111:4336505e4b1c 184 uint16_t MODE:2; /*!< bit: 2.. 3 Operating Mode */
Kojto 111:4336505e4b1c 185 uint16_t :2; /*!< bit: 4.. 5 Reserved */
Kojto 111:4336505e4b1c 186 uint16_t CLKREP:1; /*!< bit: 6 Clock Representation */
Kojto 111:4336505e4b1c 187 uint16_t MATCHCLR:1; /*!< bit: 7 Clear on Match */
Kojto 111:4336505e4b1c 188 uint16_t PRESCALER:4; /*!< bit: 8..11 Prescaler */
Kojto 111:4336505e4b1c 189 uint16_t :4; /*!< bit: 12..15 Reserved */
Kojto 111:4336505e4b1c 190 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 191 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 192 } RTC_MODE2_CTRL_Type;
Kojto 111:4336505e4b1c 193 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 194
Kojto 111:4336505e4b1c 195 #define RTC_MODE2_CTRL_OFFSET 0x00 /**< \brief (RTC_MODE2_CTRL offset) MODE2 Control */
Kojto 111:4336505e4b1c 196 #define RTC_MODE2_CTRL_RESETVALUE 0x0000ul /**< \brief (RTC_MODE2_CTRL reset_value) MODE2 Control */
Kojto 111:4336505e4b1c 197
Kojto 111:4336505e4b1c 198 #define RTC_MODE2_CTRL_SWRST_Pos 0 /**< \brief (RTC_MODE2_CTRL) Software Reset */
Kojto 111:4336505e4b1c 199 #define RTC_MODE2_CTRL_SWRST (0x1ul << RTC_MODE2_CTRL_SWRST_Pos)
Kojto 111:4336505e4b1c 200 #define RTC_MODE2_CTRL_ENABLE_Pos 1 /**< \brief (RTC_MODE2_CTRL) Enable */
Kojto 111:4336505e4b1c 201 #define RTC_MODE2_CTRL_ENABLE (0x1ul << RTC_MODE2_CTRL_ENABLE_Pos)
Kojto 111:4336505e4b1c 202 #define RTC_MODE2_CTRL_MODE_Pos 2 /**< \brief (RTC_MODE2_CTRL) Operating Mode */
Kojto 111:4336505e4b1c 203 #define RTC_MODE2_CTRL_MODE_Msk (0x3ul << RTC_MODE2_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 204 #define RTC_MODE2_CTRL_MODE(value) ((RTC_MODE2_CTRL_MODE_Msk & ((value) << RTC_MODE2_CTRL_MODE_Pos)))
Kojto 111:4336505e4b1c 205 #define RTC_MODE2_CTRL_MODE_COUNT32_Val 0x0ul /**< \brief (RTC_MODE2_CTRL) Mode 0: 32-bit Counter */
Kojto 111:4336505e4b1c 206 #define RTC_MODE2_CTRL_MODE_COUNT16_Val 0x1ul /**< \brief (RTC_MODE2_CTRL) Mode 1: 16-bit Counter */
Kojto 111:4336505e4b1c 207 #define RTC_MODE2_CTRL_MODE_CLOCK_Val 0x2ul /**< \brief (RTC_MODE2_CTRL) Mode 2: Clock/Calendar */
Kojto 111:4336505e4b1c 208 #define RTC_MODE2_CTRL_MODE_COUNT32 (RTC_MODE2_CTRL_MODE_COUNT32_Val << RTC_MODE2_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 209 #define RTC_MODE2_CTRL_MODE_COUNT16 (RTC_MODE2_CTRL_MODE_COUNT16_Val << RTC_MODE2_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 210 #define RTC_MODE2_CTRL_MODE_CLOCK (RTC_MODE2_CTRL_MODE_CLOCK_Val << RTC_MODE2_CTRL_MODE_Pos)
Kojto 111:4336505e4b1c 211 #define RTC_MODE2_CTRL_CLKREP_Pos 6 /**< \brief (RTC_MODE2_CTRL) Clock Representation */
Kojto 111:4336505e4b1c 212 #define RTC_MODE2_CTRL_CLKREP (0x1ul << RTC_MODE2_CTRL_CLKREP_Pos)
Kojto 111:4336505e4b1c 213 #define RTC_MODE2_CTRL_MATCHCLR_Pos 7 /**< \brief (RTC_MODE2_CTRL) Clear on Match */
Kojto 111:4336505e4b1c 214 #define RTC_MODE2_CTRL_MATCHCLR (0x1ul << RTC_MODE2_CTRL_MATCHCLR_Pos)
Kojto 111:4336505e4b1c 215 #define RTC_MODE2_CTRL_PRESCALER_Pos 8 /**< \brief (RTC_MODE2_CTRL) Prescaler */
Kojto 111:4336505e4b1c 216 #define RTC_MODE2_CTRL_PRESCALER_Msk (0xFul << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 217 #define RTC_MODE2_CTRL_PRESCALER(value) ((RTC_MODE2_CTRL_PRESCALER_Msk & ((value) << RTC_MODE2_CTRL_PRESCALER_Pos)))
Kojto 111:4336505e4b1c 218 #define RTC_MODE2_CTRL_PRESCALER_DIV1_Val 0x0ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/1 */
Kojto 111:4336505e4b1c 219 #define RTC_MODE2_CTRL_PRESCALER_DIV2_Val 0x1ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/2 */
Kojto 111:4336505e4b1c 220 #define RTC_MODE2_CTRL_PRESCALER_DIV4_Val 0x2ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/4 */
Kojto 111:4336505e4b1c 221 #define RTC_MODE2_CTRL_PRESCALER_DIV8_Val 0x3ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/8 */
Kojto 111:4336505e4b1c 222 #define RTC_MODE2_CTRL_PRESCALER_DIV16_Val 0x4ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/16 */
Kojto 111:4336505e4b1c 223 #define RTC_MODE2_CTRL_PRESCALER_DIV32_Val 0x5ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/32 */
Kojto 111:4336505e4b1c 224 #define RTC_MODE2_CTRL_PRESCALER_DIV64_Val 0x6ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/64 */
Kojto 111:4336505e4b1c 225 #define RTC_MODE2_CTRL_PRESCALER_DIV128_Val 0x7ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/128 */
Kojto 111:4336505e4b1c 226 #define RTC_MODE2_CTRL_PRESCALER_DIV256_Val 0x8ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/256 */
Kojto 111:4336505e4b1c 227 #define RTC_MODE2_CTRL_PRESCALER_DIV512_Val 0x9ul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/512 */
Kojto 111:4336505e4b1c 228 #define RTC_MODE2_CTRL_PRESCALER_DIV1024_Val 0xAul /**< \brief (RTC_MODE2_CTRL) CLK_RTC_CNT = GCLK_RTC/1024 */
Kojto 111:4336505e4b1c 229 #define RTC_MODE2_CTRL_PRESCALER_DIV1 (RTC_MODE2_CTRL_PRESCALER_DIV1_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 230 #define RTC_MODE2_CTRL_PRESCALER_DIV2 (RTC_MODE2_CTRL_PRESCALER_DIV2_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 231 #define RTC_MODE2_CTRL_PRESCALER_DIV4 (RTC_MODE2_CTRL_PRESCALER_DIV4_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 232 #define RTC_MODE2_CTRL_PRESCALER_DIV8 (RTC_MODE2_CTRL_PRESCALER_DIV8_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 233 #define RTC_MODE2_CTRL_PRESCALER_DIV16 (RTC_MODE2_CTRL_PRESCALER_DIV16_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 234 #define RTC_MODE2_CTRL_PRESCALER_DIV32 (RTC_MODE2_CTRL_PRESCALER_DIV32_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 235 #define RTC_MODE2_CTRL_PRESCALER_DIV64 (RTC_MODE2_CTRL_PRESCALER_DIV64_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 236 #define RTC_MODE2_CTRL_PRESCALER_DIV128 (RTC_MODE2_CTRL_PRESCALER_DIV128_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 237 #define RTC_MODE2_CTRL_PRESCALER_DIV256 (RTC_MODE2_CTRL_PRESCALER_DIV256_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 238 #define RTC_MODE2_CTRL_PRESCALER_DIV512 (RTC_MODE2_CTRL_PRESCALER_DIV512_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 239 #define RTC_MODE2_CTRL_PRESCALER_DIV1024 (RTC_MODE2_CTRL_PRESCALER_DIV1024_Val << RTC_MODE2_CTRL_PRESCALER_Pos)
Kojto 111:4336505e4b1c 240 #define RTC_MODE2_CTRL_MASK 0x0FCFul /**< \brief (RTC_MODE2_CTRL) MASK Register */
Kojto 111:4336505e4b1c 241
Kojto 111:4336505e4b1c 242 /* -------- RTC_READREQ : (RTC Offset: 0x02) (R/W 16) Read Request -------- */
Kojto 111:4336505e4b1c 243 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 244 typedef union {
Kojto 111:4336505e4b1c 245 struct {
Kojto 111:4336505e4b1c 246 uint16_t ADDR:6; /*!< bit: 0.. 5 Address */
Kojto 111:4336505e4b1c 247 uint16_t :8; /*!< bit: 6..13 Reserved */
Kojto 111:4336505e4b1c 248 uint16_t RCONT:1; /*!< bit: 14 Read Continuously */
Kojto 111:4336505e4b1c 249 uint16_t RREQ:1; /*!< bit: 15 Read Request */
Kojto 111:4336505e4b1c 250 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 251 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 252 } RTC_READREQ_Type;
Kojto 111:4336505e4b1c 253 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 254
Kojto 111:4336505e4b1c 255 #define RTC_READREQ_OFFSET 0x02 /**< \brief (RTC_READREQ offset) Read Request */
Kojto 111:4336505e4b1c 256 #define RTC_READREQ_RESETVALUE 0x0010ul /**< \brief (RTC_READREQ reset_value) Read Request */
Kojto 111:4336505e4b1c 257
Kojto 111:4336505e4b1c 258 #define RTC_READREQ_ADDR_Pos 0 /**< \brief (RTC_READREQ) Address */
Kojto 111:4336505e4b1c 259 #define RTC_READREQ_ADDR_Msk (0x3Ful << RTC_READREQ_ADDR_Pos)
Kojto 111:4336505e4b1c 260 #define RTC_READREQ_ADDR(value) ((RTC_READREQ_ADDR_Msk & ((value) << RTC_READREQ_ADDR_Pos)))
Kojto 111:4336505e4b1c 261 #define RTC_READREQ_RCONT_Pos 14 /**< \brief (RTC_READREQ) Read Continuously */
Kojto 111:4336505e4b1c 262 #define RTC_READREQ_RCONT (0x1ul << RTC_READREQ_RCONT_Pos)
Kojto 111:4336505e4b1c 263 #define RTC_READREQ_RREQ_Pos 15 /**< \brief (RTC_READREQ) Read Request */
Kojto 111:4336505e4b1c 264 #define RTC_READREQ_RREQ (0x1ul << RTC_READREQ_RREQ_Pos)
Kojto 111:4336505e4b1c 265 #define RTC_READREQ_MASK 0xC03Ful /**< \brief (RTC_READREQ) MASK Register */
Kojto 111:4336505e4b1c 266
Kojto 111:4336505e4b1c 267 /* -------- RTC_MODE0_EVCTRL : (RTC Offset: 0x04) (R/W 16) MODE0 MODE0 Event Control -------- */
Kojto 111:4336505e4b1c 268 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 269 typedef union {
Kojto 111:4336505e4b1c 270 struct {
Kojto 111:4336505e4b1c 271 uint16_t PEREO0:1; /*!< bit: 0 Periodic Interval 0 Event Output Enable */
Kojto 111:4336505e4b1c 272 uint16_t PEREO1:1; /*!< bit: 1 Periodic Interval 1 Event Output Enable */
Kojto 111:4336505e4b1c 273 uint16_t PEREO2:1; /*!< bit: 2 Periodic Interval 2 Event Output Enable */
Kojto 111:4336505e4b1c 274 uint16_t PEREO3:1; /*!< bit: 3 Periodic Interval 3 Event Output Enable */
Kojto 111:4336505e4b1c 275 uint16_t PEREO4:1; /*!< bit: 4 Periodic Interval 4 Event Output Enable */
Kojto 111:4336505e4b1c 276 uint16_t PEREO5:1; /*!< bit: 5 Periodic Interval 5 Event Output Enable */
Kojto 111:4336505e4b1c 277 uint16_t PEREO6:1; /*!< bit: 6 Periodic Interval 6 Event Output Enable */
Kojto 111:4336505e4b1c 278 uint16_t PEREO7:1; /*!< bit: 7 Periodic Interval 7 Event Output Enable */
Kojto 111:4336505e4b1c 279 uint16_t CMPEO0:1; /*!< bit: 8 Compare 0 Event Output Enable */
Kojto 111:4336505e4b1c 280 uint16_t :6; /*!< bit: 9..14 Reserved */
Kojto 111:4336505e4b1c 281 uint16_t OVFEO:1; /*!< bit: 15 Overflow Event Output Enable */
Kojto 111:4336505e4b1c 282 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 283 struct {
Kojto 111:4336505e4b1c 284 uint16_t PEREO:8; /*!< bit: 0.. 7 Periodic Interval x Event Output Enable */
Kojto 111:4336505e4b1c 285 uint16_t CMPEO:1; /*!< bit: 8 Compare x Event Output Enable */
Kojto 111:4336505e4b1c 286 uint16_t :7; /*!< bit: 9..15 Reserved */
Kojto 111:4336505e4b1c 287 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 288 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 289 } RTC_MODE0_EVCTRL_Type;
Kojto 111:4336505e4b1c 290 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 291
Kojto 111:4336505e4b1c 292 #define RTC_MODE0_EVCTRL_OFFSET 0x04 /**< \brief (RTC_MODE0_EVCTRL offset) MODE0 Event Control */
Kojto 111:4336505e4b1c 293 #define RTC_MODE0_EVCTRL_RESETVALUE 0x0000ul /**< \brief (RTC_MODE0_EVCTRL reset_value) MODE0 Event Control */
Kojto 111:4336505e4b1c 294
Kojto 111:4336505e4b1c 295 #define RTC_MODE0_EVCTRL_PEREO0_Pos 0 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval 0 Event Output Enable */
Kojto 111:4336505e4b1c 296 #define RTC_MODE0_EVCTRL_PEREO0 (1 << RTC_MODE0_EVCTRL_PEREO0_Pos)
Kojto 111:4336505e4b1c 297 #define RTC_MODE0_EVCTRL_PEREO1_Pos 1 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval 1 Event Output Enable */
Kojto 111:4336505e4b1c 298 #define RTC_MODE0_EVCTRL_PEREO1 (1 << RTC_MODE0_EVCTRL_PEREO1_Pos)
Kojto 111:4336505e4b1c 299 #define RTC_MODE0_EVCTRL_PEREO2_Pos 2 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval 2 Event Output Enable */
Kojto 111:4336505e4b1c 300 #define RTC_MODE0_EVCTRL_PEREO2 (1 << RTC_MODE0_EVCTRL_PEREO2_Pos)
Kojto 111:4336505e4b1c 301 #define RTC_MODE0_EVCTRL_PEREO3_Pos 3 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval 3 Event Output Enable */
Kojto 111:4336505e4b1c 302 #define RTC_MODE0_EVCTRL_PEREO3 (1 << RTC_MODE0_EVCTRL_PEREO3_Pos)
Kojto 111:4336505e4b1c 303 #define RTC_MODE0_EVCTRL_PEREO4_Pos 4 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval 4 Event Output Enable */
Kojto 111:4336505e4b1c 304 #define RTC_MODE0_EVCTRL_PEREO4 (1 << RTC_MODE0_EVCTRL_PEREO4_Pos)
Kojto 111:4336505e4b1c 305 #define RTC_MODE0_EVCTRL_PEREO5_Pos 5 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval 5 Event Output Enable */
Kojto 111:4336505e4b1c 306 #define RTC_MODE0_EVCTRL_PEREO5 (1 << RTC_MODE0_EVCTRL_PEREO5_Pos)
Kojto 111:4336505e4b1c 307 #define RTC_MODE0_EVCTRL_PEREO6_Pos 6 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval 6 Event Output Enable */
Kojto 111:4336505e4b1c 308 #define RTC_MODE0_EVCTRL_PEREO6 (1 << RTC_MODE0_EVCTRL_PEREO6_Pos)
Kojto 111:4336505e4b1c 309 #define RTC_MODE0_EVCTRL_PEREO7_Pos 7 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval 7 Event Output Enable */
Kojto 111:4336505e4b1c 310 #define RTC_MODE0_EVCTRL_PEREO7 (1 << RTC_MODE0_EVCTRL_PEREO7_Pos)
Kojto 111:4336505e4b1c 311 #define RTC_MODE0_EVCTRL_PEREO_Pos 0 /**< \brief (RTC_MODE0_EVCTRL) Periodic Interval x Event Output Enable */
Kojto 111:4336505e4b1c 312 #define RTC_MODE0_EVCTRL_PEREO_Msk (0xFFul << RTC_MODE0_EVCTRL_PEREO_Pos)
Kojto 111:4336505e4b1c 313 #define RTC_MODE0_EVCTRL_PEREO(value) ((RTC_MODE0_EVCTRL_PEREO_Msk & ((value) << RTC_MODE0_EVCTRL_PEREO_Pos)))
Kojto 111:4336505e4b1c 314 #define RTC_MODE0_EVCTRL_CMPEO0_Pos 8 /**< \brief (RTC_MODE0_EVCTRL) Compare 0 Event Output Enable */
Kojto 111:4336505e4b1c 315 #define RTC_MODE0_EVCTRL_CMPEO0 (1 << RTC_MODE0_EVCTRL_CMPEO0_Pos)
Kojto 111:4336505e4b1c 316 #define RTC_MODE0_EVCTRL_CMPEO_Pos 8 /**< \brief (RTC_MODE0_EVCTRL) Compare x Event Output Enable */
Kojto 111:4336505e4b1c 317 #define RTC_MODE0_EVCTRL_CMPEO_Msk (0x1ul << RTC_MODE0_EVCTRL_CMPEO_Pos)
Kojto 111:4336505e4b1c 318 #define RTC_MODE0_EVCTRL_CMPEO(value) ((RTC_MODE0_EVCTRL_CMPEO_Msk & ((value) << RTC_MODE0_EVCTRL_CMPEO_Pos)))
Kojto 111:4336505e4b1c 319 #define RTC_MODE0_EVCTRL_OVFEO_Pos 15 /**< \brief (RTC_MODE0_EVCTRL) Overflow Event Output Enable */
Kojto 111:4336505e4b1c 320 #define RTC_MODE0_EVCTRL_OVFEO (0x1ul << RTC_MODE0_EVCTRL_OVFEO_Pos)
Kojto 111:4336505e4b1c 321 #define RTC_MODE0_EVCTRL_MASK 0x81FFul /**< \brief (RTC_MODE0_EVCTRL) MASK Register */
Kojto 111:4336505e4b1c 322
Kojto 111:4336505e4b1c 323 /* -------- RTC_MODE1_EVCTRL : (RTC Offset: 0x04) (R/W 16) MODE1 MODE1 Event Control -------- */
Kojto 111:4336505e4b1c 324 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 325 typedef union {
Kojto 111:4336505e4b1c 326 struct {
Kojto 111:4336505e4b1c 327 uint16_t PEREO0:1; /*!< bit: 0 Periodic Interval 0 Event Output Enable */
Kojto 111:4336505e4b1c 328 uint16_t PEREO1:1; /*!< bit: 1 Periodic Interval 1 Event Output Enable */
Kojto 111:4336505e4b1c 329 uint16_t PEREO2:1; /*!< bit: 2 Periodic Interval 2 Event Output Enable */
Kojto 111:4336505e4b1c 330 uint16_t PEREO3:1; /*!< bit: 3 Periodic Interval 3 Event Output Enable */
Kojto 111:4336505e4b1c 331 uint16_t PEREO4:1; /*!< bit: 4 Periodic Interval 4 Event Output Enable */
Kojto 111:4336505e4b1c 332 uint16_t PEREO5:1; /*!< bit: 5 Periodic Interval 5 Event Output Enable */
Kojto 111:4336505e4b1c 333 uint16_t PEREO6:1; /*!< bit: 6 Periodic Interval 6 Event Output Enable */
Kojto 111:4336505e4b1c 334 uint16_t PEREO7:1; /*!< bit: 7 Periodic Interval 7 Event Output Enable */
Kojto 111:4336505e4b1c 335 uint16_t CMPEO0:1; /*!< bit: 8 Compare 0 Event Output Enable */
Kojto 111:4336505e4b1c 336 uint16_t CMPEO1:1; /*!< bit: 9 Compare 1 Event Output Enable */
Kojto 111:4336505e4b1c 337 uint16_t :5; /*!< bit: 10..14 Reserved */
Kojto 111:4336505e4b1c 338 uint16_t OVFEO:1; /*!< bit: 15 Overflow Event Output Enable */
Kojto 111:4336505e4b1c 339 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 340 struct {
Kojto 111:4336505e4b1c 341 uint16_t PEREO:8; /*!< bit: 0.. 7 Periodic Interval x Event Output Enable */
Kojto 111:4336505e4b1c 342 uint16_t CMPEO:2; /*!< bit: 8.. 9 Compare x Event Output Enable */
Kojto 111:4336505e4b1c 343 uint16_t :6; /*!< bit: 10..15 Reserved */
Kojto 111:4336505e4b1c 344 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 345 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 346 } RTC_MODE1_EVCTRL_Type;
Kojto 111:4336505e4b1c 347 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 348
Kojto 111:4336505e4b1c 349 #define RTC_MODE1_EVCTRL_OFFSET 0x04 /**< \brief (RTC_MODE1_EVCTRL offset) MODE1 Event Control */
Kojto 111:4336505e4b1c 350 #define RTC_MODE1_EVCTRL_RESETVALUE 0x0000ul /**< \brief (RTC_MODE1_EVCTRL reset_value) MODE1 Event Control */
Kojto 111:4336505e4b1c 351
Kojto 111:4336505e4b1c 352 #define RTC_MODE1_EVCTRL_PEREO0_Pos 0 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval 0 Event Output Enable */
Kojto 111:4336505e4b1c 353 #define RTC_MODE1_EVCTRL_PEREO0 (1 << RTC_MODE1_EVCTRL_PEREO0_Pos)
Kojto 111:4336505e4b1c 354 #define RTC_MODE1_EVCTRL_PEREO1_Pos 1 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval 1 Event Output Enable */
Kojto 111:4336505e4b1c 355 #define RTC_MODE1_EVCTRL_PEREO1 (1 << RTC_MODE1_EVCTRL_PEREO1_Pos)
Kojto 111:4336505e4b1c 356 #define RTC_MODE1_EVCTRL_PEREO2_Pos 2 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval 2 Event Output Enable */
Kojto 111:4336505e4b1c 357 #define RTC_MODE1_EVCTRL_PEREO2 (1 << RTC_MODE1_EVCTRL_PEREO2_Pos)
Kojto 111:4336505e4b1c 358 #define RTC_MODE1_EVCTRL_PEREO3_Pos 3 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval 3 Event Output Enable */
Kojto 111:4336505e4b1c 359 #define RTC_MODE1_EVCTRL_PEREO3 (1 << RTC_MODE1_EVCTRL_PEREO3_Pos)
Kojto 111:4336505e4b1c 360 #define RTC_MODE1_EVCTRL_PEREO4_Pos 4 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval 4 Event Output Enable */
Kojto 111:4336505e4b1c 361 #define RTC_MODE1_EVCTRL_PEREO4 (1 << RTC_MODE1_EVCTRL_PEREO4_Pos)
Kojto 111:4336505e4b1c 362 #define RTC_MODE1_EVCTRL_PEREO5_Pos 5 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval 5 Event Output Enable */
Kojto 111:4336505e4b1c 363 #define RTC_MODE1_EVCTRL_PEREO5 (1 << RTC_MODE1_EVCTRL_PEREO5_Pos)
Kojto 111:4336505e4b1c 364 #define RTC_MODE1_EVCTRL_PEREO6_Pos 6 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval 6 Event Output Enable */
Kojto 111:4336505e4b1c 365 #define RTC_MODE1_EVCTRL_PEREO6 (1 << RTC_MODE1_EVCTRL_PEREO6_Pos)
Kojto 111:4336505e4b1c 366 #define RTC_MODE1_EVCTRL_PEREO7_Pos 7 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval 7 Event Output Enable */
Kojto 111:4336505e4b1c 367 #define RTC_MODE1_EVCTRL_PEREO7 (1 << RTC_MODE1_EVCTRL_PEREO7_Pos)
Kojto 111:4336505e4b1c 368 #define RTC_MODE1_EVCTRL_PEREO_Pos 0 /**< \brief (RTC_MODE1_EVCTRL) Periodic Interval x Event Output Enable */
Kojto 111:4336505e4b1c 369 #define RTC_MODE1_EVCTRL_PEREO_Msk (0xFFul << RTC_MODE1_EVCTRL_PEREO_Pos)
Kojto 111:4336505e4b1c 370 #define RTC_MODE1_EVCTRL_PEREO(value) ((RTC_MODE1_EVCTRL_PEREO_Msk & ((value) << RTC_MODE1_EVCTRL_PEREO_Pos)))
Kojto 111:4336505e4b1c 371 #define RTC_MODE1_EVCTRL_CMPEO0_Pos 8 /**< \brief (RTC_MODE1_EVCTRL) Compare 0 Event Output Enable */
Kojto 111:4336505e4b1c 372 #define RTC_MODE1_EVCTRL_CMPEO0 (1 << RTC_MODE1_EVCTRL_CMPEO0_Pos)
Kojto 111:4336505e4b1c 373 #define RTC_MODE1_EVCTRL_CMPEO1_Pos 9 /**< \brief (RTC_MODE1_EVCTRL) Compare 1 Event Output Enable */
Kojto 111:4336505e4b1c 374 #define RTC_MODE1_EVCTRL_CMPEO1 (1 << RTC_MODE1_EVCTRL_CMPEO1_Pos)
Kojto 111:4336505e4b1c 375 #define RTC_MODE1_EVCTRL_CMPEO_Pos 8 /**< \brief (RTC_MODE1_EVCTRL) Compare x Event Output Enable */
Kojto 111:4336505e4b1c 376 #define RTC_MODE1_EVCTRL_CMPEO_Msk (0x3ul << RTC_MODE1_EVCTRL_CMPEO_Pos)
Kojto 111:4336505e4b1c 377 #define RTC_MODE1_EVCTRL_CMPEO(value) ((RTC_MODE1_EVCTRL_CMPEO_Msk & ((value) << RTC_MODE1_EVCTRL_CMPEO_Pos)))
Kojto 111:4336505e4b1c 378 #define RTC_MODE1_EVCTRL_OVFEO_Pos 15 /**< \brief (RTC_MODE1_EVCTRL) Overflow Event Output Enable */
Kojto 111:4336505e4b1c 379 #define RTC_MODE1_EVCTRL_OVFEO (0x1ul << RTC_MODE1_EVCTRL_OVFEO_Pos)
Kojto 111:4336505e4b1c 380 #define RTC_MODE1_EVCTRL_MASK 0x83FFul /**< \brief (RTC_MODE1_EVCTRL) MASK Register */
Kojto 111:4336505e4b1c 381
Kojto 111:4336505e4b1c 382 /* -------- RTC_MODE2_EVCTRL : (RTC Offset: 0x04) (R/W 16) MODE2 MODE2 Event Control -------- */
Kojto 111:4336505e4b1c 383 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 384 typedef union {
Kojto 111:4336505e4b1c 385 struct {
Kojto 111:4336505e4b1c 386 uint16_t PEREO0:1; /*!< bit: 0 Periodic Interval 0 Event Output Enable */
Kojto 111:4336505e4b1c 387 uint16_t PEREO1:1; /*!< bit: 1 Periodic Interval 1 Event Output Enable */
Kojto 111:4336505e4b1c 388 uint16_t PEREO2:1; /*!< bit: 2 Periodic Interval 2 Event Output Enable */
Kojto 111:4336505e4b1c 389 uint16_t PEREO3:1; /*!< bit: 3 Periodic Interval 3 Event Output Enable */
Kojto 111:4336505e4b1c 390 uint16_t PEREO4:1; /*!< bit: 4 Periodic Interval 4 Event Output Enable */
Kojto 111:4336505e4b1c 391 uint16_t PEREO5:1; /*!< bit: 5 Periodic Interval 5 Event Output Enable */
Kojto 111:4336505e4b1c 392 uint16_t PEREO6:1; /*!< bit: 6 Periodic Interval 6 Event Output Enable */
Kojto 111:4336505e4b1c 393 uint16_t PEREO7:1; /*!< bit: 7 Periodic Interval 7 Event Output Enable */
Kojto 111:4336505e4b1c 394 uint16_t ALARMEO0:1; /*!< bit: 8 Alarm 0 Event Output Enable */
Kojto 111:4336505e4b1c 395 uint16_t :6; /*!< bit: 9..14 Reserved */
Kojto 111:4336505e4b1c 396 uint16_t OVFEO:1; /*!< bit: 15 Overflow Event Output Enable */
Kojto 111:4336505e4b1c 397 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 398 struct {
Kojto 111:4336505e4b1c 399 uint16_t PEREO:8; /*!< bit: 0.. 7 Periodic Interval x Event Output Enable */
Kojto 111:4336505e4b1c 400 uint16_t ALARMEO:1; /*!< bit: 8 Alarm x Event Output Enable */
Kojto 111:4336505e4b1c 401 uint16_t :7; /*!< bit: 9..15 Reserved */
Kojto 111:4336505e4b1c 402 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 403 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 404 } RTC_MODE2_EVCTRL_Type;
Kojto 111:4336505e4b1c 405 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 406
Kojto 111:4336505e4b1c 407 #define RTC_MODE2_EVCTRL_OFFSET 0x04 /**< \brief (RTC_MODE2_EVCTRL offset) MODE2 Event Control */
Kojto 111:4336505e4b1c 408 #define RTC_MODE2_EVCTRL_RESETVALUE 0x0000ul /**< \brief (RTC_MODE2_EVCTRL reset_value) MODE2 Event Control */
Kojto 111:4336505e4b1c 409
Kojto 111:4336505e4b1c 410 #define RTC_MODE2_EVCTRL_PEREO0_Pos 0 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval 0 Event Output Enable */
Kojto 111:4336505e4b1c 411 #define RTC_MODE2_EVCTRL_PEREO0 (1 << RTC_MODE2_EVCTRL_PEREO0_Pos)
Kojto 111:4336505e4b1c 412 #define RTC_MODE2_EVCTRL_PEREO1_Pos 1 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval 1 Event Output Enable */
Kojto 111:4336505e4b1c 413 #define RTC_MODE2_EVCTRL_PEREO1 (1 << RTC_MODE2_EVCTRL_PEREO1_Pos)
Kojto 111:4336505e4b1c 414 #define RTC_MODE2_EVCTRL_PEREO2_Pos 2 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval 2 Event Output Enable */
Kojto 111:4336505e4b1c 415 #define RTC_MODE2_EVCTRL_PEREO2 (1 << RTC_MODE2_EVCTRL_PEREO2_Pos)
Kojto 111:4336505e4b1c 416 #define RTC_MODE2_EVCTRL_PEREO3_Pos 3 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval 3 Event Output Enable */
Kojto 111:4336505e4b1c 417 #define RTC_MODE2_EVCTRL_PEREO3 (1 << RTC_MODE2_EVCTRL_PEREO3_Pos)
Kojto 111:4336505e4b1c 418 #define RTC_MODE2_EVCTRL_PEREO4_Pos 4 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval 4 Event Output Enable */
Kojto 111:4336505e4b1c 419 #define RTC_MODE2_EVCTRL_PEREO4 (1 << RTC_MODE2_EVCTRL_PEREO4_Pos)
Kojto 111:4336505e4b1c 420 #define RTC_MODE2_EVCTRL_PEREO5_Pos 5 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval 5 Event Output Enable */
Kojto 111:4336505e4b1c 421 #define RTC_MODE2_EVCTRL_PEREO5 (1 << RTC_MODE2_EVCTRL_PEREO5_Pos)
Kojto 111:4336505e4b1c 422 #define RTC_MODE2_EVCTRL_PEREO6_Pos 6 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval 6 Event Output Enable */
Kojto 111:4336505e4b1c 423 #define RTC_MODE2_EVCTRL_PEREO6 (1 << RTC_MODE2_EVCTRL_PEREO6_Pos)
Kojto 111:4336505e4b1c 424 #define RTC_MODE2_EVCTRL_PEREO7_Pos 7 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval 7 Event Output Enable */
Kojto 111:4336505e4b1c 425 #define RTC_MODE2_EVCTRL_PEREO7 (1 << RTC_MODE2_EVCTRL_PEREO7_Pos)
Kojto 111:4336505e4b1c 426 #define RTC_MODE2_EVCTRL_PEREO_Pos 0 /**< \brief (RTC_MODE2_EVCTRL) Periodic Interval x Event Output Enable */
Kojto 111:4336505e4b1c 427 #define RTC_MODE2_EVCTRL_PEREO_Msk (0xFFul << RTC_MODE2_EVCTRL_PEREO_Pos)
Kojto 111:4336505e4b1c 428 #define RTC_MODE2_EVCTRL_PEREO(value) ((RTC_MODE2_EVCTRL_PEREO_Msk & ((value) << RTC_MODE2_EVCTRL_PEREO_Pos)))
Kojto 111:4336505e4b1c 429 #define RTC_MODE2_EVCTRL_ALARMEO0_Pos 8 /**< \brief (RTC_MODE2_EVCTRL) Alarm 0 Event Output Enable */
Kojto 111:4336505e4b1c 430 #define RTC_MODE2_EVCTRL_ALARMEO0 (1 << RTC_MODE2_EVCTRL_ALARMEO0_Pos)
Kojto 111:4336505e4b1c 431 #define RTC_MODE2_EVCTRL_ALARMEO_Pos 8 /**< \brief (RTC_MODE2_EVCTRL) Alarm x Event Output Enable */
Kojto 111:4336505e4b1c 432 #define RTC_MODE2_EVCTRL_ALARMEO_Msk (0x1ul << RTC_MODE2_EVCTRL_ALARMEO_Pos)
Kojto 111:4336505e4b1c 433 #define RTC_MODE2_EVCTRL_ALARMEO(value) ((RTC_MODE2_EVCTRL_ALARMEO_Msk & ((value) << RTC_MODE2_EVCTRL_ALARMEO_Pos)))
Kojto 111:4336505e4b1c 434 #define RTC_MODE2_EVCTRL_OVFEO_Pos 15 /**< \brief (RTC_MODE2_EVCTRL) Overflow Event Output Enable */
Kojto 111:4336505e4b1c 435 #define RTC_MODE2_EVCTRL_OVFEO (0x1ul << RTC_MODE2_EVCTRL_OVFEO_Pos)
Kojto 111:4336505e4b1c 436 #define RTC_MODE2_EVCTRL_MASK 0x81FFul /**< \brief (RTC_MODE2_EVCTRL) MASK Register */
Kojto 111:4336505e4b1c 437
Kojto 111:4336505e4b1c 438 /* -------- RTC_MODE0_INTENCLR : (RTC Offset: 0x06) (R/W 8) MODE0 MODE0 Interrupt Enable Clear -------- */
Kojto 111:4336505e4b1c 439 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 440 typedef union {
Kojto 111:4336505e4b1c 441 struct {
Kojto 111:4336505e4b1c 442 uint8_t CMP0:1; /*!< bit: 0 Compare 0 Interrupt Enable */
Kojto 111:4336505e4b1c 443 uint8_t :5; /*!< bit: 1.. 5 Reserved */
Kojto 111:4336505e4b1c 444 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 445 uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 446 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 447 struct {
Kojto 111:4336505e4b1c 448 uint8_t CMP:1; /*!< bit: 0 Compare x Interrupt Enable */
Kojto 111:4336505e4b1c 449 uint8_t :7; /*!< bit: 1.. 7 Reserved */
Kojto 111:4336505e4b1c 450 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 451 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 452 } RTC_MODE0_INTENCLR_Type;
Kojto 111:4336505e4b1c 453 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 454
Kojto 111:4336505e4b1c 455 #define RTC_MODE0_INTENCLR_OFFSET 0x06 /**< \brief (RTC_MODE0_INTENCLR offset) MODE0 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 456 #define RTC_MODE0_INTENCLR_RESETVALUE 0x00ul /**< \brief (RTC_MODE0_INTENCLR reset_value) MODE0 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 457
Kojto 111:4336505e4b1c 458 #define RTC_MODE0_INTENCLR_CMP0_Pos 0 /**< \brief (RTC_MODE0_INTENCLR) Compare 0 Interrupt Enable */
Kojto 111:4336505e4b1c 459 #define RTC_MODE0_INTENCLR_CMP0 (1 << RTC_MODE0_INTENCLR_CMP0_Pos)
Kojto 111:4336505e4b1c 460 #define RTC_MODE0_INTENCLR_CMP_Pos 0 /**< \brief (RTC_MODE0_INTENCLR) Compare x Interrupt Enable */
Kojto 111:4336505e4b1c 461 #define RTC_MODE0_INTENCLR_CMP_Msk (0x1ul << RTC_MODE0_INTENCLR_CMP_Pos)
Kojto 111:4336505e4b1c 462 #define RTC_MODE0_INTENCLR_CMP(value) ((RTC_MODE0_INTENCLR_CMP_Msk & ((value) << RTC_MODE0_INTENCLR_CMP_Pos)))
Kojto 111:4336505e4b1c 463 #define RTC_MODE0_INTENCLR_SYNCRDY_Pos 6 /**< \brief (RTC_MODE0_INTENCLR) Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 464 #define RTC_MODE0_INTENCLR_SYNCRDY (0x1ul << RTC_MODE0_INTENCLR_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 465 #define RTC_MODE0_INTENCLR_OVF_Pos 7 /**< \brief (RTC_MODE0_INTENCLR) Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 466 #define RTC_MODE0_INTENCLR_OVF (0x1ul << RTC_MODE0_INTENCLR_OVF_Pos)
Kojto 111:4336505e4b1c 467 #define RTC_MODE0_INTENCLR_MASK 0xC1ul /**< \brief (RTC_MODE0_INTENCLR) MASK Register */
Kojto 111:4336505e4b1c 468
Kojto 111:4336505e4b1c 469 /* -------- RTC_MODE1_INTENCLR : (RTC Offset: 0x06) (R/W 8) MODE1 MODE1 Interrupt Enable Clear -------- */
Kojto 111:4336505e4b1c 470 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 471 typedef union {
Kojto 111:4336505e4b1c 472 struct {
Kojto 111:4336505e4b1c 473 uint8_t CMP0:1; /*!< bit: 0 Compare 0 Interrupt Enable */
Kojto 111:4336505e4b1c 474 uint8_t CMP1:1; /*!< bit: 1 Compare 1 Interrupt Enable */
Kojto 111:4336505e4b1c 475 uint8_t :4; /*!< bit: 2.. 5 Reserved */
Kojto 111:4336505e4b1c 476 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 477 uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 478 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 479 struct {
Kojto 111:4336505e4b1c 480 uint8_t CMP:2; /*!< bit: 0.. 1 Compare x Interrupt Enable */
Kojto 111:4336505e4b1c 481 uint8_t :6; /*!< bit: 2.. 7 Reserved */
Kojto 111:4336505e4b1c 482 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 483 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 484 } RTC_MODE1_INTENCLR_Type;
Kojto 111:4336505e4b1c 485 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 486
Kojto 111:4336505e4b1c 487 #define RTC_MODE1_INTENCLR_OFFSET 0x06 /**< \brief (RTC_MODE1_INTENCLR offset) MODE1 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 488 #define RTC_MODE1_INTENCLR_RESETVALUE 0x00ul /**< \brief (RTC_MODE1_INTENCLR reset_value) MODE1 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 489
Kojto 111:4336505e4b1c 490 #define RTC_MODE1_INTENCLR_CMP0_Pos 0 /**< \brief (RTC_MODE1_INTENCLR) Compare 0 Interrupt Enable */
Kojto 111:4336505e4b1c 491 #define RTC_MODE1_INTENCLR_CMP0 (1 << RTC_MODE1_INTENCLR_CMP0_Pos)
Kojto 111:4336505e4b1c 492 #define RTC_MODE1_INTENCLR_CMP1_Pos 1 /**< \brief (RTC_MODE1_INTENCLR) Compare 1 Interrupt Enable */
Kojto 111:4336505e4b1c 493 #define RTC_MODE1_INTENCLR_CMP1 (1 << RTC_MODE1_INTENCLR_CMP1_Pos)
Kojto 111:4336505e4b1c 494 #define RTC_MODE1_INTENCLR_CMP_Pos 0 /**< \brief (RTC_MODE1_INTENCLR) Compare x Interrupt Enable */
Kojto 111:4336505e4b1c 495 #define RTC_MODE1_INTENCLR_CMP_Msk (0x3ul << RTC_MODE1_INTENCLR_CMP_Pos)
Kojto 111:4336505e4b1c 496 #define RTC_MODE1_INTENCLR_CMP(value) ((RTC_MODE1_INTENCLR_CMP_Msk & ((value) << RTC_MODE1_INTENCLR_CMP_Pos)))
Kojto 111:4336505e4b1c 497 #define RTC_MODE1_INTENCLR_SYNCRDY_Pos 6 /**< \brief (RTC_MODE1_INTENCLR) Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 498 #define RTC_MODE1_INTENCLR_SYNCRDY (0x1ul << RTC_MODE1_INTENCLR_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 499 #define RTC_MODE1_INTENCLR_OVF_Pos 7 /**< \brief (RTC_MODE1_INTENCLR) Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 500 #define RTC_MODE1_INTENCLR_OVF (0x1ul << RTC_MODE1_INTENCLR_OVF_Pos)
Kojto 111:4336505e4b1c 501 #define RTC_MODE1_INTENCLR_MASK 0xC3ul /**< \brief (RTC_MODE1_INTENCLR) MASK Register */
Kojto 111:4336505e4b1c 502
Kojto 111:4336505e4b1c 503 /* -------- RTC_MODE2_INTENCLR : (RTC Offset: 0x06) (R/W 8) MODE2 MODE2 Interrupt Enable Clear -------- */
Kojto 111:4336505e4b1c 504 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 505 typedef union {
Kojto 111:4336505e4b1c 506 struct {
Kojto 111:4336505e4b1c 507 uint8_t ALARM0:1; /*!< bit: 0 Alarm 0 Interrupt Enable */
Kojto 111:4336505e4b1c 508 uint8_t :5; /*!< bit: 1.. 5 Reserved */
Kojto 111:4336505e4b1c 509 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 510 uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 511 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 512 struct {
Kojto 111:4336505e4b1c 513 uint8_t ALARM:1; /*!< bit: 0 Alarm x Interrupt Enable */
Kojto 111:4336505e4b1c 514 uint8_t :7; /*!< bit: 1.. 7 Reserved */
Kojto 111:4336505e4b1c 515 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 516 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 517 } RTC_MODE2_INTENCLR_Type;
Kojto 111:4336505e4b1c 518 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 519
Kojto 111:4336505e4b1c 520 #define RTC_MODE2_INTENCLR_OFFSET 0x06 /**< \brief (RTC_MODE2_INTENCLR offset) MODE2 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 521 #define RTC_MODE2_INTENCLR_RESETVALUE 0x00ul /**< \brief (RTC_MODE2_INTENCLR reset_value) MODE2 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 522
Kojto 111:4336505e4b1c 523 #define RTC_MODE2_INTENCLR_ALARM0_Pos 0 /**< \brief (RTC_MODE2_INTENCLR) Alarm 0 Interrupt Enable */
Kojto 111:4336505e4b1c 524 #define RTC_MODE2_INTENCLR_ALARM0 (1 << RTC_MODE2_INTENCLR_ALARM0_Pos)
Kojto 111:4336505e4b1c 525 #define RTC_MODE2_INTENCLR_ALARM_Pos 0 /**< \brief (RTC_MODE2_INTENCLR) Alarm x Interrupt Enable */
Kojto 111:4336505e4b1c 526 #define RTC_MODE2_INTENCLR_ALARM_Msk (0x1ul << RTC_MODE2_INTENCLR_ALARM_Pos)
Kojto 111:4336505e4b1c 527 #define RTC_MODE2_INTENCLR_ALARM(value) ((RTC_MODE2_INTENCLR_ALARM_Msk & ((value) << RTC_MODE2_INTENCLR_ALARM_Pos)))
Kojto 111:4336505e4b1c 528 #define RTC_MODE2_INTENCLR_SYNCRDY_Pos 6 /**< \brief (RTC_MODE2_INTENCLR) Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 529 #define RTC_MODE2_INTENCLR_SYNCRDY (0x1ul << RTC_MODE2_INTENCLR_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 530 #define RTC_MODE2_INTENCLR_OVF_Pos 7 /**< \brief (RTC_MODE2_INTENCLR) Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 531 #define RTC_MODE2_INTENCLR_OVF (0x1ul << RTC_MODE2_INTENCLR_OVF_Pos)
Kojto 111:4336505e4b1c 532 #define RTC_MODE2_INTENCLR_MASK 0xC1ul /**< \brief (RTC_MODE2_INTENCLR) MASK Register */
Kojto 111:4336505e4b1c 533
Kojto 111:4336505e4b1c 534 /* -------- RTC_MODE0_INTENSET : (RTC Offset: 0x07) (R/W 8) MODE0 MODE0 Interrupt Enable Set -------- */
Kojto 111:4336505e4b1c 535 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 536 typedef union {
Kojto 111:4336505e4b1c 537 struct {
Kojto 111:4336505e4b1c 538 uint8_t CMP0:1; /*!< bit: 0 Compare 0 Interrupt Enable */
Kojto 111:4336505e4b1c 539 uint8_t :5; /*!< bit: 1.. 5 Reserved */
Kojto 111:4336505e4b1c 540 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 541 uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 542 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 543 struct {
Kojto 111:4336505e4b1c 544 uint8_t CMP:1; /*!< bit: 0 Compare x Interrupt Enable */
Kojto 111:4336505e4b1c 545 uint8_t :7; /*!< bit: 1.. 7 Reserved */
Kojto 111:4336505e4b1c 546 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 547 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 548 } RTC_MODE0_INTENSET_Type;
Kojto 111:4336505e4b1c 549 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 550
Kojto 111:4336505e4b1c 551 #define RTC_MODE0_INTENSET_OFFSET 0x07 /**< \brief (RTC_MODE0_INTENSET offset) MODE0 Interrupt Enable Set */
Kojto 111:4336505e4b1c 552 #define RTC_MODE0_INTENSET_RESETVALUE 0x00ul /**< \brief (RTC_MODE0_INTENSET reset_value) MODE0 Interrupt Enable Set */
Kojto 111:4336505e4b1c 553
Kojto 111:4336505e4b1c 554 #define RTC_MODE0_INTENSET_CMP0_Pos 0 /**< \brief (RTC_MODE0_INTENSET) Compare 0 Interrupt Enable */
Kojto 111:4336505e4b1c 555 #define RTC_MODE0_INTENSET_CMP0 (1 << RTC_MODE0_INTENSET_CMP0_Pos)
Kojto 111:4336505e4b1c 556 #define RTC_MODE0_INTENSET_CMP_Pos 0 /**< \brief (RTC_MODE0_INTENSET) Compare x Interrupt Enable */
Kojto 111:4336505e4b1c 557 #define RTC_MODE0_INTENSET_CMP_Msk (0x1ul << RTC_MODE0_INTENSET_CMP_Pos)
Kojto 111:4336505e4b1c 558 #define RTC_MODE0_INTENSET_CMP(value) ((RTC_MODE0_INTENSET_CMP_Msk & ((value) << RTC_MODE0_INTENSET_CMP_Pos)))
Kojto 111:4336505e4b1c 559 #define RTC_MODE0_INTENSET_SYNCRDY_Pos 6 /**< \brief (RTC_MODE0_INTENSET) Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 560 #define RTC_MODE0_INTENSET_SYNCRDY (0x1ul << RTC_MODE0_INTENSET_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 561 #define RTC_MODE0_INTENSET_OVF_Pos 7 /**< \brief (RTC_MODE0_INTENSET) Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 562 #define RTC_MODE0_INTENSET_OVF (0x1ul << RTC_MODE0_INTENSET_OVF_Pos)
Kojto 111:4336505e4b1c 563 #define RTC_MODE0_INTENSET_MASK 0xC1ul /**< \brief (RTC_MODE0_INTENSET) MASK Register */
Kojto 111:4336505e4b1c 564
Kojto 111:4336505e4b1c 565 /* -------- RTC_MODE1_INTENSET : (RTC Offset: 0x07) (R/W 8) MODE1 MODE1 Interrupt Enable Set -------- */
Kojto 111:4336505e4b1c 566 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 567 typedef union {
Kojto 111:4336505e4b1c 568 struct {
Kojto 111:4336505e4b1c 569 uint8_t CMP0:1; /*!< bit: 0 Compare 0 Interrupt Enable */
Kojto 111:4336505e4b1c 570 uint8_t CMP1:1; /*!< bit: 1 Compare 1 Interrupt Enable */
Kojto 111:4336505e4b1c 571 uint8_t :4; /*!< bit: 2.. 5 Reserved */
Kojto 111:4336505e4b1c 572 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 573 uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 574 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 575 struct {
Kojto 111:4336505e4b1c 576 uint8_t CMP:2; /*!< bit: 0.. 1 Compare x Interrupt Enable */
Kojto 111:4336505e4b1c 577 uint8_t :6; /*!< bit: 2.. 7 Reserved */
Kojto 111:4336505e4b1c 578 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 579 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 580 } RTC_MODE1_INTENSET_Type;
Kojto 111:4336505e4b1c 581 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 582
Kojto 111:4336505e4b1c 583 #define RTC_MODE1_INTENSET_OFFSET 0x07 /**< \brief (RTC_MODE1_INTENSET offset) MODE1 Interrupt Enable Set */
Kojto 111:4336505e4b1c 584 #define RTC_MODE1_INTENSET_RESETVALUE 0x00ul /**< \brief (RTC_MODE1_INTENSET reset_value) MODE1 Interrupt Enable Set */
Kojto 111:4336505e4b1c 585
Kojto 111:4336505e4b1c 586 #define RTC_MODE1_INTENSET_CMP0_Pos 0 /**< \brief (RTC_MODE1_INTENSET) Compare 0 Interrupt Enable */
Kojto 111:4336505e4b1c 587 #define RTC_MODE1_INTENSET_CMP0 (1 << RTC_MODE1_INTENSET_CMP0_Pos)
Kojto 111:4336505e4b1c 588 #define RTC_MODE1_INTENSET_CMP1_Pos 1 /**< \brief (RTC_MODE1_INTENSET) Compare 1 Interrupt Enable */
Kojto 111:4336505e4b1c 589 #define RTC_MODE1_INTENSET_CMP1 (1 << RTC_MODE1_INTENSET_CMP1_Pos)
Kojto 111:4336505e4b1c 590 #define RTC_MODE1_INTENSET_CMP_Pos 0 /**< \brief (RTC_MODE1_INTENSET) Compare x Interrupt Enable */
Kojto 111:4336505e4b1c 591 #define RTC_MODE1_INTENSET_CMP_Msk (0x3ul << RTC_MODE1_INTENSET_CMP_Pos)
Kojto 111:4336505e4b1c 592 #define RTC_MODE1_INTENSET_CMP(value) ((RTC_MODE1_INTENSET_CMP_Msk & ((value) << RTC_MODE1_INTENSET_CMP_Pos)))
Kojto 111:4336505e4b1c 593 #define RTC_MODE1_INTENSET_SYNCRDY_Pos 6 /**< \brief (RTC_MODE1_INTENSET) Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 594 #define RTC_MODE1_INTENSET_SYNCRDY (0x1ul << RTC_MODE1_INTENSET_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 595 #define RTC_MODE1_INTENSET_OVF_Pos 7 /**< \brief (RTC_MODE1_INTENSET) Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 596 #define RTC_MODE1_INTENSET_OVF (0x1ul << RTC_MODE1_INTENSET_OVF_Pos)
Kojto 111:4336505e4b1c 597 #define RTC_MODE1_INTENSET_MASK 0xC3ul /**< \brief (RTC_MODE1_INTENSET) MASK Register */
Kojto 111:4336505e4b1c 598
Kojto 111:4336505e4b1c 599 /* -------- RTC_MODE2_INTENSET : (RTC Offset: 0x07) (R/W 8) MODE2 MODE2 Interrupt Enable Set -------- */
Kojto 111:4336505e4b1c 600 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 601 typedef union {
Kojto 111:4336505e4b1c 602 struct {
Kojto 111:4336505e4b1c 603 uint8_t ALARM0:1; /*!< bit: 0 Alarm 0 Interrupt Enable */
Kojto 111:4336505e4b1c 604 uint8_t :5; /*!< bit: 1.. 5 Reserved */
Kojto 111:4336505e4b1c 605 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 606 uint8_t OVF:1; /*!< bit: 7 Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 607 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 608 struct {
Kojto 111:4336505e4b1c 609 uint8_t ALARM:1; /*!< bit: 0 Alarm x Interrupt Enable */
Kojto 111:4336505e4b1c 610 uint8_t :7; /*!< bit: 1.. 7 Reserved */
Kojto 111:4336505e4b1c 611 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 612 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 613 } RTC_MODE2_INTENSET_Type;
Kojto 111:4336505e4b1c 614 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 615
Kojto 111:4336505e4b1c 616 #define RTC_MODE2_INTENSET_OFFSET 0x07 /**< \brief (RTC_MODE2_INTENSET offset) MODE2 Interrupt Enable Set */
Kojto 111:4336505e4b1c 617 #define RTC_MODE2_INTENSET_RESETVALUE 0x00ul /**< \brief (RTC_MODE2_INTENSET reset_value) MODE2 Interrupt Enable Set */
Kojto 111:4336505e4b1c 618
Kojto 111:4336505e4b1c 619 #define RTC_MODE2_INTENSET_ALARM0_Pos 0 /**< \brief (RTC_MODE2_INTENSET) Alarm 0 Interrupt Enable */
Kojto 111:4336505e4b1c 620 #define RTC_MODE2_INTENSET_ALARM0 (1 << RTC_MODE2_INTENSET_ALARM0_Pos)
Kojto 111:4336505e4b1c 621 #define RTC_MODE2_INTENSET_ALARM_Pos 0 /**< \brief (RTC_MODE2_INTENSET) Alarm x Interrupt Enable */
Kojto 111:4336505e4b1c 622 #define RTC_MODE2_INTENSET_ALARM_Msk (0x1ul << RTC_MODE2_INTENSET_ALARM_Pos)
Kojto 111:4336505e4b1c 623 #define RTC_MODE2_INTENSET_ALARM(value) ((RTC_MODE2_INTENSET_ALARM_Msk & ((value) << RTC_MODE2_INTENSET_ALARM_Pos)))
Kojto 111:4336505e4b1c 624 #define RTC_MODE2_INTENSET_SYNCRDY_Pos 6 /**< \brief (RTC_MODE2_INTENSET) Synchronization Ready Interrupt Enable */
Kojto 111:4336505e4b1c 625 #define RTC_MODE2_INTENSET_SYNCRDY (0x1ul << RTC_MODE2_INTENSET_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 626 #define RTC_MODE2_INTENSET_OVF_Pos 7 /**< \brief (RTC_MODE2_INTENSET) Overflow Interrupt Enable */
Kojto 111:4336505e4b1c 627 #define RTC_MODE2_INTENSET_OVF (0x1ul << RTC_MODE2_INTENSET_OVF_Pos)
Kojto 111:4336505e4b1c 628 #define RTC_MODE2_INTENSET_MASK 0xC1ul /**< \brief (RTC_MODE2_INTENSET) MASK Register */
Kojto 111:4336505e4b1c 629
Kojto 111:4336505e4b1c 630 /* -------- RTC_MODE0_INTFLAG : (RTC Offset: 0x08) (R/W 8) MODE0 MODE0 Interrupt Flag Status and Clear -------- */
Kojto 111:4336505e4b1c 631 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 632 typedef union {
Kojto 111:4336505e4b1c 633 struct {
Kojto 111:4336505e4b1c 634 uint8_t CMP0:1; /*!< bit: 0 Compare 0 */
Kojto 111:4336505e4b1c 635 uint8_t :5; /*!< bit: 1.. 5 Reserved */
Kojto 111:4336505e4b1c 636 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready */
Kojto 111:4336505e4b1c 637 uint8_t OVF:1; /*!< bit: 7 Overflow */
Kojto 111:4336505e4b1c 638 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 639 struct {
Kojto 111:4336505e4b1c 640 uint8_t CMP:1; /*!< bit: 0 Compare x */
Kojto 111:4336505e4b1c 641 uint8_t :7; /*!< bit: 1.. 7 Reserved */
Kojto 111:4336505e4b1c 642 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 643 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 644 } RTC_MODE0_INTFLAG_Type;
Kojto 111:4336505e4b1c 645 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 646
Kojto 111:4336505e4b1c 647 #define RTC_MODE0_INTFLAG_OFFSET 0x08 /**< \brief (RTC_MODE0_INTFLAG offset) MODE0 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 648 #define RTC_MODE0_INTFLAG_RESETVALUE 0x00ul /**< \brief (RTC_MODE0_INTFLAG reset_value) MODE0 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 649
Kojto 111:4336505e4b1c 650 #define RTC_MODE0_INTFLAG_CMP0_Pos 0 /**< \brief (RTC_MODE0_INTFLAG) Compare 0 */
Kojto 111:4336505e4b1c 651 #define RTC_MODE0_INTFLAG_CMP0 (1 << RTC_MODE0_INTFLAG_CMP0_Pos)
Kojto 111:4336505e4b1c 652 #define RTC_MODE0_INTFLAG_CMP_Pos 0 /**< \brief (RTC_MODE0_INTFLAG) Compare x */
Kojto 111:4336505e4b1c 653 #define RTC_MODE0_INTFLAG_CMP_Msk (0x1ul << RTC_MODE0_INTFLAG_CMP_Pos)
Kojto 111:4336505e4b1c 654 #define RTC_MODE0_INTFLAG_CMP(value) ((RTC_MODE0_INTFLAG_CMP_Msk & ((value) << RTC_MODE0_INTFLAG_CMP_Pos)))
Kojto 111:4336505e4b1c 655 #define RTC_MODE0_INTFLAG_SYNCRDY_Pos 6 /**< \brief (RTC_MODE0_INTFLAG) Synchronization Ready */
Kojto 111:4336505e4b1c 656 #define RTC_MODE0_INTFLAG_SYNCRDY (0x1ul << RTC_MODE0_INTFLAG_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 657 #define RTC_MODE0_INTFLAG_OVF_Pos 7 /**< \brief (RTC_MODE0_INTFLAG) Overflow */
Kojto 111:4336505e4b1c 658 #define RTC_MODE0_INTFLAG_OVF (0x1ul << RTC_MODE0_INTFLAG_OVF_Pos)
Kojto 111:4336505e4b1c 659 #define RTC_MODE0_INTFLAG_MASK 0xC1ul /**< \brief (RTC_MODE0_INTFLAG) MASK Register */
Kojto 111:4336505e4b1c 660
Kojto 111:4336505e4b1c 661 /* -------- RTC_MODE1_INTFLAG : (RTC Offset: 0x08) (R/W 8) MODE1 MODE1 Interrupt Flag Status and Clear -------- */
Kojto 111:4336505e4b1c 662 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 663 typedef union {
Kojto 111:4336505e4b1c 664 struct {
Kojto 111:4336505e4b1c 665 uint8_t CMP0:1; /*!< bit: 0 Compare 0 */
Kojto 111:4336505e4b1c 666 uint8_t CMP1:1; /*!< bit: 1 Compare 1 */
Kojto 111:4336505e4b1c 667 uint8_t :4; /*!< bit: 2.. 5 Reserved */
Kojto 111:4336505e4b1c 668 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready */
Kojto 111:4336505e4b1c 669 uint8_t OVF:1; /*!< bit: 7 Overflow */
Kojto 111:4336505e4b1c 670 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 671 struct {
Kojto 111:4336505e4b1c 672 uint8_t CMP:2; /*!< bit: 0.. 1 Compare x */
Kojto 111:4336505e4b1c 673 uint8_t :6; /*!< bit: 2.. 7 Reserved */
Kojto 111:4336505e4b1c 674 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 675 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 676 } RTC_MODE1_INTFLAG_Type;
Kojto 111:4336505e4b1c 677 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 678
Kojto 111:4336505e4b1c 679 #define RTC_MODE1_INTFLAG_OFFSET 0x08 /**< \brief (RTC_MODE1_INTFLAG offset) MODE1 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 680 #define RTC_MODE1_INTFLAG_RESETVALUE 0x00ul /**< \brief (RTC_MODE1_INTFLAG reset_value) MODE1 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 681
Kojto 111:4336505e4b1c 682 #define RTC_MODE1_INTFLAG_CMP0_Pos 0 /**< \brief (RTC_MODE1_INTFLAG) Compare 0 */
Kojto 111:4336505e4b1c 683 #define RTC_MODE1_INTFLAG_CMP0 (1 << RTC_MODE1_INTFLAG_CMP0_Pos)
Kojto 111:4336505e4b1c 684 #define RTC_MODE1_INTFLAG_CMP1_Pos 1 /**< \brief (RTC_MODE1_INTFLAG) Compare 1 */
Kojto 111:4336505e4b1c 685 #define RTC_MODE1_INTFLAG_CMP1 (1 << RTC_MODE1_INTFLAG_CMP1_Pos)
Kojto 111:4336505e4b1c 686 #define RTC_MODE1_INTFLAG_CMP_Pos 0 /**< \brief (RTC_MODE1_INTFLAG) Compare x */
Kojto 111:4336505e4b1c 687 #define RTC_MODE1_INTFLAG_CMP_Msk (0x3ul << RTC_MODE1_INTFLAG_CMP_Pos)
Kojto 111:4336505e4b1c 688 #define RTC_MODE1_INTFLAG_CMP(value) ((RTC_MODE1_INTFLAG_CMP_Msk & ((value) << RTC_MODE1_INTFLAG_CMP_Pos)))
Kojto 111:4336505e4b1c 689 #define RTC_MODE1_INTFLAG_SYNCRDY_Pos 6 /**< \brief (RTC_MODE1_INTFLAG) Synchronization Ready */
Kojto 111:4336505e4b1c 690 #define RTC_MODE1_INTFLAG_SYNCRDY (0x1ul << RTC_MODE1_INTFLAG_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 691 #define RTC_MODE1_INTFLAG_OVF_Pos 7 /**< \brief (RTC_MODE1_INTFLAG) Overflow */
Kojto 111:4336505e4b1c 692 #define RTC_MODE1_INTFLAG_OVF (0x1ul << RTC_MODE1_INTFLAG_OVF_Pos)
Kojto 111:4336505e4b1c 693 #define RTC_MODE1_INTFLAG_MASK 0xC3ul /**< \brief (RTC_MODE1_INTFLAG) MASK Register */
Kojto 111:4336505e4b1c 694
Kojto 111:4336505e4b1c 695 /* -------- RTC_MODE2_INTFLAG : (RTC Offset: 0x08) (R/W 8) MODE2 MODE2 Interrupt Flag Status and Clear -------- */
Kojto 111:4336505e4b1c 696 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 697 typedef union {
Kojto 111:4336505e4b1c 698 struct {
Kojto 111:4336505e4b1c 699 uint8_t ALARM0:1; /*!< bit: 0 Alarm 0 */
Kojto 111:4336505e4b1c 700 uint8_t :5; /*!< bit: 1.. 5 Reserved */
Kojto 111:4336505e4b1c 701 uint8_t SYNCRDY:1; /*!< bit: 6 Synchronization Ready */
Kojto 111:4336505e4b1c 702 uint8_t OVF:1; /*!< bit: 7 Overflow */
Kojto 111:4336505e4b1c 703 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 704 struct {
Kojto 111:4336505e4b1c 705 uint8_t ALARM:1; /*!< bit: 0 Alarm x */
Kojto 111:4336505e4b1c 706 uint8_t :7; /*!< bit: 1.. 7 Reserved */
Kojto 111:4336505e4b1c 707 } vec; /*!< Structure used for vec access */
Kojto 111:4336505e4b1c 708 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 709 } RTC_MODE2_INTFLAG_Type;
Kojto 111:4336505e4b1c 710 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 711
Kojto 111:4336505e4b1c 712 #define RTC_MODE2_INTFLAG_OFFSET 0x08 /**< \brief (RTC_MODE2_INTFLAG offset) MODE2 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 713 #define RTC_MODE2_INTFLAG_RESETVALUE 0x00ul /**< \brief (RTC_MODE2_INTFLAG reset_value) MODE2 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 714
Kojto 111:4336505e4b1c 715 #define RTC_MODE2_INTFLAG_ALARM0_Pos 0 /**< \brief (RTC_MODE2_INTFLAG) Alarm 0 */
Kojto 111:4336505e4b1c 716 #define RTC_MODE2_INTFLAG_ALARM0 (1 << RTC_MODE2_INTFLAG_ALARM0_Pos)
Kojto 111:4336505e4b1c 717 #define RTC_MODE2_INTFLAG_ALARM_Pos 0 /**< \brief (RTC_MODE2_INTFLAG) Alarm x */
Kojto 111:4336505e4b1c 718 #define RTC_MODE2_INTFLAG_ALARM_Msk (0x1ul << RTC_MODE2_INTFLAG_ALARM_Pos)
Kojto 111:4336505e4b1c 719 #define RTC_MODE2_INTFLAG_ALARM(value) ((RTC_MODE2_INTFLAG_ALARM_Msk & ((value) << RTC_MODE2_INTFLAG_ALARM_Pos)))
Kojto 111:4336505e4b1c 720 #define RTC_MODE2_INTFLAG_SYNCRDY_Pos 6 /**< \brief (RTC_MODE2_INTFLAG) Synchronization Ready */
Kojto 111:4336505e4b1c 721 #define RTC_MODE2_INTFLAG_SYNCRDY (0x1ul << RTC_MODE2_INTFLAG_SYNCRDY_Pos)
Kojto 111:4336505e4b1c 722 #define RTC_MODE2_INTFLAG_OVF_Pos 7 /**< \brief (RTC_MODE2_INTFLAG) Overflow */
Kojto 111:4336505e4b1c 723 #define RTC_MODE2_INTFLAG_OVF (0x1ul << RTC_MODE2_INTFLAG_OVF_Pos)
Kojto 111:4336505e4b1c 724 #define RTC_MODE2_INTFLAG_MASK 0xC1ul /**< \brief (RTC_MODE2_INTFLAG) MASK Register */
Kojto 111:4336505e4b1c 725
Kojto 111:4336505e4b1c 726 /* -------- RTC_STATUS : (RTC Offset: 0x0A) (R/W 8) Status -------- */
Kojto 111:4336505e4b1c 727 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 728 typedef union {
Kojto 111:4336505e4b1c 729 struct {
Kojto 111:4336505e4b1c 730 uint8_t :7; /*!< bit: 0.. 6 Reserved */
Kojto 111:4336505e4b1c 731 uint8_t SYNCBUSY:1; /*!< bit: 7 Synchronization Busy */
Kojto 111:4336505e4b1c 732 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 733 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 734 } RTC_STATUS_Type;
Kojto 111:4336505e4b1c 735 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 736
Kojto 111:4336505e4b1c 737 #define RTC_STATUS_OFFSET 0x0A /**< \brief (RTC_STATUS offset) Status */
Kojto 111:4336505e4b1c 738 #define RTC_STATUS_RESETVALUE 0x00ul /**< \brief (RTC_STATUS reset_value) Status */
Kojto 111:4336505e4b1c 739
Kojto 111:4336505e4b1c 740 #define RTC_STATUS_SYNCBUSY_Pos 7 /**< \brief (RTC_STATUS) Synchronization Busy */
Kojto 111:4336505e4b1c 741 #define RTC_STATUS_SYNCBUSY (0x1ul << RTC_STATUS_SYNCBUSY_Pos)
Kojto 111:4336505e4b1c 742 #define RTC_STATUS_MASK 0x80ul /**< \brief (RTC_STATUS) MASK Register */
Kojto 111:4336505e4b1c 743
Kojto 111:4336505e4b1c 744 /* -------- RTC_DBGCTRL : (RTC Offset: 0x0B) (R/W 8) Debug Control -------- */
Kojto 111:4336505e4b1c 745 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 746 typedef union {
Kojto 111:4336505e4b1c 747 struct {
Kojto 111:4336505e4b1c 748 uint8_t DBGRUN:1; /*!< bit: 0 Run During Debug */
Kojto 111:4336505e4b1c 749 uint8_t :7; /*!< bit: 1.. 7 Reserved */
Kojto 111:4336505e4b1c 750 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 751 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 752 } RTC_DBGCTRL_Type;
Kojto 111:4336505e4b1c 753 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 754
Kojto 111:4336505e4b1c 755 #define RTC_DBGCTRL_OFFSET 0x0B /**< \brief (RTC_DBGCTRL offset) Debug Control */
Kojto 111:4336505e4b1c 756 #define RTC_DBGCTRL_RESETVALUE 0x00ul /**< \brief (RTC_DBGCTRL reset_value) Debug Control */
Kojto 111:4336505e4b1c 757
Kojto 111:4336505e4b1c 758 #define RTC_DBGCTRL_DBGRUN_Pos 0 /**< \brief (RTC_DBGCTRL) Run During Debug */
Kojto 111:4336505e4b1c 759 #define RTC_DBGCTRL_DBGRUN (0x1ul << RTC_DBGCTRL_DBGRUN_Pos)
Kojto 111:4336505e4b1c 760 #define RTC_DBGCTRL_MASK 0x01ul /**< \brief (RTC_DBGCTRL) MASK Register */
Kojto 111:4336505e4b1c 761
Kojto 111:4336505e4b1c 762 /* -------- RTC_FREQCORR : (RTC Offset: 0x0C) (R/W 8) Frequency Correction -------- */
Kojto 111:4336505e4b1c 763 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 764 typedef union {
Kojto 111:4336505e4b1c 765 struct {
Kojto 111:4336505e4b1c 766 uint8_t VALUE:7; /*!< bit: 0.. 6 Correction Value */
Kojto 111:4336505e4b1c 767 uint8_t SIGN:1; /*!< bit: 7 Correction Sign */
Kojto 111:4336505e4b1c 768 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 769 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 770 } RTC_FREQCORR_Type;
Kojto 111:4336505e4b1c 771 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 772
Kojto 111:4336505e4b1c 773 #define RTC_FREQCORR_OFFSET 0x0C /**< \brief (RTC_FREQCORR offset) Frequency Correction */
Kojto 111:4336505e4b1c 774 #define RTC_FREQCORR_RESETVALUE 0x00ul /**< \brief (RTC_FREQCORR reset_value) Frequency Correction */
Kojto 111:4336505e4b1c 775
Kojto 111:4336505e4b1c 776 #define RTC_FREQCORR_VALUE_Pos 0 /**< \brief (RTC_FREQCORR) Correction Value */
Kojto 111:4336505e4b1c 777 #define RTC_FREQCORR_VALUE_Msk (0x7Ful << RTC_FREQCORR_VALUE_Pos)
Kojto 111:4336505e4b1c 778 #define RTC_FREQCORR_VALUE(value) ((RTC_FREQCORR_VALUE_Msk & ((value) << RTC_FREQCORR_VALUE_Pos)))
Kojto 111:4336505e4b1c 779 #define RTC_FREQCORR_SIGN_Pos 7 /**< \brief (RTC_FREQCORR) Correction Sign */
Kojto 111:4336505e4b1c 780 #define RTC_FREQCORR_SIGN (0x1ul << RTC_FREQCORR_SIGN_Pos)
Kojto 111:4336505e4b1c 781 #define RTC_FREQCORR_MASK 0xFFul /**< \brief (RTC_FREQCORR) MASK Register */
Kojto 111:4336505e4b1c 782
Kojto 111:4336505e4b1c 783 /* -------- RTC_MODE0_COUNT : (RTC Offset: 0x10) (R/W 32) MODE0 MODE0 Counter Value -------- */
Kojto 111:4336505e4b1c 784 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 785 typedef union {
Kojto 111:4336505e4b1c 786 struct {
Kojto 111:4336505e4b1c 787 uint32_t COUNT:32; /*!< bit: 0..31 Counter Value */
Kojto 111:4336505e4b1c 788 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 789 uint32_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 790 } RTC_MODE0_COUNT_Type;
Kojto 111:4336505e4b1c 791 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 792
Kojto 111:4336505e4b1c 793 #define RTC_MODE0_COUNT_OFFSET 0x10 /**< \brief (RTC_MODE0_COUNT offset) MODE0 Counter Value */
Kojto 111:4336505e4b1c 794 #define RTC_MODE0_COUNT_RESETVALUE 0x00000000ul /**< \brief (RTC_MODE0_COUNT reset_value) MODE0 Counter Value */
Kojto 111:4336505e4b1c 795
Kojto 111:4336505e4b1c 796 #define RTC_MODE0_COUNT_COUNT_Pos 0 /**< \brief (RTC_MODE0_COUNT) Counter Value */
Kojto 111:4336505e4b1c 797 #define RTC_MODE0_COUNT_COUNT_Msk (0xFFFFFFFFul << RTC_MODE0_COUNT_COUNT_Pos)
Kojto 111:4336505e4b1c 798 #define RTC_MODE0_COUNT_COUNT(value) ((RTC_MODE0_COUNT_COUNT_Msk & ((value) << RTC_MODE0_COUNT_COUNT_Pos)))
Kojto 111:4336505e4b1c 799 #define RTC_MODE0_COUNT_MASK 0xFFFFFFFFul /**< \brief (RTC_MODE0_COUNT) MASK Register */
Kojto 111:4336505e4b1c 800
Kojto 111:4336505e4b1c 801 /* -------- RTC_MODE1_COUNT : (RTC Offset: 0x10) (R/W 16) MODE1 MODE1 Counter Value -------- */
Kojto 111:4336505e4b1c 802 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 803 typedef union {
Kojto 111:4336505e4b1c 804 struct {
Kojto 111:4336505e4b1c 805 uint16_t COUNT:16; /*!< bit: 0..15 Counter Value */
Kojto 111:4336505e4b1c 806 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 807 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 808 } RTC_MODE1_COUNT_Type;
Kojto 111:4336505e4b1c 809 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 810
Kojto 111:4336505e4b1c 811 #define RTC_MODE1_COUNT_OFFSET 0x10 /**< \brief (RTC_MODE1_COUNT offset) MODE1 Counter Value */
Kojto 111:4336505e4b1c 812 #define RTC_MODE1_COUNT_RESETVALUE 0x0000ul /**< \brief (RTC_MODE1_COUNT reset_value) MODE1 Counter Value */
Kojto 111:4336505e4b1c 813
Kojto 111:4336505e4b1c 814 #define RTC_MODE1_COUNT_COUNT_Pos 0 /**< \brief (RTC_MODE1_COUNT) Counter Value */
Kojto 111:4336505e4b1c 815 #define RTC_MODE1_COUNT_COUNT_Msk (0xFFFFul << RTC_MODE1_COUNT_COUNT_Pos)
Kojto 111:4336505e4b1c 816 #define RTC_MODE1_COUNT_COUNT(value) ((RTC_MODE1_COUNT_COUNT_Msk & ((value) << RTC_MODE1_COUNT_COUNT_Pos)))
Kojto 111:4336505e4b1c 817 #define RTC_MODE1_COUNT_MASK 0xFFFFul /**< \brief (RTC_MODE1_COUNT) MASK Register */
Kojto 111:4336505e4b1c 818
Kojto 111:4336505e4b1c 819 /* -------- RTC_MODE2_CLOCK : (RTC Offset: 0x10) (R/W 32) MODE2 MODE2 Clock Value -------- */
Kojto 111:4336505e4b1c 820 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 821 typedef union {
Kojto 111:4336505e4b1c 822 struct {
Kojto 111:4336505e4b1c 823 uint32_t SECOND:6; /*!< bit: 0.. 5 Second */
Kojto 111:4336505e4b1c 824 uint32_t MINUTE:6; /*!< bit: 6..11 Minute */
Kojto 111:4336505e4b1c 825 uint32_t HOUR:5; /*!< bit: 12..16 Hour */
Kojto 111:4336505e4b1c 826 uint32_t DAY:5; /*!< bit: 17..21 Day */
Kojto 111:4336505e4b1c 827 uint32_t MONTH:4; /*!< bit: 22..25 Month */
Kojto 111:4336505e4b1c 828 uint32_t YEAR:6; /*!< bit: 26..31 Year */
Kojto 111:4336505e4b1c 829 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 830 uint32_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 831 } RTC_MODE2_CLOCK_Type;
Kojto 111:4336505e4b1c 832 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 833
Kojto 111:4336505e4b1c 834 #define RTC_MODE2_CLOCK_OFFSET 0x10 /**< \brief (RTC_MODE2_CLOCK offset) MODE2 Clock Value */
Kojto 111:4336505e4b1c 835 #define RTC_MODE2_CLOCK_RESETVALUE 0x00000000ul /**< \brief (RTC_MODE2_CLOCK reset_value) MODE2 Clock Value */
Kojto 111:4336505e4b1c 836
Kojto 111:4336505e4b1c 837 #define RTC_MODE2_CLOCK_SECOND_Pos 0 /**< \brief (RTC_MODE2_CLOCK) Second */
Kojto 111:4336505e4b1c 838 #define RTC_MODE2_CLOCK_SECOND_Msk (0x3Ful << RTC_MODE2_CLOCK_SECOND_Pos)
Kojto 111:4336505e4b1c 839 #define RTC_MODE2_CLOCK_SECOND(value) ((RTC_MODE2_CLOCK_SECOND_Msk & ((value) << RTC_MODE2_CLOCK_SECOND_Pos)))
Kojto 111:4336505e4b1c 840 #define RTC_MODE2_CLOCK_MINUTE_Pos 6 /**< \brief (RTC_MODE2_CLOCK) Minute */
Kojto 111:4336505e4b1c 841 #define RTC_MODE2_CLOCK_MINUTE_Msk (0x3Ful << RTC_MODE2_CLOCK_MINUTE_Pos)
Kojto 111:4336505e4b1c 842 #define RTC_MODE2_CLOCK_MINUTE(value) ((RTC_MODE2_CLOCK_MINUTE_Msk & ((value) << RTC_MODE2_CLOCK_MINUTE_Pos)))
Kojto 111:4336505e4b1c 843 #define RTC_MODE2_CLOCK_HOUR_Pos 12 /**< \brief (RTC_MODE2_CLOCK) Hour */
Kojto 111:4336505e4b1c 844 #define RTC_MODE2_CLOCK_HOUR_Msk (0x1Ful << RTC_MODE2_CLOCK_HOUR_Pos)
Kojto 111:4336505e4b1c 845 #define RTC_MODE2_CLOCK_HOUR(value) ((RTC_MODE2_CLOCK_HOUR_Msk & ((value) << RTC_MODE2_CLOCK_HOUR_Pos)))
Kojto 111:4336505e4b1c 846 #define RTC_MODE2_CLOCK_HOUR_PM_Val 0x10ul /**< \brief (RTC_MODE2_CLOCK) Afternoon Hour */
Kojto 111:4336505e4b1c 847 #define RTC_MODE2_CLOCK_HOUR_PM (RTC_MODE2_CLOCK_HOUR_PM_Val << RTC_MODE2_CLOCK_HOUR_Pos)
Kojto 111:4336505e4b1c 848 #define RTC_MODE2_CLOCK_DAY_Pos 17 /**< \brief (RTC_MODE2_CLOCK) Day */
Kojto 111:4336505e4b1c 849 #define RTC_MODE2_CLOCK_DAY_Msk (0x1Ful << RTC_MODE2_CLOCK_DAY_Pos)
Kojto 111:4336505e4b1c 850 #define RTC_MODE2_CLOCK_DAY(value) ((RTC_MODE2_CLOCK_DAY_Msk & ((value) << RTC_MODE2_CLOCK_DAY_Pos)))
Kojto 111:4336505e4b1c 851 #define RTC_MODE2_CLOCK_MONTH_Pos 22 /**< \brief (RTC_MODE2_CLOCK) Month */
Kojto 111:4336505e4b1c 852 #define RTC_MODE2_CLOCK_MONTH_Msk (0xFul << RTC_MODE2_CLOCK_MONTH_Pos)
Kojto 111:4336505e4b1c 853 #define RTC_MODE2_CLOCK_MONTH(value) ((RTC_MODE2_CLOCK_MONTH_Msk & ((value) << RTC_MODE2_CLOCK_MONTH_Pos)))
Kojto 111:4336505e4b1c 854 #define RTC_MODE2_CLOCK_YEAR_Pos 26 /**< \brief (RTC_MODE2_CLOCK) Year */
Kojto 111:4336505e4b1c 855 #define RTC_MODE2_CLOCK_YEAR_Msk (0x3Ful << RTC_MODE2_CLOCK_YEAR_Pos)
Kojto 111:4336505e4b1c 856 #define RTC_MODE2_CLOCK_YEAR(value) ((RTC_MODE2_CLOCK_YEAR_Msk & ((value) << RTC_MODE2_CLOCK_YEAR_Pos)))
Kojto 111:4336505e4b1c 857 #define RTC_MODE2_CLOCK_MASK 0xFFFFFFFFul /**< \brief (RTC_MODE2_CLOCK) MASK Register */
Kojto 111:4336505e4b1c 858
Kojto 111:4336505e4b1c 859 /* -------- RTC_MODE1_PER : (RTC Offset: 0x14) (R/W 16) MODE1 MODE1 Counter Period -------- */
Kojto 111:4336505e4b1c 860 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 861 typedef union {
Kojto 111:4336505e4b1c 862 struct {
Kojto 111:4336505e4b1c 863 uint16_t PER:16; /*!< bit: 0..15 Counter Period */
Kojto 111:4336505e4b1c 864 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 865 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 866 } RTC_MODE1_PER_Type;
Kojto 111:4336505e4b1c 867 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 868
Kojto 111:4336505e4b1c 869 #define RTC_MODE1_PER_OFFSET 0x14 /**< \brief (RTC_MODE1_PER offset) MODE1 Counter Period */
Kojto 111:4336505e4b1c 870 #define RTC_MODE1_PER_RESETVALUE 0x0000ul /**< \brief (RTC_MODE1_PER reset_value) MODE1 Counter Period */
Kojto 111:4336505e4b1c 871
Kojto 111:4336505e4b1c 872 #define RTC_MODE1_PER_PER_Pos 0 /**< \brief (RTC_MODE1_PER) Counter Period */
Kojto 111:4336505e4b1c 873 #define RTC_MODE1_PER_PER_Msk (0xFFFFul << RTC_MODE1_PER_PER_Pos)
Kojto 111:4336505e4b1c 874 #define RTC_MODE1_PER_PER(value) ((RTC_MODE1_PER_PER_Msk & ((value) << RTC_MODE1_PER_PER_Pos)))
Kojto 111:4336505e4b1c 875 #define RTC_MODE1_PER_MASK 0xFFFFul /**< \brief (RTC_MODE1_PER) MASK Register */
Kojto 111:4336505e4b1c 876
Kojto 111:4336505e4b1c 877 /* -------- RTC_MODE0_COMP : (RTC Offset: 0x18) (R/W 32) MODE0 MODE0 Compare n Value -------- */
Kojto 111:4336505e4b1c 878 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 879 typedef union {
Kojto 111:4336505e4b1c 880 struct {
Kojto 111:4336505e4b1c 881 uint32_t COMP:32; /*!< bit: 0..31 Compare Value */
Kojto 111:4336505e4b1c 882 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 883 uint32_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 884 } RTC_MODE0_COMP_Type;
Kojto 111:4336505e4b1c 885 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 886
Kojto 111:4336505e4b1c 887 #define RTC_MODE0_COMP_OFFSET 0x18 /**< \brief (RTC_MODE0_COMP offset) MODE0 Compare n Value */
Kojto 111:4336505e4b1c 888 #define RTC_MODE0_COMP_RESETVALUE 0x00000000ul /**< \brief (RTC_MODE0_COMP reset_value) MODE0 Compare n Value */
Kojto 111:4336505e4b1c 889
Kojto 111:4336505e4b1c 890 #define RTC_MODE0_COMP_COMP_Pos 0 /**< \brief (RTC_MODE0_COMP) Compare Value */
Kojto 111:4336505e4b1c 891 #define RTC_MODE0_COMP_COMP_Msk (0xFFFFFFFFul << RTC_MODE0_COMP_COMP_Pos)
Kojto 111:4336505e4b1c 892 #define RTC_MODE0_COMP_COMP(value) ((RTC_MODE0_COMP_COMP_Msk & ((value) << RTC_MODE0_COMP_COMP_Pos)))
Kojto 111:4336505e4b1c 893 #define RTC_MODE0_COMP_MASK 0xFFFFFFFFul /**< \brief (RTC_MODE0_COMP) MASK Register */
Kojto 111:4336505e4b1c 894
Kojto 111:4336505e4b1c 895 /* -------- RTC_MODE1_COMP : (RTC Offset: 0x18) (R/W 16) MODE1 MODE1 Compare n Value -------- */
Kojto 111:4336505e4b1c 896 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 897 typedef union {
Kojto 111:4336505e4b1c 898 struct {
Kojto 111:4336505e4b1c 899 uint16_t COMP:16; /*!< bit: 0..15 Compare Value */
Kojto 111:4336505e4b1c 900 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 901 uint16_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 902 } RTC_MODE1_COMP_Type;
Kojto 111:4336505e4b1c 903 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 904
Kojto 111:4336505e4b1c 905 #define RTC_MODE1_COMP_OFFSET 0x18 /**< \brief (RTC_MODE1_COMP offset) MODE1 Compare n Value */
Kojto 111:4336505e4b1c 906 #define RTC_MODE1_COMP_RESETVALUE 0x0000ul /**< \brief (RTC_MODE1_COMP reset_value) MODE1 Compare n Value */
Kojto 111:4336505e4b1c 907
Kojto 111:4336505e4b1c 908 #define RTC_MODE1_COMP_COMP_Pos 0 /**< \brief (RTC_MODE1_COMP) Compare Value */
Kojto 111:4336505e4b1c 909 #define RTC_MODE1_COMP_COMP_Msk (0xFFFFul << RTC_MODE1_COMP_COMP_Pos)
Kojto 111:4336505e4b1c 910 #define RTC_MODE1_COMP_COMP(value) ((RTC_MODE1_COMP_COMP_Msk & ((value) << RTC_MODE1_COMP_COMP_Pos)))
Kojto 111:4336505e4b1c 911 #define RTC_MODE1_COMP_MASK 0xFFFFul /**< \brief (RTC_MODE1_COMP) MASK Register */
Kojto 111:4336505e4b1c 912
Kojto 111:4336505e4b1c 913 /* -------- RTC_MODE2_ALARM : (RTC Offset: 0x18) (R/W 32) MODE2 MODE2_ALARM Alarm n Value -------- */
Kojto 111:4336505e4b1c 914 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 915 typedef union {
Kojto 111:4336505e4b1c 916 struct {
Kojto 111:4336505e4b1c 917 uint32_t SECOND:6; /*!< bit: 0.. 5 Second */
Kojto 111:4336505e4b1c 918 uint32_t MINUTE:6; /*!< bit: 6..11 Minute */
Kojto 111:4336505e4b1c 919 uint32_t HOUR:5; /*!< bit: 12..16 Hour */
Kojto 111:4336505e4b1c 920 uint32_t DAY:5; /*!< bit: 17..21 Day */
Kojto 111:4336505e4b1c 921 uint32_t MONTH:4; /*!< bit: 22..25 Month */
Kojto 111:4336505e4b1c 922 uint32_t YEAR:6; /*!< bit: 26..31 Year */
Kojto 111:4336505e4b1c 923 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 924 uint32_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 925 } RTC_MODE2_ALARM_Type;
Kojto 111:4336505e4b1c 926 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 927
Kojto 111:4336505e4b1c 928 #define RTC_MODE2_ALARM_OFFSET 0x18 /**< \brief (RTC_MODE2_ALARM offset) MODE2_ALARM Alarm n Value */
Kojto 111:4336505e4b1c 929 #define RTC_MODE2_ALARM_RESETVALUE 0x00000000ul /**< \brief (RTC_MODE2_ALARM reset_value) MODE2_ALARM Alarm n Value */
Kojto 111:4336505e4b1c 930
Kojto 111:4336505e4b1c 931 #define RTC_MODE2_ALARM_SECOND_Pos 0 /**< \brief (RTC_MODE2_ALARM) Second */
Kojto 111:4336505e4b1c 932 #define RTC_MODE2_ALARM_SECOND_Msk (0x3Ful << RTC_MODE2_ALARM_SECOND_Pos)
Kojto 111:4336505e4b1c 933 #define RTC_MODE2_ALARM_SECOND(value) ((RTC_MODE2_ALARM_SECOND_Msk & ((value) << RTC_MODE2_ALARM_SECOND_Pos)))
Kojto 111:4336505e4b1c 934 #define RTC_MODE2_ALARM_MINUTE_Pos 6 /**< \brief (RTC_MODE2_ALARM) Minute */
Kojto 111:4336505e4b1c 935 #define RTC_MODE2_ALARM_MINUTE_Msk (0x3Ful << RTC_MODE2_ALARM_MINUTE_Pos)
Kojto 111:4336505e4b1c 936 #define RTC_MODE2_ALARM_MINUTE(value) ((RTC_MODE2_ALARM_MINUTE_Msk & ((value) << RTC_MODE2_ALARM_MINUTE_Pos)))
Kojto 111:4336505e4b1c 937 #define RTC_MODE2_ALARM_HOUR_Pos 12 /**< \brief (RTC_MODE2_ALARM) Hour */
Kojto 111:4336505e4b1c 938 #define RTC_MODE2_ALARM_HOUR_Msk (0x1Ful << RTC_MODE2_ALARM_HOUR_Pos)
Kojto 111:4336505e4b1c 939 #define RTC_MODE2_ALARM_HOUR(value) ((RTC_MODE2_ALARM_HOUR_Msk & ((value) << RTC_MODE2_ALARM_HOUR_Pos)))
Kojto 111:4336505e4b1c 940 #define RTC_MODE2_ALARM_DAY_Pos 17 /**< \brief (RTC_MODE2_ALARM) Day */
Kojto 111:4336505e4b1c 941 #define RTC_MODE2_ALARM_DAY_Msk (0x1Ful << RTC_MODE2_ALARM_DAY_Pos)
Kojto 111:4336505e4b1c 942 #define RTC_MODE2_ALARM_DAY(value) ((RTC_MODE2_ALARM_DAY_Msk & ((value) << RTC_MODE2_ALARM_DAY_Pos)))
Kojto 111:4336505e4b1c 943 #define RTC_MODE2_ALARM_MONTH_Pos 22 /**< \brief (RTC_MODE2_ALARM) Month */
Kojto 111:4336505e4b1c 944 #define RTC_MODE2_ALARM_MONTH_Msk (0xFul << RTC_MODE2_ALARM_MONTH_Pos)
Kojto 111:4336505e4b1c 945 #define RTC_MODE2_ALARM_MONTH(value) ((RTC_MODE2_ALARM_MONTH_Msk & ((value) << RTC_MODE2_ALARM_MONTH_Pos)))
Kojto 111:4336505e4b1c 946 #define RTC_MODE2_ALARM_YEAR_Pos 26 /**< \brief (RTC_MODE2_ALARM) Year */
Kojto 111:4336505e4b1c 947 #define RTC_MODE2_ALARM_YEAR_Msk (0x3Ful << RTC_MODE2_ALARM_YEAR_Pos)
Kojto 111:4336505e4b1c 948 #define RTC_MODE2_ALARM_YEAR(value) ((RTC_MODE2_ALARM_YEAR_Msk & ((value) << RTC_MODE2_ALARM_YEAR_Pos)))
Kojto 111:4336505e4b1c 949 #define RTC_MODE2_ALARM_MASK 0xFFFFFFFFul /**< \brief (RTC_MODE2_ALARM) MASK Register */
Kojto 111:4336505e4b1c 950
Kojto 111:4336505e4b1c 951 /* -------- RTC_MODE2_MASK : (RTC Offset: 0x1C) (R/W 8) MODE2 MODE2_ALARM Alarm n Mask -------- */
Kojto 111:4336505e4b1c 952 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 953 typedef union {
Kojto 111:4336505e4b1c 954 struct {
Kojto 111:4336505e4b1c 955 uint8_t SEL:3; /*!< bit: 0.. 2 Alarm Mask Selection */
Kojto 111:4336505e4b1c 956 uint8_t :5; /*!< bit: 3.. 7 Reserved */
Kojto 111:4336505e4b1c 957 } bit; /*!< Structure used for bit access */
Kojto 111:4336505e4b1c 958 uint8_t reg; /*!< Type used for register access */
Kojto 111:4336505e4b1c 959 } RTC_MODE2_MASK_Type;
Kojto 111:4336505e4b1c 960 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 961
Kojto 111:4336505e4b1c 962 #define RTC_MODE2_MASK_OFFSET 0x1C /**< \brief (RTC_MODE2_MASK offset) MODE2_ALARM Alarm n Mask */
Kojto 111:4336505e4b1c 963 #define RTC_MODE2_MASK_RESETVALUE 0x00ul /**< \brief (RTC_MODE2_MASK reset_value) MODE2_ALARM Alarm n Mask */
Kojto 111:4336505e4b1c 964
Kojto 111:4336505e4b1c 965 #define RTC_MODE2_MASK_SEL_Pos 0 /**< \brief (RTC_MODE2_MASK) Alarm Mask Selection */
Kojto 111:4336505e4b1c 966 #define RTC_MODE2_MASK_SEL_Msk (0x7ul << RTC_MODE2_MASK_SEL_Pos)
Kojto 111:4336505e4b1c 967 #define RTC_MODE2_MASK_SEL(value) ((RTC_MODE2_MASK_SEL_Msk & ((value) << RTC_MODE2_MASK_SEL_Pos)))
Kojto 111:4336505e4b1c 968 #define RTC_MODE2_MASK_SEL_OFF_Val 0x0ul /**< \brief (RTC_MODE2_MASK) Alarm Disabled */
Kojto 111:4336505e4b1c 969 #define RTC_MODE2_MASK_SEL_SS_Val 0x1ul /**< \brief (RTC_MODE2_MASK) Match seconds only */
Kojto 111:4336505e4b1c 970 #define RTC_MODE2_MASK_SEL_MMSS_Val 0x2ul /**< \brief (RTC_MODE2_MASK) Match seconds and minutes only */
Kojto 111:4336505e4b1c 971 #define RTC_MODE2_MASK_SEL_HHMMSS_Val 0x3ul /**< \brief (RTC_MODE2_MASK) Match seconds, minutes, and hours only */
Kojto 111:4336505e4b1c 972 #define RTC_MODE2_MASK_SEL_DDHHMMSS_Val 0x4ul /**< \brief (RTC_MODE2_MASK) Match seconds, minutes, hours, and days only */
Kojto 111:4336505e4b1c 973 #define RTC_MODE2_MASK_SEL_MMDDHHMMSS_Val 0x5ul /**< \brief (RTC_MODE2_MASK) Match seconds, minutes, hours, days, and months only */
Kojto 111:4336505e4b1c 974 #define RTC_MODE2_MASK_SEL_YYMMDDHHMMSS_Val 0x6ul /**< \brief (RTC_MODE2_MASK) Match seconds, minutes, hours, days, months, and years */
Kojto 111:4336505e4b1c 975 #define RTC_MODE2_MASK_SEL_OFF (RTC_MODE2_MASK_SEL_OFF_Val << RTC_MODE2_MASK_SEL_Pos)
Kojto 111:4336505e4b1c 976 #define RTC_MODE2_MASK_SEL_SS (RTC_MODE2_MASK_SEL_SS_Val << RTC_MODE2_MASK_SEL_Pos)
Kojto 111:4336505e4b1c 977 #define RTC_MODE2_MASK_SEL_MMSS (RTC_MODE2_MASK_SEL_MMSS_Val << RTC_MODE2_MASK_SEL_Pos)
Kojto 111:4336505e4b1c 978 #define RTC_MODE2_MASK_SEL_HHMMSS (RTC_MODE2_MASK_SEL_HHMMSS_Val << RTC_MODE2_MASK_SEL_Pos)
Kojto 111:4336505e4b1c 979 #define RTC_MODE2_MASK_SEL_DDHHMMSS (RTC_MODE2_MASK_SEL_DDHHMMSS_Val << RTC_MODE2_MASK_SEL_Pos)
Kojto 111:4336505e4b1c 980 #define RTC_MODE2_MASK_SEL_MMDDHHMMSS (RTC_MODE2_MASK_SEL_MMDDHHMMSS_Val << RTC_MODE2_MASK_SEL_Pos)
Kojto 111:4336505e4b1c 981 #define RTC_MODE2_MASK_SEL_YYMMDDHHMMSS (RTC_MODE2_MASK_SEL_YYMMDDHHMMSS_Val << RTC_MODE2_MASK_SEL_Pos)
Kojto 111:4336505e4b1c 982 #define RTC_MODE2_MASK_MASK 0x07ul /**< \brief (RTC_MODE2_MASK) MASK Register */
Kojto 111:4336505e4b1c 983
Kojto 111:4336505e4b1c 984 /** \brief RtcMode2Alarm hardware registers */
Kojto 111:4336505e4b1c 985 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 986 typedef struct {
Kojto 111:4336505e4b1c 987 __IO RTC_MODE2_ALARM_Type ALARM; /**< \brief Offset: 0x00 (R/W 32) MODE2_ALARM Alarm n Value */
Kojto 111:4336505e4b1c 988 __IO RTC_MODE2_MASK_Type MASK; /**< \brief Offset: 0x04 (R/W 8) MODE2_ALARM Alarm n Mask */
Kojto 111:4336505e4b1c 989 RoReg8 Reserved1[0x3];
Kojto 111:4336505e4b1c 990 } RtcMode2Alarm;
Kojto 111:4336505e4b1c 991 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 992
Kojto 111:4336505e4b1c 993 /** \brief RTC_MODE0 hardware registers */
Kojto 111:4336505e4b1c 994 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 995 typedef struct { /* 32-bit Counter with Single 32-bit Compare */
Kojto 111:4336505e4b1c 996 __IO RTC_MODE0_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 16) MODE0 Control */
Kojto 111:4336505e4b1c 997 __IO RTC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request */
Kojto 111:4336505e4b1c 998 __IO RTC_MODE0_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x04 (R/W 16) MODE0 Event Control */
Kojto 111:4336505e4b1c 999 __IO RTC_MODE0_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x06 (R/W 8) MODE0 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 1000 __IO RTC_MODE0_INTENSET_Type INTENSET; /**< \brief Offset: 0x07 (R/W 8) MODE0 Interrupt Enable Set */
Kojto 111:4336505e4b1c 1001 __IO RTC_MODE0_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x08 (R/W 8) MODE0 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 1002 RoReg8 Reserved1[0x1];
Kojto 111:4336505e4b1c 1003 __IO RTC_STATUS_Type STATUS; /**< \brief Offset: 0x0A (R/W 8) Status */
Kojto 111:4336505e4b1c 1004 __IO RTC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x0B (R/W 8) Debug Control */
Kojto 111:4336505e4b1c 1005 __IO RTC_FREQCORR_Type FREQCORR; /**< \brief Offset: 0x0C (R/W 8) Frequency Correction */
Kojto 111:4336505e4b1c 1006 RoReg8 Reserved2[0x3];
Kojto 111:4336505e4b1c 1007 __IO RTC_MODE0_COUNT_Type COUNT; /**< \brief Offset: 0x10 (R/W 32) MODE0 Counter Value */
Kojto 111:4336505e4b1c 1008 RoReg8 Reserved3[0x4];
Kojto 111:4336505e4b1c 1009 __IO RTC_MODE0_COMP_Type COMP[1]; /**< \brief Offset: 0x18 (R/W 32) MODE0 Compare n Value */
Kojto 111:4336505e4b1c 1010 } RtcMode0;
Kojto 111:4336505e4b1c 1011 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 1012
Kojto 111:4336505e4b1c 1013 /** \brief RTC_MODE1 hardware registers */
Kojto 111:4336505e4b1c 1014 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 1015 typedef struct { /* 16-bit Counter with Two 16-bit Compares */
Kojto 111:4336505e4b1c 1016 __IO RTC_MODE1_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 16) MODE1 Control */
Kojto 111:4336505e4b1c 1017 __IO RTC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request */
Kojto 111:4336505e4b1c 1018 __IO RTC_MODE1_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x04 (R/W 16) MODE1 Event Control */
Kojto 111:4336505e4b1c 1019 __IO RTC_MODE1_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x06 (R/W 8) MODE1 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 1020 __IO RTC_MODE1_INTENSET_Type INTENSET; /**< \brief Offset: 0x07 (R/W 8) MODE1 Interrupt Enable Set */
Kojto 111:4336505e4b1c 1021 __IO RTC_MODE1_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x08 (R/W 8) MODE1 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 1022 RoReg8 Reserved1[0x1];
Kojto 111:4336505e4b1c 1023 __IO RTC_STATUS_Type STATUS; /**< \brief Offset: 0x0A (R/W 8) Status */
Kojto 111:4336505e4b1c 1024 __IO RTC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x0B (R/W 8) Debug Control */
Kojto 111:4336505e4b1c 1025 __IO RTC_FREQCORR_Type FREQCORR; /**< \brief Offset: 0x0C (R/W 8) Frequency Correction */
Kojto 111:4336505e4b1c 1026 RoReg8 Reserved2[0x3];
Kojto 111:4336505e4b1c 1027 __IO RTC_MODE1_COUNT_Type COUNT; /**< \brief Offset: 0x10 (R/W 16) MODE1 Counter Value */
Kojto 111:4336505e4b1c 1028 RoReg8 Reserved3[0x2];
Kojto 111:4336505e4b1c 1029 __IO RTC_MODE1_PER_Type PER; /**< \brief Offset: 0x14 (R/W 16) MODE1 Counter Period */
Kojto 111:4336505e4b1c 1030 RoReg8 Reserved4[0x2];
Kojto 111:4336505e4b1c 1031 __IO RTC_MODE1_COMP_Type COMP[2]; /**< \brief Offset: 0x18 (R/W 16) MODE1 Compare n Value */
Kojto 111:4336505e4b1c 1032 } RtcMode1;
Kojto 111:4336505e4b1c 1033 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 1034
Kojto 111:4336505e4b1c 1035 /** \brief RTC_MODE2 hardware registers */
Kojto 111:4336505e4b1c 1036 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 1037 typedef struct { /* Clock/Calendar with Alarm */
Kojto 111:4336505e4b1c 1038 __IO RTC_MODE2_CTRL_Type CTRL; /**< \brief Offset: 0x00 (R/W 16) MODE2 Control */
Kojto 111:4336505e4b1c 1039 __IO RTC_READREQ_Type READREQ; /**< \brief Offset: 0x02 (R/W 16) Read Request */
Kojto 111:4336505e4b1c 1040 __IO RTC_MODE2_EVCTRL_Type EVCTRL; /**< \brief Offset: 0x04 (R/W 16) MODE2 Event Control */
Kojto 111:4336505e4b1c 1041 __IO RTC_MODE2_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x06 (R/W 8) MODE2 Interrupt Enable Clear */
Kojto 111:4336505e4b1c 1042 __IO RTC_MODE2_INTENSET_Type INTENSET; /**< \brief Offset: 0x07 (R/W 8) MODE2 Interrupt Enable Set */
Kojto 111:4336505e4b1c 1043 __IO RTC_MODE2_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x08 (R/W 8) MODE2 Interrupt Flag Status and Clear */
Kojto 111:4336505e4b1c 1044 RoReg8 Reserved1[0x1];
Kojto 111:4336505e4b1c 1045 __IO RTC_STATUS_Type STATUS; /**< \brief Offset: 0x0A (R/W 8) Status */
Kojto 111:4336505e4b1c 1046 __IO RTC_DBGCTRL_Type DBGCTRL; /**< \brief Offset: 0x0B (R/W 8) Debug Control */
Kojto 111:4336505e4b1c 1047 __IO RTC_FREQCORR_Type FREQCORR; /**< \brief Offset: 0x0C (R/W 8) Frequency Correction */
Kojto 111:4336505e4b1c 1048 RoReg8 Reserved2[0x3];
Kojto 111:4336505e4b1c 1049 __IO RTC_MODE2_CLOCK_Type CLOCK; /**< \brief Offset: 0x10 (R/W 32) MODE2 Clock Value */
Kojto 111:4336505e4b1c 1050 RoReg8 Reserved3[0x4];
Kojto 111:4336505e4b1c 1051 RtcMode2Alarm Mode2Alarm[1]; /**< \brief Offset: 0x18 RtcMode2Alarm groups [ALARM_NUM] */
Kojto 111:4336505e4b1c 1052 } RtcMode2;
Kojto 111:4336505e4b1c 1053 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 1054
Kojto 111:4336505e4b1c 1055 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
Kojto 111:4336505e4b1c 1056 typedef union {
Kojto 111:4336505e4b1c 1057 RtcMode0 MODE0; /**< \brief Offset: 0x00 32-bit Counter with Single 32-bit Compare */
Kojto 111:4336505e4b1c 1058 RtcMode1 MODE1; /**< \brief Offset: 0x00 16-bit Counter with Two 16-bit Compares */
Kojto 111:4336505e4b1c 1059 RtcMode2 MODE2; /**< \brief Offset: 0x00 Clock/Calendar with Alarm */
Kojto 111:4336505e4b1c 1060 } Rtc;
Kojto 111:4336505e4b1c 1061 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
Kojto 111:4336505e4b1c 1062
Kojto 111:4336505e4b1c 1063 /*@}*/
Kojto 111:4336505e4b1c 1064
Kojto 111:4336505e4b1c 1065 #endif /* _SAMD21_RTC_COMPONENT_ */