1 /* 2 * Copyright (c) 2024 Microchip Technology Inc. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef _MEC5_RTMR_V1_H 7 #define _MEC5_RTMR_V1_H 8 9 /** @addtogroup Device_Peripheral_peripherals 10 * @{ 11 */ 12 13 /** 14 * @brief RTOS timer (MEC_RTMR) 15 */ 16 17 typedef struct mec_rtmr_regs { /*!< (@ 0x40007400) MEC_RTMR Structure */ 18 __IM uint32_t COUNT; /*!< (@ 0x00000000) RTOS timer count */ 19 __IOM uint32_t PRELOAD; /*!< (@ 0x00000004) RTOS timer preload */ 20 __IOM uint32_t CTRL; /*!< (@ 0x00000008) RTOS timer control */ 21 } MEC_RTMR_Type; /*!< Size = 12 (0xc) */ 22 23 /** @} */ /* End of group Device_Peripheral_peripherals */ 24 25 /** @addtogroup PosMask_peripherals 26 * @{ 27 */ 28 /* ========================================================= CTRL ========================================================== */ 29 #define MEC_RTMR_CTRL_ENABLE_Pos (0UL) /*!< ENABLE (Bit 0) */ 30 #define MEC_RTMR_CTRL_ENABLE_Msk (0x1UL) /*!< ENABLE (Bitfield-Mask: 0x01) */ 31 #define MEC_RTMR_CTRL_AUTO_RELOAD_Pos (1UL) /*!< AUTO_RELOAD (Bit 1) */ 32 #define MEC_RTMR_CTRL_AUTO_RELOAD_Msk (0x2UL) /*!< AUTO_RELOAD (Bitfield-Mask: 0x01) */ 33 #define MEC_RTMR_CTRL_START_Pos (2UL) /*!< START (Bit 2) */ 34 #define MEC_RTMR_CTRL_START_Msk (0x4UL) /*!< START (Bitfield-Mask: 0x01) */ 35 #define MEC_RTMR_CTRL_EXT_HALT_Pos (3UL) /*!< EXT_HALT (Bit 3) */ 36 #define MEC_RTMR_CTRL_EXT_HALT_Msk (0x8UL) /*!< EXT_HALT (Bitfield-Mask: 0x01) */ 37 #define MEC_RTMR_CTRL_FW_HALT_Pos (4UL) /*!< FW_HALT (Bit 4) */ 38 #define MEC_RTMR_CTRL_FW_HALT_Msk (0x10UL) /*!< FW_HALT (Bitfield-Mask: 0x01) */ 39 40 /** @} */ /* End of group PosMask_peripherals */ 41 42 /** @addtogroup EnumValue_peripherals 43 * @{ 44 */ 45 /* ========================================================= CTRL ========================================================== */ 46 /* ============================================= MEC_RTMR CTRL ENABLE [0..0] ============================================== */ 47 typedef enum { /*!< MEC_RTMR_CTRL_ENABLE */ 48 MEC_RTMR_CTRL_ENABLE_ON = 1, /*!< ON : Enable timer operation */ 49 } MEC_RTMR_CTRL_ENABLE_Enum; 50 51 /* =========================================== MEC_RTMR CTRL AUTO_RELOAD [1..1] =========================================== */ 52 typedef enum { /*!< MEC_RTMR_CTRL_AUTO_RELOAD */ 53 MEC_RTMR_CTRL_AUTO_RELOAD_EN = 1, /*!< EN : Enable */ 54 } MEC_RTMR_CTRL_AUTO_RELOAD_Enum; 55 56 /* ============================================== MEC_RTMR CTRL START [2..2] ============================================== */ 57 typedef enum { /*!< MEC_RTMR_CTRL_START */ 58 MEC_RTMR_CTRL_START_EN = 1, /*!< EN : Enable */ 59 } MEC_RTMR_CTRL_START_Enum; 60 61 /* ============================================ MEC_RTMR CTRL EXT_HALT [3..3] ============================================= */ 62 typedef enum { /*!< MEC_RTMR_CTRL_EXT_HALT */ 63 MEC_RTMR_CTRL_EXT_HALT_EN = 1, /*!< EN : Enable */ 64 } MEC_RTMR_CTRL_EXT_HALT_Enum; 65 66 /* ============================================= MEC_RTMR CTRL FW_HALT [4..4] ============================================= */ 67 typedef enum { /*!< MEC_RTMR_CTRL_FW_HALT */ 68 MEC_RTMR_CTRL_FW_HALT_EN = 1, /*!< EN : Enable */ 69 } MEC_RTMR_CTRL_FW_HALT_Enum; 70 71 /** @} */ /* End of group EnumValue_peripherals */ 72 73 #endif /* _MEC5_RTMR_V1_H */ 74