#ifndef _FC7240_SENT_NU_Tztufn40_REGS_H_ #define _FC7240_SENT_NU_Tztufn40_REGS_H_ #ifdef __cplusplus extern "C" { #endif /* ---------------------------------------------------------------------------- -- SENT Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup SENT_Peripheral_Access_Layer SENT Peripheral Access Layer * @{ */ /** SENT - Size of Registers Arrays */ #define SENT_CHANNEL_COUNT (4u) /** SENT - Register Layout Typedef */ typedef struct { __IO uint32_t GLBL_CTL ; /* Global Control Register, offset: 0x0 */ __IO uint32_t CHN_EN ; /* Channel Enable Register, offset: 0x4 */ __IO uint32_t GLBL_STAT ; /* Global Status Register, offset: 0x8 */ __IO uint32_t FMSG_STAT ; /* Fast Message Status Register, offset: 0xC */ __IO uint32_t SMSG_STAT ; /* Slow Message Status Register, offset: 0x10 */ __IO uint32_t FIFO_EN ; /* FIFO Enable Register, offset: 0x14 */ __IO uint32_t DATA_NUM_CTL1 ; /* Each Channel Data Number Control Register, offset: 0x18 */ uint8_t RESERVED_0[4]; __IO uint32_t OVFL_UDFL_STAT ; /* Fast Message FIFO Overflow DMA Underflow State Register, offset: 0x20 */ __IO uint32_t NB_MODE1 ; /* Channel Nibble Data Mode Control 1 Register, offset: 0x24 */ uint8_t RESERVED_1[4]; __IO uint32_t FDMA_CTL ; /* Channel Fast Message DMA Control Register, offset: 0x2C */ __IO uint32_t SDMA_CTL ; /* Channel Slow Message DMA Control Register, offset: 0x30 */ __IO uint32_t FINT_CTL ; /* Channel Fast Message Interrupt Control Register, offset: 0x34 */ __IO uint32_t SINT_CTL ; /* Channel Slow Message Interrupt Control Register, offset: 0x38 */ struct { __IO uint32_t CHN_CLK_CTL ; /* Channel clock control register, offset: 0x3c */ __IO uint32_t CHN_STAT ; /* Channel status register, offset: 0x40 */ __IO uint32_t CHN_CTL ; /* Channel control register, offset: 0x44 */ __I uint32_t CHN_FDATA ; /* Channel received fast data nibble values, offset: 0x48 */ __I uint32_t CHN_FCRC ; /* Channel fast message CRC and status & communication value, offset: 0x4c */ __I uint32_t CHN_FTS ; /* Channel fast timestamp value, offset: 0x50 */ __I uint32_t CHN_SBIT3 ; /* Channel slow message status & communication bit 3 received value, offset: 0x54 */ __I uint32_t CHN_SBIT2 ; /* Channel slow message status & communication bit 2 received value, offset: 0x58 */ __IO uint32_t CHN_STS ; /* Channel slow message timestamp value, offset: 0x5c */ __IO uint32_t CHN_DFD ; /* Channel n DMA fast data, offset: 0x60 */ __IO uint32_t CHN_DFC ; /* Channel n DMA fast crc data, offset: 0x64 */ __IO uint32_t CHN_DFTS ; /* Channel n DMA fast timestamp, offset: 0x68 */ uint8_t RESERVED_2[4]; __IO uint32_t CHN_DSB3 ; /* Channel n DMA slow messgae bit3, offset: 0x70 */ __IO uint32_t CHN_DSB2 ; /* Channel n DMA slow messgae bit2, offset: 0x74 */ __IO uint32_t CHN_DSTS ; /* Channel n DMA slow message timestamp, offset: 0x78 */ __IO uint32_t CHN_TSTMP ; /* Channle n timestamp, offset: 0x7c */ __IO uint32_t CHN_MCNT ; /* Channel n message counter, offset: 0x80 */ __IO uint32_t CHN_SPC_CTL ; /* Channel n SPC mode control, offset: 0x84 */ __IO uint32_t CHN_IDLE_CTL ; /* CHN_IDLE_CTL0, offset: 0x88 */ }SENT_CHN[SENT_CHANNEL_COUNT]; } SENT_Type, *SENT_MemMapPtr; /** Number of instances of the SENT module. */ #define SENT_INSTANCE_COUNT (1u) /* SENT - Peripheral instance base addresses */ /** Peripheral SENT base address */ #define SENT_BASE (0x40054000u) /** Peripheral SENT base pointer */ #define SENT ((SENT_Type *)SENT_BASE) /** Array initializer of SENT peripheral base addresses */ #define SENT_BASE_ADDRS {SENT_BASE} /** Array initializer of SENT peripheral base pointers */ #define SENT_BASE_PTRS {SENT} // need fill by yourself ///** Number of interrupt vector arrays for the SENT module. */ //#define SENT_IRQS_ARR_COUNT (1u) ///** Number of interrupt channels for the SENT module. */ //#define SENT_IRQS_CH_COUNT (1u) ///** Interrupt vectors for the SENT peripheral type */ //#define SENT_IRQS {SENT_IRQn} /* ---------------------------------------------------------------------------- -- SENT Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup SENT_Register_Masks SENT Register Masks * @{ */ /* GLBL_CTL Bit Fields */ #define SENT_GLBL_CTL_PRE_SCALER_MASK 0xFF000000u #define SENT_GLBL_CTL_PRE_SCALER_SHIFT 24u #define SENT_GLBL_CTL_PRE_SCALER_WIDTH 8u #define SENT_GLBL_CTL_PRE_SCALER(x) (((uint32_t)(((uint32_t)(x))<