rstc.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for RSTC
  5. *
  6. * Copyright (c) 2018 Microchip Technology Inc.
  7. *
  8. * \license_start
  9. *
  10. * \page License
  11. *
  12. * SPDX-License-Identifier: Apache-2.0
  13. *
  14. * Licensed under the Apache License, Version 2.0 (the "License");
  15. * you may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at
  17. *
  18. * http://www.apache.org/licenses/LICENSE-2.0
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. * \license_stop
  27. *
  28. */
  29. /* file generated from device description version 2018-05-30T11:07:17Z */
  30. #ifndef _SAML11_RSTC_COMPONENT_H_
  31. #define _SAML11_RSTC_COMPONENT_H_
  32. #define _SAML11_RSTC_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 Reset Controller
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR RSTC */
  38. /* ========================================================================== */
  39. #define RSTC_U2239 /**< (RSTC) Module ID */
  40. #define REV_RSTC 0x300 /**< (RSTC) Module revision */
  41. /* -------- RSTC_RCAUSE : (RSTC Offset: 0x00) (R/ 8) Reset Cause -------- */
  42. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  43. typedef union {
  44. struct {
  45. uint8_t POR:1; /**< bit: 0 Power On Reset */
  46. uint8_t BODCORE:1; /**< bit: 1 Brown Out CORE Detector Reset */
  47. uint8_t BODVDD:1; /**< bit: 2 Brown Out VDD Detector Reset */
  48. uint8_t :1; /**< bit: 3 Reserved */
  49. uint8_t EXT:1; /**< bit: 4 External Reset */
  50. uint8_t WDT:1; /**< bit: 5 Watchdog Reset */
  51. uint8_t SYST:1; /**< bit: 6 System Reset Request */
  52. uint8_t :1; /**< bit: 7 Reserved */
  53. } bit; /**< Structure used for bit access */
  54. uint8_t reg; /**< Type used for register access */
  55. } RSTC_RCAUSE_Type;
  56. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  57. #define RSTC_RCAUSE_OFFSET (0x00) /**< (RSTC_RCAUSE) Reset Cause Offset */
  58. #define RSTC_RCAUSE_POR_Pos 0 /**< (RSTC_RCAUSE) Power On Reset Position */
  59. #define RSTC_RCAUSE_POR_Msk (_U_(0x1) << RSTC_RCAUSE_POR_Pos) /**< (RSTC_RCAUSE) Power On Reset Mask */
  60. #define RSTC_RCAUSE_POR RSTC_RCAUSE_POR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use RSTC_RCAUSE_POR_Msk instead */
  61. #define RSTC_RCAUSE_BODCORE_Pos 1 /**< (RSTC_RCAUSE) Brown Out CORE Detector Reset Position */
  62. #define RSTC_RCAUSE_BODCORE_Msk (_U_(0x1) << RSTC_RCAUSE_BODCORE_Pos) /**< (RSTC_RCAUSE) Brown Out CORE Detector Reset Mask */
  63. #define RSTC_RCAUSE_BODCORE RSTC_RCAUSE_BODCORE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use RSTC_RCAUSE_BODCORE_Msk instead */
  64. #define RSTC_RCAUSE_BODVDD_Pos 2 /**< (RSTC_RCAUSE) Brown Out VDD Detector Reset Position */
  65. #define RSTC_RCAUSE_BODVDD_Msk (_U_(0x1) << RSTC_RCAUSE_BODVDD_Pos) /**< (RSTC_RCAUSE) Brown Out VDD Detector Reset Mask */
  66. #define RSTC_RCAUSE_BODVDD RSTC_RCAUSE_BODVDD_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use RSTC_RCAUSE_BODVDD_Msk instead */
  67. #define RSTC_RCAUSE_EXT_Pos 4 /**< (RSTC_RCAUSE) External Reset Position */
  68. #define RSTC_RCAUSE_EXT_Msk (_U_(0x1) << RSTC_RCAUSE_EXT_Pos) /**< (RSTC_RCAUSE) External Reset Mask */
  69. #define RSTC_RCAUSE_EXT RSTC_RCAUSE_EXT_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use RSTC_RCAUSE_EXT_Msk instead */
  70. #define RSTC_RCAUSE_WDT_Pos 5 /**< (RSTC_RCAUSE) Watchdog Reset Position */
  71. #define RSTC_RCAUSE_WDT_Msk (_U_(0x1) << RSTC_RCAUSE_WDT_Pos) /**< (RSTC_RCAUSE) Watchdog Reset Mask */
  72. #define RSTC_RCAUSE_WDT RSTC_RCAUSE_WDT_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use RSTC_RCAUSE_WDT_Msk instead */
  73. #define RSTC_RCAUSE_SYST_Pos 6 /**< (RSTC_RCAUSE) System Reset Request Position */
  74. #define RSTC_RCAUSE_SYST_Msk (_U_(0x1) << RSTC_RCAUSE_SYST_Pos) /**< (RSTC_RCAUSE) System Reset Request Mask */
  75. #define RSTC_RCAUSE_SYST RSTC_RCAUSE_SYST_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use RSTC_RCAUSE_SYST_Msk instead */
  76. #define RSTC_RCAUSE_MASK _U_(0x77) /**< \deprecated (RSTC_RCAUSE) Register MASK (Use RSTC_RCAUSE_Msk instead) */
  77. #define RSTC_RCAUSE_Msk _U_(0x77) /**< (RSTC_RCAUSE) Register Mask */
  78. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  79. /** \brief RSTC hardware registers */
  80. typedef struct { /* Reset Controller */
  81. __I RSTC_RCAUSE_Type RCAUSE; /**< Offset: 0x00 (R/ 8) Reset Cause */
  82. } Rstc;
  83. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  84. /** @} end of Reset Controller */
  85. #endif /* _SAML11_RSTC_COMPONENT_H_ */