#ifndef DRIVER_CRC_H #define DRIVER_CRC_H /* ---------------------------------------------------------------------------- -- CRC Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup CRC_Peripheral_Access_Layer CRC Peripheral Access Layer * @{ */ /** CRC - Size of Registers Arrays */ /** CRC - Register Layout Typedef */ typedef struct { union { __IO uint32_t uDATA; /** CRC Data union */ struct { __IO uint16_t L; /** CRC_DATAL register., offset: 0x0 */ __IO uint16_t H; /** CRC_DATAH register., offset: 0x2 */ } tDATA_16; struct { __IO uint8_t LL; /** CRC_DATALL register., offset: 0x0 */ __IO uint8_t LU; /** CRC_DATALU register., offset: 0x1 */ __IO uint8_t HL; /** CRC_DATAHL register., offset: 0x2 */ __IO uint8_t HU; /** CRC_DATAHU register., offset: 0x3 */ } tDATA_8; } DATA; __IO uint32_t POLY ; /* CRC Polynomial Register, offset: 0x4 */ __IO uint32_t CR ; /* CRC Control Register, offset: 0x8 */ __IO uint32_t SDAT ; /* CRC Data Bit Swap Register, offset: 0xC */ } CRC_Type, *CRC_MemMapPtr; /** Number of instances of the CRC module. */ #define CRC_INSTANCE_COUNT (1u) /* CRC - Peripheral instance base addresses */ /** Peripheral CRC base address */ #define CRC_BASE (0x4002a000u) /** Peripheral CRC base pointer */ #define CRC ((CRC_Type *)CRC_BASE) /** Array initializer of CRC peripheral base addresses */ #define CRC_BASE_ADDRS {CRC_BASE} /** Array initializer of CRC peripheral base pointers */ #define CRC_BASE_PTRS {CRC} /* ---------------------------------------------------------------------------- -- CRC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup CRC_Register_Masks CRC Register Masks * @{ */ /* DATA Bit Fields */ #define CRC_DATA_HU_MASK 0xFF000000u #define CRC_DATA_HU_SHIFT 24u #define CRC_DATA_HU_WIDTH 8u #define CRC_DATA_HU(x) (((uint32_t)(((uint32_t)(x))<