#ifndef _FC7240_MB_NU_Tztufn18_REGS_H_ #define _FC7240_MB_NU_Tztufn18_REGS_H_ #ifdef __cplusplus extern "C" { #endif /* ---------------------------------------------------------------------------- -- MB Peripheral Access Layer ---------------------------------------------------------------------------- */ #define MB_CHANNEL_CONFIG_COUNT 4 #define MB_INT_CONFIG_COUNT 2 /*! * @addtogroup MB_Peripheral_Access_Layer MB Peripheral Access Layer * @{ */ /** MB - Size of Registers Arrays */ /** MB - Register Layout Typedef */ typedef struct { struct { __I uint32_t MB_CCn_SEMA ; /* Communication Channel Smeaphore Register, offset: 0x0 */ __IO uint32_t MB_CCn_SEMA_UNLK ; /* Communication Channel Smeaphore Unlock Register, offset: 0x4 */ __O uint32_t MB_CCn_REQUEST ; /* Communication Channel Request Register, offset: 0x8 */ __IO uint32_t MB_CCn_DONE ; /* Communication Channel Done Register, offset: 0xc */ __IO uint32_t MB_CCn_DONE_MASK ; /* Communication Channel Done Mask Register, offset: 0x10 */ __IO uint32_t MB_CCn_DATA0 ; /* Communication Channel Data Register0, offset: 0x14 */ __IO uint32_t MB_CCn_DATA1 ; /* Communication Channel Data Register1, offset: 0x18 */ __I uint32_t MB_CCn_STAT ; /* Communication Channel Status Register, offset: 0x1c */ __O uint32_t MB_CCn_CLR ; /* Communication Channel Clear Register, offset: 0x20 */ uint8_t RESERVED_0[12]; } CHANNEL[MB_CHANNEL_CONFIG_COUNT]; uint8_t RESERVED_15[1856]; struct { __IO uint32_t MB_INTn_FLG ; /* Interrupt Channel Flag Register, offset: 0x800 */ __IO uint32_t MB_INTn_FLG_MASK ; /* Interrupt Channel Flag Mask Register, offset: 0x804 */ __IO uint32_t MB_INTn_INTEN ; /* Interrupt Channel Interrupt Enable Register, offset: 0x808 */ __I uint32_t MB_INTn_FLG_STAT ; /* Interrupt Channel Flag Status Register, offset: 0x80c */ __IO uint32_t MB_INTn_CTRL ; /* Interrupt Channel Control Register, offset: 0x810 */ uint8_t RESERVED_2[12]; } INTR[MB_INT_CONFIG_COUNT]; } MB_Type, *MB_MemMapPtr; /** Number of instances of the MB module. */ #define MB_INSTANCE_COUNT (1u) /* MB - Peripheral instance base addresses */ /** Peripheral MB base address */ #define MB_BASE (0x40058000u) /** Peripheral MB base pointer */ #define MB ((MB_Type *)MB_BASE) /** Array initializer of MB peripheral base addresses */ #define MB_BASE_ADDRS {MB_BASE} /** Array initializer of MB peripheral base pointers */ #define MB_BASE_PTRS {MB} // need fill by yourself ///** Number of interrupt vector arrays for the MB module. */ //#define MB_IRQS_ARR_COUNT (1u) ///** Number of interrupt channels for the MB module. */ //#define MB_IRQS_CH_COUNT (1u) ///** Interrupt vectors for the MB peripheral type */ //#define MB_IRQS {MB_IRQn} /* ---------------------------------------------------------------------------- -- MB Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup MB_Register_Masks MB Register Masks * @{ */ /* CCn_SEMA Bit Fields */ #define MB_CCn_SEMA_LOCK_MASK 0x80000000u #define MB_CCn_SEMA_LOCK_SHIFT 31u #define MB_CCn_SEMA_LOCK_WIDTH 1u #define MB_CCn_SEMA_LOCK(x) (((uint32_t)(((uint32_t)(x))<