#ifndef _FC7240_CMP_NU_Tztufn27_REGS_H_ #define _FC7240_CMP_NU_Tztufn27_REGS_H_ #ifdef __cplusplus extern "C" { #endif /* ---------------------------------------------------------------------------- -- CMP Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup CMP_Peripheral_Access_Layer CMP Peripheral Access Layer * @{ */ /** CMP - Size of Registers Arrays */ /** CMP - Register Layout Typedef */ typedef struct { uint8_t RESERVED_0[8]; __IO uint32_t CCR0 ; /* Comparator Control Register 0, offset: 0x8 */ __IO uint32_t CCR1 ; /* Comparator Control Register 1, offset: 0xC */ __IO uint32_t CCR2 ; /* Comparator Control Register 2, offset: 0x10 */ __IO uint32_t CCR3 ; /* Comparator Control Register 3, offset: 0x14 */ __IO uint32_t DCR ; /* Comparator DAC Control Register, offset: 0x18 */ __IO uint32_t IER ; /* Comparator Interrupt Enable Register, offset: 0x1C */ __IO uint32_t CSR ; /* Comparator Status Register, offset: 0x20 */ __IO uint32_t CSCR0 ; /* Channel Scan Control Register 0, offset: 0x24 */ __IO uint32_t CSCR1 ; /* Channel Scan Control Register 1, offset: 0x28 */ __IO uint32_t CSCSR ; /* Channel Scan Control and Status Register, offset: 0x2C */ __IO uint32_t CSSR ; /* Channel Scan Status Register, offset: 0x30 */ } CMP_Type, *CMP_MemMapPtr; /** Number of instances of the CMP module. */ #define CMP_INSTANCE_COUNT (2u) /* CMP - Peripheral instance base addresses */ /** Peripheral CMP0 base address */ #define CMP0_BASE (0x40040000u) /** Peripheral CMP0 base pointer */ #define CMP0 ((CMP_Type *)CMP0_BASE) /** Peripheral CMP1 base address */ #define CMP1_BASE (0x40041000u) /** Peripheral CMP1 base pointer */ #define CMP1 ((CMP_Type *)CMP1_BASE) /** Array initializer of CMP peripheral base addresses */ #define CMP_BASE_ADDRS {CMP0_BASE, CMP1_BASE} /** Array initializer of CMP peripheral base pointers */ #define CMP_BASE_PTRS {CMP0, CMP1} // need fill by yourself ///** Number of interrupt vector arrays for the CMP module. */ //#define CMP_IRQS_ARR_COUNT (1u) ///** Number of interrupt channels for the CMP module. */ //#define CMP_IRQS_CH_COUNT (1u) ///** Interrupt vectors for the CMP peripheral type */ //#define CMP_IRQS {CMP0_IRQn, CMP1_IRQn} /* ---------------------------------------------------------------------------- -- CMP Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup CMP_Register_Masks CMP Register Masks * @{ */ /* CCR0 Bit Fields */ #define CMP_CCR0_DACEN_SEL_MASK 0x4u #define CMP_CCR0_DACEN_SEL_SHIFT 2u #define CMP_CCR0_DACEN_SEL_WIDTH 1u #define CMP_CCR0_DACEN_SEL(x) (((uint32_t)(((uint32_t)(x))<