#ifndef _FC7240_PTIMER_NU_Tztufn31_REGS_H_ #define _FC7240_PTIMER_NU_Tztufn31_REGS_H_ #ifdef __cplusplus extern "C" { #endif /* ---------------------------------------------------------------------------- -- PTIMER Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup PTIMER_Peripheral_Access_Layer PTIMER Peripheral Access Layer * @{ */ /** PTIMER - Size of Registers Arrays */ #define PTIMER_CH_CNT 4u #define PTIMER_CH_DLY_CNT 8u #define PTIMER_DLY_CNT (PTIMER_CH_CNT * PTIMER_CH_DLY_CNT) /** PTIMER - Register Layout Typedef */ typedef struct { __IO uint32_t STATUS_CTRL ; /* Status and Control Register, offset: 0x0 */ __IO uint32_t MAX_CNT ; /* Max Count Number Register, offset: 0x4 */ __IO uint32_t CNT ; /* Counter Register, offset: 0x8 */ __IO uint32_t INT_DLY ; /* Interrupt Delay Register, offset: 0xC */ struct{ __IO uint32_t CTRL ; /* Channel n Control register 1, array offset: 0x10, array step: 0x28 */ __IO uint32_t STATUS ; /* Channel n Status register, array offset: 0x14, array step: 0x28 */ __IO uint32_t DLY[PTIMER_CH_DLY_CNT] ; /* Channel n Delay 0 register..Channel n Delay 7 register, array offset: 0x18, array step: index*0x28, index2*0x4 */ } CH[PTIMER_CH_CNT] ; /* Channel n registers, array offset: 0x10, array step: 0x28 */ uint8_t RESERVED_0[224]; __IO uint32_t POEN ; /* Pulse-Out Enable Register, offset: 0x190 */ __IO uint32_t PODLY ; /* Pulse-Out Delay Register, offset: 0x194 */ } PTIMER_Type, *PTIMER_MemMapPtr; /** Number of instances of the PTIMER module. */ #define PTIMER_INSTANCE_COUNT (2u) /* PTIMER - Peripheral instance base addresses */ /** Peripheral PTIMER0 base address */ #define PTIMER0_BASE (0x40037000u) /** Peripheral PTIMER0 base pointer */ #define PTIMER0 ((PTIMER_Type *)PTIMER0_BASE) /** Peripheral PTIMER1 base address */ #define PTIMER1_BASE (0x40038000u) /** Peripheral PTIMER1 base pointer */ #define PTIMER1 ((PTIMER_Type *)PTIMER1_BASE) /** Array initializer of PTIMER peripheral base addresses */ #define PTIMER_BASE_ADDRS {PTIMER0_BASE, PTIMER1_BASE} /** Array initializer of PTIMER peripheral base pointers */ #define PTIMER_BASE_PTRS {PTIMER0, PTIMER1} // need fill by yourself ///** Number of interrupt vector arrays for the PTIMER module. */ //#define PTIMER_IRQS_ARR_COUNT (1u) ///** Number of interrupt channels for the PTIMER module. */ //#define PTIMER_IRQS_CH_COUNT (1u) ///** Interrupt vectors for the PTIMER peripheral type */ //#define PTIMER_IRQS {PTIMER0_IRQn, PTIMER1_IRQn} /* ---------------------------------------------------------------------------- -- PTIMER Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup PTIMER_Register_Masks PTIMER Register Masks * @{ */ /* STATUS_CTRL Bit Fields */ #define PTIMER_STATUS_CTRL_LDMODE_MASK 0xC0000u #define PTIMER_STATUS_CTRL_LDMODE_SHIFT 18u #define PTIMER_STATUS_CTRL_LDMODE_WIDTH 2u #define PTIMER_STATUS_CTRL_LDMODE(x) (((uint32_t)(((uint32_t)(x))<