#ifndef _FC7240_CMU_NU_Tztufn2_REGS_H_ #define _FC7240_CMU_NU_Tztufn2_REGS_H_ #ifdef __cplusplus extern "C" { #endif /* ---------------------------------------------------------------------------- -- CMU Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup CMU_Peripheral_Access_Layer CMU Peripheral Access Layer * @{ */ /** CMU - Size of Registers Arrays */ /** CMU - Register Layout Typedef */ typedef struct { uint8_t RESERVED_0[8]; __IO uint32_t CTRL ; /* Control Register, offset: 0x8 */ uint8_t RESERVED_1[4]; __IO uint32_t MIN ; /* Minimum Threshold Register, offset: 0x10 */ __IO uint32_t MAX ; /* Maximum Threshold Register, offset: 0x14 */ __IO uint32_t REF_WINDOW ; /* Reference Window Register, offset: 0x18 */ __I uint32_t MON_CNT ; /* Monitor Counter Register, offset: 0x1C */ __IO uint32_t ST ; /* Status Register, offset: 0x20 */ __IO uint32_t PERIOD ; /* Period Monitor Mode Configuration Register, offset: 0x24 */ } CMU_Type, *CMU_MemMapPtr; /** Number of instances of the CMU module. */ #define CMU_INSTANCE_COUNT (5u) /* CMU - Peripheral instance base addresses */ /** Peripheral CMU0 base address */ #define CMU0_BASE (0x40031000u) /** Peripheral CMU0 base pointer */ #define CMU0 ((CMU_Type *)CMU0_BASE) /** Peripheral CMU1 base address */ #define CMU1_BASE (0x40032000u) /** Peripheral CMU1 base pointer */ #define CMU1 ((CMU_Type *)CMU1_BASE) /** Peripheral CMU2 base address */ #define CMU2_BASE (0x40033000u) /** Peripheral CMU2 base pointer */ #define CMU2 ((CMU_Type *)CMU2_BASE) /** Peripheral CMU3 base address */ #define CMU3_BASE (0x40034000u) /** Peripheral CMU3 base pointer */ #define CMU3 ((CMU_Type *)CMU3_BASE) /** Peripheral CMU4 base address */ #define CMU4_BASE (0x40035000u) /** Peripheral CMU4 base pointer */ #define CMU4 ((CMU_Type *)CMU4_BASE) /** Array initializer of CMU peripheral base addresses */ #define CMU_BASE_ADDRS {CMU0_BASE, CMU1_BASE, CMU2_BASE, CMU3_BASE, CMU4_BASE} /** Array initializer of CMU peripheral base pointers */ #define CMU_BASE_PTRS {CMU0, CMU1, CMU2, CMU3, CMU4} // need fill by yourself ///** Number of interrupt vector arrays for the CMU module. */ //#define CMU_IRQS_ARR_COUNT (1u) ///** Number of interrupt channels for the CMU module. */ //#define CMU_IRQS_CH_COUNT (1u) ///** Interrupt vectors for the CMU peripheral type */ //#define CMU_IRQS {CMU0_IRQn, CMU1_IRQn, CMU2_IRQn, CMU3_IRQn, CMU4_IRQn} /* ---------------------------------------------------------------------------- -- CMU Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup CMU_Register_Masks CMU Register Masks * @{ */ /* CTRL Bit Fields */ #define CMU_CTRL_REF_DIV_MASK 0x70000u #define CMU_CTRL_REF_DIV_SHIFT 16u #define CMU_CTRL_REF_DIV_WIDTH 3u #define CMU_CTRL_REF_DIV(x) (((uint32_t)(((uint32_t)(x))<