rtc_reg.h 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419
  1. /**************************************************************************//**
  2. * @file rtc_reg.h
  3. * @version V1.00
  4. * @brief RTC register definition header file
  5. *
  6. * SPDX-License-Identifier: Apache-2.0
  7. * @copyright (C) 2019 Nuvoton Technology Corp. All rights reserved.
  8. *****************************************************************************/
  9. #ifndef __RTC_REG_H__
  10. #define __RTC_REG_H__
  11. /** @addtogroup REGISTER Control Register
  12. @{
  13. */
  14. /*---------------------- Real Time Clock Controller -------------------------*/
  15. /**
  16. @addtogroup RTC Real Time Clock Controller(RTC)
  17. Memory Mapped Structure for RTC Controller
  18. @{ */
  19. typedef struct
  20. {
  21. /**
  22. * @var RTC_T::INIT
  23. * Offset: 0x00 RTC Initiation Register
  24. * ---------------------------------------------------------------------------------------------------
  25. * |Bits |Field |Descriptions
  26. * | :----: | :----: | :---- |
  27. * |[0] |INIT_ACTIVE|RTC Active Status (Read Only)
  28. * | | |0 = RTC is at reset state.
  29. * | | |1 = RTC is at normal active state.
  30. * |[31:1] |INIT |RTC Initiation
  31. * | | |When RTC block is powered on, RTC is at reset state
  32. * | | |User has to write a number (0x a5eb1357) to INIT to make RTC leaving reset state
  33. * | | |Once the INIT is written as 0xa5eb1357, the RTC will be in un-reset state permanently.
  34. * | | |The INIT is a write-only field and read value will be always 0.
  35. * @var RTC_T::FREQADJ
  36. * Offset: 0x08 RTC Frequency Compensation Register
  37. * ---------------------------------------------------------------------------------------------------
  38. * |Bits |Field |Descriptions
  39. * | :----: | :----: | :---- |
  40. * |[5:0] |FRACTION |Fraction Part
  41. * | | |Formula: FRACTION = (fraction part of detected value) X 64.
  42. * | | |Note: Digit in FCR must be expressed as hexadecimal number.
  43. * |[12:8] |INTEGER |Integer Part
  44. * | | |00000 = Integer part of detected value is 32752.
  45. * | | |00001 = Integer part of detected value is 32753.
  46. * | | |00010 = Integer part of detected value is 32754.
  47. * | | |00011 = Integer part of detected value is 32755.
  48. * | | |00100 = Integer part of detected value is 32756.
  49. * | | |00101 = Integer part of detected value is 32757.
  50. * | | |00110 = Integer part of detected value is 32758.
  51. * | | |00111 = Integer part of detected value is 32759.
  52. * | | |01000 = Integer part of detected value is 32760.
  53. * | | |01001 = Integer part of detected value is 32761.
  54. * | | |01010 = Integer part of detected value is 32762.
  55. * | | |01011 = Integer part of detected value is 32763.
  56. * | | |01100 = Integer part of detected value is 32764.
  57. * | | |01101 = Integer part of detected value is 32765.
  58. * | | |01110 = Integer part of detected value is 32766.
  59. * | | |01111 = Integer part of detected value is 32767.
  60. * | | |10000 = Integer part of detected value is 32768.
  61. * | | |10001 = Integer part of detected value is 32769.
  62. * | | |10010 = Integer part of detected value is 32770.
  63. * | | |10011 = Integer part of detected value is 32771.
  64. * | | |10100 = Integer part of detected value is 32772.
  65. * | | |10101 = Integer part of detected value is 32773.
  66. * | | |10110 = Integer part of detected value is 32774.
  67. * | | |10111 = Integer part of detected value is 32775.
  68. * | | |11000 = Integer part of detected value is 32776.
  69. * | | |11001 = Integer part of detected value is 32777.
  70. * | | |11010 = Integer part of detected value is 32778.
  71. * | | |11011 = Integer part of detected value is 32779.
  72. * | | |11100 = Integer part of detected value is 32780.
  73. * | | |11101 = Integer part of detected value is 32781.
  74. * | | |11110 = Integer part of detected value is 32782.
  75. * | | |11111 = Integer part of detected value is 32783.
  76. * @var RTC_T::TIME
  77. * Offset: 0x0C RTC Time Loading Register
  78. * ---------------------------------------------------------------------------------------------------
  79. * |Bits |Field |Descriptions
  80. * | :----: | :----: | :---- |
  81. * |[3:0] |SEC |1-Sec Time Digit (0~9)
  82. * |[6:4] |TENSEC |10-Sec Time Digit (0~5)
  83. * |[11:8] |MIN |1-Min Time Digit (0~9)
  84. * |[14:12] |TENMIN |10-Min Time Digit (0~5)
  85. * |[19:16] |HR |1-Hour Time Digit (0~9)
  86. * |[21:20] |TENHR |10-Hour Time Digit (0~2)
  87. * | | |When RTC runs as 12-hour time scale mode, RTC_TIME[21] (the high bit of TENHR[1:0]) means AM/PM indication (If RTC_TIME[21] is 1, it indicates PM time message.)
  88. * |[30:24] |HZCNT |Index of sub-second counter(0x00 ~0x7F)
  89. * @var RTC_T::CAL
  90. * Offset: 0x10 RTC Calendar Loading Register
  91. * ---------------------------------------------------------------------------------------------------
  92. * |Bits |Field |Descriptions
  93. * | :----: | :----: | :---- |
  94. * |[3:0] |DAY |1-Day Calendar Digit (0~9)
  95. * |[5:4] |TENDAY |10-Day Calendar Digit (0~3)
  96. * |[11:8] |MON |1-Month Calendar Digit (0~9)
  97. * |[12] |TENMON |10-Month Calendar Digit (0~1)
  98. * |[19:16] |YEAR |1-Year Calendar Digit (0~9)
  99. * |[23:20] |TENYEAR |10-Year Calendar Digit (0~9)
  100. * @var RTC_T::CLKFMT
  101. * Offset: 0x14 RTC Time Scale Selection Register
  102. * ---------------------------------------------------------------------------------------------------
  103. * |Bits |Field |Descriptions
  104. * | :----: | :----: | :---- |
  105. * |[0] |24HEN |24-hour / 12-hour Time Scale Selection
  106. * | | |Indicates that RTC_TIME and RTC_TALM are in 24-hour time scale or 12-hour time scale
  107. * | | |0 = 12-hour time scale with AM and PM indication selected.
  108. * | | |1 = 24-hour time scale selected.
  109. * |[8] |HZCNTEN |Sub-second Counter Enable Bit
  110. * | | |0 = HZCNT disabled in RTC_TIME and RTC_TALM.
  111. * | | |1 = HZCNT enabled in RTC_TIME and RTC_TALM .
  112. * @var RTC_T::WEEKDAY
  113. * Offset: 0x18 RTC Day of the Week Register
  114. * ---------------------------------------------------------------------------------------------------
  115. * |Bits |Field |Descriptions
  116. * | :----: | :----: | :---- |
  117. * |[2:0] |WEEKDAY |Day of the Week Register
  118. * | | |000 = Sunday.
  119. * | | |001 = Monday.
  120. * | | |010 = Tuesday.
  121. * | | |011 = Wednesday.
  122. * | | |100 = Thursday.
  123. * | | |101 = Friday.
  124. * | | |110 = Saturday.
  125. * | | |111 = Reserved.
  126. * @var RTC_T::TALM
  127. * Offset: 0x1C RTC Time Alarm Register
  128. * ---------------------------------------------------------------------------------------------------
  129. * |Bits |Field |Descriptions
  130. * | :----: | :----: | :---- |
  131. * |[3:0] |SEC |1-Sec Time Digit of Alarm Setting (0~9)
  132. * |[6:4] |TENSEC |10-Sec Time Digit of Alarm Setting (0~5)
  133. * |[11:8] |MIN |1-Min Time Digit of Alarm Setting (0~9)
  134. * |[14:12] |TENMIN |10-Min Time Digit of Alarm Setting (0~5)
  135. * |[19:16] |HR |1-Hour Time Digit of Alarm Setting (0~9)
  136. * |[21:20] |TENHR |10-Hour Time Digit of Alarm Setting (0~2)
  137. * | | |When RTC runs as 12-hour time scale mode, RTC_TIME[21] (the high bit of TENHR[1:0]) means AM/PM indication (If RTC_TIME[21] is 1, it indicates PM time message.)
  138. * |[30:24] |HZCNT |Index of sub-second counter(0x00 ~0x7F)
  139. * @var RTC_T::CALM
  140. * Offset: 0x20 RTC Calendar Alarm Register
  141. * ---------------------------------------------------------------------------------------------------
  142. * |Bits |Field |Descriptions
  143. * | :----: | :----: | :---- |
  144. * |[3:0] |DAY |1-Day Calendar Digit of Alarm Setting (0~9)
  145. * |[5:4] |TENDAY |10-Day Calendar Digit of Alarm Setting (0~3)
  146. * |[11:8] |MON |1-Month Calendar Digit of Alarm Setting (0~9)
  147. * |[12] |TENMON |10-Month Calendar Digit of Alarm Setting (0~1)
  148. * |[19:16] |YEAR |1-Year Calendar Digit of Alarm Setting (0~9)
  149. * |[23:20] |TENYEAR |10-Year Calendar Digit of Alarm Setting (0~9)
  150. * @var RTC_T::LEAPYEAR
  151. * Offset: 0x24 RTC Leap Year Indicator Register
  152. * ---------------------------------------------------------------------------------------------------
  153. * |Bits |Field |Descriptions
  154. * | :----: | :----: | :---- |
  155. * |[0] |LEAPYEAR |Leap Year Indication Register (Read Only)
  156. * | | |0 = This year is not a leap year.
  157. * | | |1 = This year is leap year.
  158. * @var RTC_T::INTEN
  159. * Offset: 0x28 RTC Interrupt Enable Register
  160. * ---------------------------------------------------------------------------------------------------
  161. * |Bits |Field |Descriptions
  162. * | :----: | :----: | :---- |
  163. * |[0] |ALMIEN |Alarm Interrupt Enable Bit
  164. * | | |Set ALMIEN to 1 can also enable chip wake-up function when RTC alarm interrupt event is generated.
  165. * | | |0 = RTC Alarm interrupt Disabled.
  166. * | | |1 = RTC Alarm interrupt Enabled.
  167. * |[1] |TICKIEN |Time Tick Interrupt Enable Bit
  168. * @var RTC_T::INTSTS
  169. * Offset: 0x2C RTC Interrupt Status Register
  170. * ---------------------------------------------------------------------------------------------------
  171. * |Bits |Field |Descriptions
  172. * | :----: | :----: | :---- |
  173. * |[0] |ALMIF |RTC Alarm Interrupt Flag
  174. * | | |0 = Alarm condition is not matched.
  175. * | | |1 = Alarm condition is matched.
  176. * | | |Note: Write 1 to clear this bit.
  177. * |[1] |TICKIF |RTC Time Tick Interrupt Flag
  178. * @var RTC_T::TICK
  179. * Offset: 0x30 RTC Time Tick Register
  180. * ---------------------------------------------------------------------------------------------------
  181. * |Bits |Field |Descriptions
  182. * | :----: | :----: | :---- |
  183. * |[2:0] |TICK |Time Tick Register
  184. * | | |These bits are used to select RTC time tick period for Periodic Time Tick Interrupt request.
  185. * | | |000 = Time tick is 1 second.
  186. * | | |001 = Time tick is 1/2 second.
  187. * | | |010 = Time tick is 1/4 second.
  188. * | | |011 = Time tick is 1/8 second.
  189. * | | |100 = Time tick is 1/16 second.
  190. * | | |101 = Time tick is 1/32 second.
  191. * | | |110 = Time tick is 1/64 second.
  192. * | | |111 = Time tick is 1/128 second.
  193. * | | |Note: This register can be read back after the RTC register access enable bit RWENF (RTC_RWEN[16]) is active.
  194. * @var RTC_T::TAMSK
  195. * Offset: 0x34 RTC Time Alarm Mask Register
  196. * ---------------------------------------------------------------------------------------------------
  197. * |Bits |Field |Descriptions
  198. * | :----: | :----: | :---- |
  199. * |[0] |MSEC |Mask 1-Sec Time Digit of Alarm Setting (0~9)
  200. * |[1] |MTENSEC |Mask 10-Sec Time Digit of Alarm Setting (0~5)
  201. * |[2] |MMIN |Mask 1-Min Time Digit of Alarm Setting (0~9)
  202. * |[3] |MTENMIN |Mask 10-Min Time Digit of Alarm Setting (0~5)
  203. * |[4] |MHR |Mask 1-Hour Time Digit of Alarm Setting (0~9)
  204. * | | |Note: MHR function is only for 24-hour time scale mode.
  205. * |[5] |MTENHR |Mask 10-Hour Time Digit of Alarm Setting (0~2)
  206. * | | |Note: MTENHR function is only for 24-hour time scale mode.
  207. * @var RTC_T::CAMSK
  208. * Offset: 0x38 RTC Calendar Alarm Mask Register
  209. * ---------------------------------------------------------------------------------------------------
  210. * |Bits |Field |Descriptions
  211. * | :----: | :----: | :---- |
  212. * |[0] |MDAY |Mask 1-Day Calendar Digit of Alarm Setting (0~9)
  213. * |[1] |MTENDAY |Mask 10-Day Calendar Digit of Alarm Setting (0~3)
  214. * |[2] |MMON |Mask 1-Month Calendar Digit of Alarm Setting (0~9)
  215. * |[3] |MTENMON |Mask 10-Month Calendar Digit of Alarm Setting (0~1)
  216. * |[4] |MYEAR |Mask 1-Year Calendar Digit of Alarm Setting (0~9)
  217. * |[5] |MTENYEAR |Mask 10-Year Calendar Digit of Alarm Setting (0~9)
  218. * @var RTC_T::LXTCTL
  219. * Offset: 0x100 RTC 32.768 kHz Oscillator Control Register
  220. * ---------------------------------------------------------------------------------------------------
  221. * |Bits |Field |Descriptions
  222. * | :----: | :----: | :---- |
  223. * |[7] |C32KS |Clock 32K Source Selection:
  224. * | | |0 = Internal 32K clock is from 32K crystal .
  225. * | | |1 = Internal 32K clock is from LIRC32K.
  226. */
  227. __IO uint32_t INIT; /*!< [0x0000] RTC Initiation Register */
  228. __I uint32_t RESERVE0[1];
  229. __IO uint32_t FREQADJ; /*!< [0x0008] RTC Frequency Compensation Register */
  230. __IO uint32_t TIME; /*!< [0x000c] RTC Time Loading Register */
  231. __IO uint32_t CAL; /*!< [0x0010] RTC Calendar Loading Register */
  232. __IO uint32_t CLKFMT; /*!< [0x0014] RTC Time Scale Selection Register */
  233. __IO uint32_t WEEKDAY; /*!< [0x0018] RTC Day of the Week Register */
  234. __IO uint32_t TALM; /*!< [0x001c] RTC Time Alarm Register */
  235. __IO uint32_t CALM; /*!< [0x0020] RTC Calendar Alarm Register */
  236. __I uint32_t LEAPYEAR; /*!< [0x0024] RTC Leap Year Indicator Register */
  237. __IO uint32_t INTEN; /*!< [0x0028] RTC Interrupt Enable Register */
  238. __IO uint32_t INTSTS; /*!< [0x002c] RTC Interrupt Status Register */
  239. __IO uint32_t TICK; /*!< [0x0030] RTC Time Tick Register */
  240. __IO uint32_t TAMSK; /*!< [0x0034] RTC Time Alarm Mask Register */
  241. __IO uint32_t CAMSK; /*!< [0x0038] RTC Calendar Alarm Mask Register */
  242. __I uint32_t RESERVE1[49]; /* 0x3C ~ 0xFC */
  243. __IO uint32_t LXTCTL; /*!< [0x0100] RTC 32.768 kHz Oscillator Control Register */
  244. } RTC_T;
  245. /**
  246. @addtogroup RTC_CONST RTC Bit Field Definition
  247. Constant Definitions for RTC Controller
  248. @{ */
  249. #define RTC_INIT_ACTIVE_Pos (0) /*!< RTC_T::INIT: ACTIVE Position */
  250. #define RTC_INIT_ACTIVE_Msk (0x1ul << RTC_INIT_ACTIVE_Pos) /*!< RTC_T::INIT: ACTIVE Mask */
  251. #define RTC_INIT_INIT_Pos (1) /*!< RTC_T::INIT: INIT Position */
  252. #define RTC_INIT_INIT_Msk (0x7ffffffful << RTC_INIT_INIT_Pos) /*!< RTC_T::INIT: INIT Mask */
  253. #define RTC_FREQADJ_FRACTION_Pos (0) /*!< RTC_T::FREQADJ: FRACTION Position */
  254. #define RTC_FREQADJ_FRACTION_Msk (0x3ful << RTC_FREQADJ_FRACTION_Pos) /*!< RTC_T::FREQADJ: FRACTION Mask */
  255. #define RTC_FREQADJ_INTEGER_Pos (8) /*!< RTC_T::FREQADJ: INTEGER Position */
  256. #define RTC_FREQADJ_INTEGER_Msk (0x1ful << RTC_FREQADJ_INTEGER_Pos) /*!< RTC_T::FREQADJ: INTEGER Mask */
  257. #define RTC_TIME_SEC_Pos (0) /*!< RTC_T::TIME: SEC Position */
  258. #define RTC_TIME_SEC_Msk (0xful << RTC_TIME_SEC_Pos) /*!< RTC_T::TIME: SEC Mask */
  259. #define RTC_TIME_TENSEC_Pos (4) /*!< RTC_T::TIME: TENSEC Position */
  260. #define RTC_TIME_TENSEC_Msk (0x7ul << RTC_TIME_TENSEC_Pos) /*!< RTC_T::TIME: TENSEC Mask */
  261. #define RTC_TIME_MIN_Pos (8) /*!< RTC_T::TIME: MIN Position */
  262. #define RTC_TIME_MIN_Msk (0xful << RTC_TIME_MIN_Pos) /*!< RTC_T::TIME: MIN Mask */
  263. #define RTC_TIME_TENMIN_Pos (12) /*!< RTC_T::TIME: TENMIN Position */
  264. #define RTC_TIME_TENMIN_Msk (0x7ul << RTC_TIME_TENMIN_Pos) /*!< RTC_T::TIME: TENMIN Mask */
  265. #define RTC_TIME_HR_Pos (16) /*!< RTC_T::TIME: HR Position */
  266. #define RTC_TIME_HR_Msk (0xful << RTC_TIME_HR_Pos) /*!< RTC_T::TIME: HR Mask */
  267. #define RTC_TIME_TENHR_Pos (20) /*!< RTC_T::TIME: TENHR Position */
  268. #define RTC_TIME_TENHR_Msk (0x3ul << RTC_TIME_TENHR_Pos) /*!< RTC_T::TIME: TENHR Mask */
  269. #define RTC_TIME_HZCNT_Pos (24) /*!< RTC_T::TIME: HZCNT Position */
  270. #define RTC_TIME_HZCNT_Msk (0x7ful << RTC_TIME_HZCNT_Pos) /*!< RTC_T::TIME: HZCNT Mask */
  271. #define RTC_CAL_DAY_Pos (0) /*!< RTC_T::CAL: DAY Position */
  272. #define RTC_CAL_DAY_Msk (0xful << RTC_CAL_DAY_Pos) /*!< RTC_T::CAL: DAY Mask */
  273. #define RTC_CAL_TENDAY_Pos (4) /*!< RTC_T::CAL: TENDAY Position */
  274. #define RTC_CAL_TENDAY_Msk (0x3ul << RTC_CAL_TENDAY_Pos) /*!< RTC_T::CAL: TENDAY Mask */
  275. #define RTC_CAL_MON_Pos (8) /*!< RTC_T::CAL: MON Position */
  276. #define RTC_CAL_MON_Msk (0xful << RTC_CAL_MON_Pos) /*!< RTC_T::CAL: MON Mask */
  277. #define RTC_CAL_TENMON_Pos (12) /*!< RTC_T::CAL: TENMON Position */
  278. #define RTC_CAL_TENMON_Msk (0x1ul << RTC_CAL_TENMON_Pos) /*!< RTC_T::CAL: TENMON Mask */
  279. #define RTC_CAL_YEAR_Pos (16) /*!< RTC_T::CAL: YEAR Position */
  280. #define RTC_CAL_YEAR_Msk (0xful << RTC_CAL_YEAR_Pos) /*!< RTC_T::CAL: YEAR Mask */
  281. #define RTC_CAL_TENYEAR_Pos (20) /*!< RTC_T::CAL: TENYEAR Position */
  282. #define RTC_CAL_TENYEAR_Msk (0xful << RTC_CAL_TENYEAR_Pos) /*!< RTC_T::CAL: TENYEAR Mask */
  283. #define RTC_CLKFMT_24HEN_Pos (0) /*!< RTC_T::CLKFMT: 24HEN Position */
  284. #define RTC_CLKFMT_24HEN_Msk (0x1ul << RTC_CLKFMT_24HEN_Pos) /*!< RTC_T::CLKFMT: 24HEN Mask */
  285. #define RTC_CLKFMT_HZCNTEN_Pos (8) /*!< RTC_T::CLKFMT: HZCNTEN Position */
  286. #define RTC_CLKFMT_HZCNTEN_Msk (0x1ul << RTC_CLKFMT_HZCNTEN_Pos) /*!< RTC_T::CLKFMT: HZCNTEN Mask */
  287. #define RTC_WEEKDAY_WEEKDAY_Pos (0) /*!< RTC_T::WEEKDAY: WEEKDAY Position */
  288. #define RTC_WEEKDAY_WEEKDAY_Msk (0x7ul << RTC_WEEKDAY_WEEKDAY_Pos) /*!< RTC_T::WEEKDAY: WEEKDAY Mask */
  289. #define RTC_TALM_SEC_Pos (0) /*!< RTC_T::TALM: SEC Position */
  290. #define RTC_TALM_SEC_Msk (0xful << RTC_TALM_SEC_Pos) /*!< RTC_T::TALM: SEC Mask */
  291. #define RTC_TALM_TENSEC_Pos (4) /*!< RTC_T::TALM: TENSEC Position */
  292. #define RTC_TALM_TENSEC_Msk (0x7ul << RTC_TALM_TENSEC_Pos) /*!< RTC_T::TALM: TENSEC Mask */
  293. #define RTC_TALM_MIN_Pos (8) /*!< RTC_T::TALM: MIN Position */
  294. #define RTC_TALM_MIN_Msk (0xful << RTC_TALM_MIN_Pos) /*!< RTC_T::TALM: MIN Mask */
  295. #define RTC_TALM_TENMIN_Pos (12) /*!< RTC_T::TALM: TENMIN Position */
  296. #define RTC_TALM_TENMIN_Msk (0x7ul << RTC_TALM_TENMIN_Pos) /*!< RTC_T::TALM: TENMIN Mask */
  297. #define RTC_TALM_HR_Pos (16) /*!< RTC_T::TALM: HR Position */
  298. #define RTC_TALM_HR_Msk (0xful << RTC_TALM_HR_Pos) /*!< RTC_T::TALM: HR Mask */
  299. #define RTC_TALM_TENHR_Pos (20) /*!< RTC_T::TALM: TENHR Position */
  300. #define RTC_TALM_TENHR_Msk (0x3ul << RTC_TALM_TENHR_Pos) /*!< RTC_T::TALM: TENHR Mask */
  301. #define RTC_TALM_HZCNT_Pos (24) /*!< RTC_T::TALM: HZCNT Position */
  302. #define RTC_TALM_HZCNT_Msk (0x7ful << RTC_TALM_HZCNT_Pos) /*!< RTC_T::TALM: HZCNT Mask */
  303. #define RTC_CALM_DAY_Pos (0) /*!< RTC_T::CALM: DAY Position */
  304. #define RTC_CALM_DAY_Msk (0xful << RTC_CALM_DAY_Pos) /*!< RTC_T::CALM: DAY Mask */
  305. #define RTC_CALM_TENDAY_Pos (4) /*!< RTC_T::CALM: TENDAY Position */
  306. #define RTC_CALM_TENDAY_Msk (0x3ul << RTC_CALM_TENDAY_Pos) /*!< RTC_T::CALM: TENDAY Mask */
  307. #define RTC_CALM_MON_Pos (8) /*!< RTC_T::CALM: MON Position */
  308. #define RTC_CALM_MON_Msk (0xful << RTC_CALM_MON_Pos) /*!< RTC_T::CALM: MON Mask */
  309. #define RTC_CALM_TENMON_Pos (12) /*!< RTC_T::CALM: TENMON Position */
  310. #define RTC_CALM_TENMON_Msk (0x1ul << RTC_CALM_TENMON_Pos) /*!< RTC_T::CALM: TENMON Mask */
  311. #define RTC_CALM_YEAR_Pos (16) /*!< RTC_T::CALM: YEAR Position */
  312. #define RTC_CALM_YEAR_Msk (0xful << RTC_CALM_YEAR_Pos) /*!< RTC_T::CALM: YEAR Mask */
  313. #define RTC_CALM_TENYEAR_Pos (20) /*!< RTC_T::CALM: TENYEAR Position */
  314. #define RTC_CALM_TENYEAR_Msk (0xful << RTC_CALM_TENYEAR_Pos) /*!< RTC_T::CALM: TENYEAR Mask */
  315. #define RTC_LEAPYEAR_LEAPYEAR_Pos (0) /*!< RTC_T::LEAPYEAR: LEAPYEAR Position */
  316. #define RTC_LEAPYEAR_LEAPYEAR_Msk (0x1ul << RTC_LEAPYEAR_LEAPYEAR_Pos) /*!< RTC_T::LEAPYEAR: LEAPYEAR Mask */
  317. #define RTC_INTEN_ALMIEN_Pos (0) /*!< RTC_T::INTEN: ALMIEN Position */
  318. #define RTC_INTEN_ALMIEN_Msk (0x1ul << RTC_INTEN_ALMIEN_Pos) /*!< RTC_T::INTEN: ALMIEN Mask */
  319. #define RTC_INTEN_TICKIEN_Pos (1) /*!< RTC_T::INTEN: TICKIEN Position */
  320. #define RTC_INTEN_TICKIEN_Msk (0x1ul << RTC_INTEN_TICKIEN_Pos) /*!< RTC_T::INTEN: TICKIEN Mask */
  321. #define RTC_INTSTS_ALMIF_Pos (0) /*!< RTC_T::INTSTS: ALMIF Position */
  322. #define RTC_INTSTS_ALMIF_Msk (0x1ul << RTC_INTSTS_ALMIF_Pos) /*!< RTC_T::INTSTS: ALMIF Mask */
  323. #define RTC_INTSTS_TICKIF_Pos (1) /*!< RTC_T::INTSTS: TICKIF Position */
  324. #define RTC_INTSTS_TICKIF_Msk (0x1ul << RTC_INTSTS_TICKIF_Pos) /*!< RTC_T::INTSTS: TICKIF Mask */
  325. #define RTC_TICK_TICK_Pos (0) /*!< RTC_T::TICK: TICK Position */
  326. #define RTC_TICK_TICK_Msk (0x7ul << RTC_TICK_TICK_Pos) /*!< RTC_T::TICK: TICK Mask */
  327. #define RTC_TAMSK_MSEC_Pos (0) /*!< RTC_T::TAMSK: MSEC Position */
  328. #define RTC_TAMSK_MSEC_Msk (0x1ul << RTC_TAMSK_MSEC_Pos) /*!< RTC_T::TAMSK: MSEC Mask */
  329. #define RTC_TAMSK_MTENSEC_Pos (1) /*!< RTC_T::TAMSK: MTENSEC Position */
  330. #define RTC_TAMSK_MTENSEC_Msk (0x1ul << RTC_TAMSK_MTENSEC_Pos) /*!< RTC_T::TAMSK: MTENSEC Mask */
  331. #define RTC_TAMSK_MMIN_Pos (2) /*!< RTC_T::TAMSK: MMIN Position */
  332. #define RTC_TAMSK_MMIN_Msk (0x1ul << RTC_TAMSK_MMIN_Pos) /*!< RTC_T::TAMSK: MMIN Mask */
  333. #define RTC_TAMSK_MTENMIN_Pos (3) /*!< RTC_T::TAMSK: MTENMIN Position */
  334. #define RTC_TAMSK_MTENMIN_Msk (0x1ul << RTC_TAMSK_MTENMIN_Pos) /*!< RTC_T::TAMSK: MTENMIN Mask */
  335. #define RTC_TAMSK_MHR_Pos (4) /*!< RTC_T::TAMSK: MHR Position */
  336. #define RTC_TAMSK_MHR_Msk (0x1ul << RTC_TAMSK_MHR_Pos) /*!< RTC_T::TAMSK: MHR Mask */
  337. #define RTC_TAMSK_MTENHR_Pos (5) /*!< RTC_T::TAMSK: MTENHR Position */
  338. #define RTC_TAMSK_MTENHR_Msk (0x1ul << RTC_TAMSK_MTENHR_Pos) /*!< RTC_T::TAMSK: MTENHR Mask */
  339. #define RTC_CAMSK_MDAY_Pos (0) /*!< RTC_T::CAMSK: MDAY Position */
  340. #define RTC_CAMSK_MDAY_Msk (0x1ul << RTC_CAMSK_MDAY_Pos) /*!< RTC_T::CAMSK: MDAY Mask */
  341. #define RTC_CAMSK_MTENDAY_Pos (1) /*!< RTC_T::CAMSK: MTENDAY Position */
  342. #define RTC_CAMSK_MTENDAY_Msk (0x1ul << RTC_CAMSK_MTENDAY_Pos) /*!< RTC_T::CAMSK: MTENDAY Mask */
  343. #define RTC_CAMSK_MMON_Pos (2) /*!< RTC_T::CAMSK: MMON Position */
  344. #define RTC_CAMSK_MMON_Msk (0x1ul << RTC_CAMSK_MMON_Pos) /*!< RTC_T::CAMSK: MMON Mask */
  345. #define RTC_CAMSK_MTENMON_Pos (3) /*!< RTC_T::CAMSK: MTENMON Position */
  346. #define RTC_CAMSK_MTENMON_Msk (0x1ul << RTC_CAMSK_MTENMON_Pos) /*!< RTC_T::CAMSK: MTENMON Mask */
  347. #define RTC_CAMSK_MYEAR_Pos (4) /*!< RTC_T::CAMSK: MYEAR Position */
  348. #define RTC_CAMSK_MYEAR_Msk (0x1ul << RTC_CAMSK_MYEAR_Pos) /*!< RTC_T::CAMSK: MYEAR Mask */
  349. #define RTC_CAMSK_MTENYEAR_Pos (5) /*!< RTC_T::CAMSK: MTENYEAR Position */
  350. #define RTC_CAMSK_MTENYEAR_Msk (0x1ul << RTC_CAMSK_MTENYEAR_Pos) /*!< RTC_T::CAMSK: MTENYEAR Mask */
  351. #define RTC_LXTCTL_C32KS_Pos (7) /*!< RTC_T::LXTCTL: C32KS Position */
  352. #define RTC_LXTCTL_C32KS_Msk (0x1ul << RTC_LXTCTL_C32KS_Pos) /*!< RTC_T::LXTCTL: C32KS Mask */
  353. /**@}*/ /* RTC_CONST */
  354. /**@}*/ /* end of RTC register group */
  355. /**@}*/ /* end of REGISTER group */
  356. #endif /* __RTC_REG_H__ */