/* ** ################################################################### ** Compilers: Keil ARM C/C++ Compiler ** Freescale C/C++ for Embedded ARM ** GNU C Compiler ** GNU C Compiler - CodeSourcery Sourcery G++ ** IAR ANSI C/C++ Compiler for ARM ** ** Reference manual: KEA128RM, Rev. 22, Jun 2014 ** Version: rev. 1.4, 2015-07-24 ** Build: b150730 ** ** Abstract: ** CMSIS Peripheral Access Layer for SKEAZ1284 ** ** Copyright (c) 1997 - 2015 Freescale Semiconductor, Inc. ** All rights reserved. ** ** Redistribution and use in source and binary forms, with or without modification, ** are permitted provided that the following conditions are met: ** ** o Redistributions of source code must retain the above copyright notice, this list ** of conditions and the following disclaimer. ** ** o Redistributions in binary form must reproduce the above copyright notice, this ** list of conditions and the following disclaimer in the documentation and/or ** other materials provided with the distribution. ** ** o Neither the name of Freescale Semiconductor, Inc. nor the names of its ** contributors may be used to endorse or promote products derived from this ** software without specific prior written permission. ** ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ** ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED ** WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE ** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ** ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ** (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ** LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ** ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ** http: www.freescale.com ** mail: support@freescale.com ** ** Revisions: ** - rev. 1.0 (2013-07-30) ** Initial version. ** - rev. 1.1 (2013-10-29) ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled. ** - rev. 1.2 (2014-01-10) ** CAN - Corrected address of TSIDR1 register. ** CAN - Corrected name of MSCAN_TDLR bit DLC to TDLC. ** FTM0 - Added access macro for EXTTRIG register. ** NVIC - Registers access macros improved. ** SCB - Unused bits removed, mask, shift macros improved. ** Defines of interrupt vectors aligned to RM. ** - rev. 1.3 (2014-06-18) ** The declaration of clock configurations has been moved to separate header file system_MKE02Z2.h ** Module access macro {module}_BASES replaced by {module}_BASE_PTRS. ** I2C - Renamed status register S to S1 to match RM naming. ** Renamed interrupts: INT_PMC to INT_LVD_LVW, INT_ADC to ADC0,INT_WDOG to INT_Watchdog. ** - rev. 1.4 (2015-07-24) ** Correction of backward compatibility. ** ** ################################################################### */ /*! * @file SKEAZ1284.h * @version 1.4 * @date 2015-07-24 * @brief CMSIS Peripheral Access Layer for SKEAZ1284 * * CMSIS Peripheral Access Layer for SKEAZ1284 */ /* ---------------------------------------------------------------------------- -- MCU activation ---------------------------------------------------------------------------- */ /* Prevention from multiple including the same memory map */ #if !defined(SKEAZ1284_H_) /* Check if memory map has not been already included */ #define SKEAZ1284_H_ #define MCU_SKEAZ1284 /* Check if another memory map has not been also included */ #if (defined(MCU_ACTIVE)) #error SKEAZ1284 memory map: There is already included another memory map. Only one memory map can be included. #endif /* (defined(MCU_ACTIVE)) */ #define MCU_ACTIVE #include /** Memory map major version (memory maps with equal major version number are * compatible) */ #define MCU_MEM_MAP_VERSION 0x0100u /** Memory map minor version */ #define MCU_MEM_MAP_VERSION_MINOR 0x0004u /* ---------------------------------------------------------------------------- -- Interrupt vector numbers ---------------------------------------------------------------------------- */ /*! * @addtogroup Interrupt_vector_numbers Interrupt vector numbers * @{ */ /** Interrupt Number Definitions */ #define NUMBER_OF_INT_VECTORS 48 /**< Number of interrupts in the Vector table */ typedef enum IRQn { /* Core interrupts */ NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */ HardFault_IRQn = -13, /**< Cortex-M0 SV Hard Fault Interrupt */ SVCall_IRQn = -5, /**< Cortex-M0 SV Call Interrupt */ PendSV_IRQn = -2, /**< Cortex-M0 Pend SV Interrupt */ SysTick_IRQn = -1, /**< Cortex-M0 System Tick Interrupt */ /* Device specific interrupts */ Reserved16_IRQn = 0, /**< Reserved interrupt */ Reserved17_IRQn = 1, /**< Reserved interrupt */ Reserved18_IRQn = 2, /**< Reserved interrupt */ Reserved19_IRQn = 3, /**< Reserved interrupt */ Reserved20_IRQn = 4, /**< Reserved interrupt */ FTMRE_IRQn = 5, /**< FTMRE command complete */ LVD_LVW_IRQn = 6, /**< Low-voltage warning */ IRQ_IRQn = 7, /**< External interrupt */ I2C0_IRQn = 8, /**< I2C0 single interrupt vector for all sources */ I2C1_IRQn = 9, /**< I2C1 single interrupt vector for all sources */ SPI0_IRQn = 10, /**< SPI0 single interrupt vector for all sources */ SPI1_IRQn = 11, /**< SPI1 single interrupt vector for all sources */ UART0_IRQn = 12, /**< UART0 status and error */ UART1_IRQn = 13, /**< UART1 status and error */ UART2_IRQn = 14, /**< UART2 status and error */ ADC0_IRQn = 15, /**< ADC conversion complete interrupt */ ACMP0_IRQn = 16, /**< ACMP0 interrupt */ FTM0_IRQn = 17, /**< FTM0 single interrupt vector for all sources */ FTM1_IRQn = 18, /**< FTM1 single interrupt vector for all sources */ FTM2_IRQn = 19, /**< FTM2 single interrupt vector for all sources */ RTC_IRQn = 20, /**< RTC overflow */ ACMP1_IRQn = 21, /**< ACMP1 interrupt */ PIT0_IRQn = 22, /**< PIT CH0 overflow */ PIT1_IRQn = 23, /**< PIT CH1 overflow */ KBI0_IRQn = 24, /**< KBI0 interrupt */ KBI1_IRQn = 25, /**< KBI1 interrupt */ Reserved42_IRQn = 26, /**< Reserved interrupt */ ICS_IRQn = 27, /**< Clock loss of lock */ WDOG_EWM_IRQn = 28, /**< Watchdog timeout */ PWT_IRQn = 29, /**< PWT interrupt */ MSCAN_RX_IRQn = 30, /**< MSCAN Rx interrupt */ MSCAN_TX_IRQn = 31 /**< MSCAN Tx, Err and Wake-up interrupt */ } IRQn_Type; /*! * @} */ /* end of group Interrupt_vector_numbers */ /* ---------------------------------------------------------------------------- -- Cortex M0 Core Configuration ---------------------------------------------------------------------------- */ /*! * @addtogroup Cortex_Core_Configuration Cortex M0 Core Configuration * @{ */ #define __CM0PLUS_REV 0x0000 /**< Core revision r0p0 */ #define __MPU_PRESENT 0 /**< Defines if an MPU is present or not */ #define __VTOR_PRESENT 1 /**< Defines if an MPU is present or not */ #define __NVIC_PRIO_BITS 2 /**< Number of priority bits implemented in the NVIC */ #define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */ #include "core_cm0plus.h" /* Core Peripheral Access Layer */ #include "system_SKEAZ1284.h" /* Device specific configuration file */ /*! * @} */ /* end of group Cortex_Core_Configuration */ /* ---------------------------------------------------------------------------- -- Device Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup Peripheral_access_layer Device Peripheral Access Layer * @{ */ /* ** Start of section using anonymous unions */ #if defined(__ARMCC_VERSION) #pragma push #pragma anon_unions #elif defined(__CWCC__) #pragma push #pragma cpp_extensions on #elif defined(__GNUC__) /* anonymous unions are enabled by default */ #elif defined(__IAR_SYSTEMS_ICC__) #pragma language=extended #elif defined(__ghs__) /* GreenHills */ #else #error Not supported compiler type #endif /* ---------------------------------------------------------------------------- -- ACMP Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup ACMP_Peripheral_Access_Layer ACMP Peripheral Access Layer * @{ */ /** ACMP - Register Layout Typedef */ typedef struct { __IO uint8_t CS; /**< ACMP Control and Status Register, offset: 0x0 */ __IO uint8_t C0; /**< ACMP Control Register 0, offset: 0x1 */ __IO uint8_t C1; /**< ACMP Control Register 1, offset: 0x2 */ __IO uint8_t C2; /**< ACMP Control Register 2, offset: 0x3 */ } ACMP_Type, *ACMP_MemMapPtr; /* ---------------------------------------------------------------------------- -- ACMP - Register accessor macros ---------------------------------------------------------------------------- */ /*! * @addtogroup ACMP_Register_Accessor_Macros ACMP - Register accessor macros * @{ */ /* ACMP - Register accessors */ #define ACMP_CS_REG(base) ((base)->CS) #define ACMP_C0_REG(base) ((base)->C0) #define ACMP_C1_REG(base) ((base)->C1) #define ACMP_C2_REG(base) ((base)->C2) /*! * @} */ /* end of group ACMP_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- ACMP Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup ACMP_Register_Masks ACMP Register Masks * @{ */ /* CS Bit Fields */ #define ACMP_CS_ACMOD_MASK 0x3u #define ACMP_CS_ACMOD_SHIFT 0 #define ACMP_CS_ACMOD_WIDTH 2 #define ACMP_CS_ACMOD(x) (((uint8_t)(((uint8_t)(x))<SC1) #define ADC_SC2_REG(base) ((base)->SC2) #define ADC_SC3_REG(base) ((base)->SC3) #define ADC_SC4_REG(base) ((base)->SC4) #define ADC_R_REG(base) ((base)->R) #define ADC_CV_REG(base) ((base)->CV) #define ADC_APCTL1_REG(base) ((base)->APCTL1) #define ADC_SC5_REG(base) ((base)->SC5) /*! * @} */ /* end of group ADC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- ADC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup ADC_Register_Masks ADC Register Masks * @{ */ /* SC1 Bit Fields */ #define ADC_SC1_ADCH_MASK 0x1Fu #define ADC_SC1_ADCH_SHIFT 0 #define ADC_SC1_ADCH_WIDTH 5 #define ADC_SC1_ADCH(x) (((uint32_t)(((uint32_t)(x))<ACCESS16BIT.DATAL) #define CRC_DATAH_REG(base) ((base)->ACCESS16BIT.DATAH) #define CRC_DATA_REG(base) ((base)->DATA) #define CRC_DATALL_REG(base) ((base)->ACCESS8BIT.DATALL) #define CRC_DATALU_REG(base) ((base)->ACCESS8BIT.DATALU) #define CRC_DATAHL_REG(base) ((base)->ACCESS8BIT.DATAHL) #define CRC_DATAHU_REG(base) ((base)->ACCESS8BIT.DATAHU) #define CRC_GPOLYL_REG(base) ((base)->GPOLY_ACCESS16BIT.GPOLYL) #define CRC_GPOLYH_REG(base) ((base)->GPOLY_ACCESS16BIT.GPOLYH) #define CRC_GPOLY_REG(base) ((base)->GPOLY) #define CRC_GPOLYLL_REG(base) ((base)->GPOLY_ACCESS8BIT.GPOLYLL) #define CRC_GPOLYLU_REG(base) ((base)->GPOLY_ACCESS8BIT.GPOLYLU) #define CRC_GPOLYHL_REG(base) ((base)->GPOLY_ACCESS8BIT.GPOLYHL) #define CRC_GPOLYHU_REG(base) ((base)->GPOLY_ACCESS8BIT.GPOLYHU) #define CRC_CTRL_REG(base) ((base)->CTRL) #define CRC_CTRLHU_REG(base) ((base)->CTRL_ACCESS8BIT.CTRLHU) /*! * @} */ /* end of group CRC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- CRC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup CRC_Register_Masks CRC Register Masks * @{ */ /* DATAL Bit Fields */ #define CRC_DATAL_DATAL_MASK 0xFFFFu #define CRC_DATAL_DATAL_SHIFT 0 #define CRC_DATAL_DATAL_WIDTH 16 #define CRC_DATAL_DATAL(x) (((uint16_t)(((uint16_t)(x))<PDOR) #define FGPIO_PSOR_REG(base) ((base)->PSOR) #define FGPIO_PCOR_REG(base) ((base)->PCOR) #define FGPIO_PTOR_REG(base) ((base)->PTOR) #define FGPIO_PDIR_REG(base) ((base)->PDIR) #define FGPIO_PDDR_REG(base) ((base)->PDDR) #define FGPIO_PIDR_REG(base) ((base)->PIDR) /*! * @} */ /* end of group FGPIO_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- FGPIO Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup FGPIO_Register_Masks FGPIO Register Masks * @{ */ /* PDOR Bit Fields */ #define FGPIO_PDOR_PDO_MASK 0xFFFFFFFFu #define FGPIO_PDOR_PDO_SHIFT 0 #define FGPIO_PDOR_PDO_WIDTH 32 #define FGPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x))<SC) #define FTM_CNT_REG(base) ((base)->CNT) #define FTM_MOD_REG(base) ((base)->MOD) #define FTM_CnSC_REG(base,index) ((base)->CONTROLS[index].CnSC) #define FTM_CnSC_COUNT 6 #define FTM_CnV_REG(base,index) ((base)->CONTROLS[index].CnV) #define FTM_CnV_COUNT 6 #define FTM_CNTIN_REG(base) ((base)->CNTIN) #define FTM_STATUS_REG(base) ((base)->STATUS) #define FTM_MODE_REG(base) ((base)->MODE) #define FTM_SYNC_REG(base) ((base)->SYNC) #define FTM_OUTINIT_REG(base) ((base)->OUTINIT) #define FTM_OUTMASK_REG(base) ((base)->OUTMASK) #define FTM_COMBINE_REG(base) ((base)->COMBINE) #define FTM_DEADTIME_REG(base) ((base)->DEADTIME) #define FTM_EXTTRIG_REG(base) ((base)->EXTTRIG) #define FTM_POL_REG(base) ((base)->POL) #define FTM_FMS_REG(base) ((base)->FMS) #define FTM_FILTER_REG(base) ((base)->FILTER) #define FTM_FLTCTRL_REG(base) ((base)->FLTCTRL) #define FTM_CONF_REG(base) ((base)->CONF) #define FTM_FLTPOL_REG(base) ((base)->FLTPOL) #define FTM_SYNCONF_REG(base) ((base)->SYNCONF) #define FTM_INVCTRL_REG(base) ((base)->INVCTRL) #define FTM_SWOCTRL_REG(base) ((base)->SWOCTRL) #define FTM_PWMLOAD_REG(base) ((base)->PWMLOAD) /*! * @} */ /* end of group FTM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- FTM Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup FTM_Register_Masks FTM Register Masks * @{ */ /* SC Bit Fields */ #define FTM_SC_PS_MASK 0x7u #define FTM_SC_PS_SHIFT 0 #define FTM_SC_PS_WIDTH 3 #define FTM_SC_PS(x) (((uint32_t)(((uint32_t)(x))<FCCOBIX) #define FTMRE_FSEC_REG(base) ((base)->FSEC) #define FTMRE_FCLKDIV_REG(base) ((base)->FCLKDIV) #define FTMRE_FSTAT_REG(base) ((base)->FSTAT) #define FTMRE_FCNFG_REG(base) ((base)->FCNFG) #define FTMRE_FCCOBLO_REG(base) ((base)->FCCOBLO) #define FTMRE_FCCOBHI_REG(base) ((base)->FCCOBHI) #define FTMRE_FPROT_REG(base) ((base)->FPROT) #define FTMRE_FOPT_REG(base) ((base)->FOPT) /*! * @} */ /* end of group FTMRE_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- FTMRE Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup FTMRE_Register_Masks FTMRE Register Masks * @{ */ /* FCCOBIX Bit Fields */ #define FTMRE_FCCOBIX_CCOBIX_MASK 0x7u #define FTMRE_FCCOBIX_CCOBIX_SHIFT 0 #define FTMRE_FCCOBIX_CCOBIX_WIDTH 3 #define FTMRE_FCCOBIX_CCOBIX(x) (((uint8_t)(((uint8_t)(x))<PDOR) #define GPIO_PSOR_REG(base) ((base)->PSOR) #define GPIO_PCOR_REG(base) ((base)->PCOR) #define GPIO_PTOR_REG(base) ((base)->PTOR) #define GPIO_PDIR_REG(base) ((base)->PDIR) #define GPIO_PDDR_REG(base) ((base)->PDDR) #define GPIO_PIDR_REG(base) ((base)->PIDR) /*! * @} */ /* end of group GPIO_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- GPIO Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup GPIO_Register_Masks GPIO Register Masks * @{ */ /* PDOR Bit Fields */ #define GPIO_PDOR_PDO_MASK 0xFFFFFFFFu #define GPIO_PDOR_PDO_SHIFT 0 #define GPIO_PDOR_PDO_WIDTH 32 #define GPIO_PDOR_PDO(x) (((uint32_t)(((uint32_t)(x))<A1) #define I2C_F_REG(base) ((base)->F) #define I2C_C1_REG(base) ((base)->C1) #define I2C_S1_REG(base) ((base)->S1) #define I2C_D_REG(base) ((base)->D) #define I2C_C2_REG(base) ((base)->C2) #define I2C_FLT_REG(base) ((base)->FLT) #define I2C_RA_REG(base) ((base)->RA) #define I2C_SMB_REG(base) ((base)->SMB) #define I2C_A2_REG(base) ((base)->A2) #define I2C_SLTH_REG(base) ((base)->SLTH) #define I2C_SLTL_REG(base) ((base)->SLTL) /*! * @} */ /* end of group I2C_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- I2C Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup I2C_Register_Masks I2C Register Masks * @{ */ /* A1 Bit Fields */ #define I2C_A1_AD_MASK 0xFEu #define I2C_A1_AD_SHIFT 1 #define I2C_A1_AD_WIDTH 7 #define I2C_A1_AD(x) (((uint8_t)(((uint8_t)(x))<C1) #define ICS_C2_REG(base) ((base)->C2) #define ICS_C3_REG(base) ((base)->C3) #define ICS_C4_REG(base) ((base)->C4) #define ICS_S_REG(base) ((base)->S) /*! * @} */ /* end of group ICS_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- ICS Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup ICS_Register_Masks ICS Register Masks * @{ */ /* C1 Bit Fields */ #define ICS_C1_IREFSTEN_MASK 0x1u #define ICS_C1_IREFSTEN_SHIFT 0 #define ICS_C1_IREFSTEN_WIDTH 1 #define ICS_C1_IREFSTEN(x) (((uint8_t)(((uint8_t)(x))<SC) /*! * @} */ /* end of group IRQ_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- IRQ Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup IRQ_Register_Masks IRQ Register Masks * @{ */ /* SC Bit Fields */ #define IRQ_SC_IRQMOD_MASK 0x1u #define IRQ_SC_IRQMOD_SHIFT 0 #define IRQ_SC_IRQMOD_WIDTH 1 #define IRQ_SC_IRQMOD(x) (((uint8_t)(((uint8_t)(x))<PE) #define KBI_ES_REG(base) ((base)->ES) #define KBI_SC_REG(base) ((base)->SC) #define KBI_SP_REG(base) ((base)->SP) /*! * @} */ /* end of group KBI_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- KBI Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup KBI_Register_Masks KBI Register Masks * @{ */ /* PE Bit Fields */ #define KBI_PE_KBIPE_MASK 0xFFFFFFFFu #define KBI_PE_KBIPE_SHIFT 0 #define KBI_PE_KBIPE_WIDTH 32 #define KBI_PE_KBIPE(x) (((uint32_t)(((uint32_t)(x))<PLASC) #define MCM_PLAMC_REG(base) ((base)->PLAMC) #define MCM_PLACR_REG(base) ((base)->PLACR) /*! * @} */ /* end of group MCM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- MCM Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup MCM_Register_Masks MCM Register Masks * @{ */ /* PLASC Bit Fields */ #define MCM_PLASC_ASC_MASK 0xFFu #define MCM_PLASC_ASC_SHIFT 0 #define MCM_PLASC_ASC_WIDTH 8 #define MCM_PLASC_ASC(x) (((uint16_t)(((uint16_t)(x))<CANCTL0) #define MSCAN_CANCTL1_REG(base) ((base)->CANCTL1) #define MSCAN_CANBTR0_REG(base) ((base)->CANBTR0) #define MSCAN_CANBTR1_REG(base) ((base)->CANBTR1) #define MSCAN_CANRFLG_REG(base) ((base)->CANRFLG) #define MSCAN_CANRIER_REG(base) ((base)->CANRIER) #define MSCAN_CANTFLG_REG(base) ((base)->CANTFLG) #define MSCAN_CANTIER_REG(base) ((base)->CANTIER) #define MSCAN_CANTARQ_REG(base) ((base)->CANTARQ) #define MSCAN_CANTAAK_REG(base) ((base)->CANTAAK) #define MSCAN_CANTBSEL_REG(base) ((base)->CANTBSEL) #define MSCAN_CANIDAC_REG(base) ((base)->CANIDAC) #define MSCAN_CANMISC_REG(base) ((base)->CANMISC) #define MSCAN_CANRXERR_REG(base) ((base)->CANRXERR) #define MSCAN_CANTXERR_REG(base) ((base)->CANTXERR) #define MSCAN_CANIDAR_BANK_1_REG(base,index) ((base)->CANIDAR_BANK_1[index]) #define MSCAN_CANIDAR_BANK_1_COUNT 4 #define MSCAN_CANIDMR_BANK_1_REG(base,index) ((base)->CANIDMR_BANK_1[index]) #define MSCAN_CANIDMR_BANK_1_COUNT 4 #define MSCAN_CANIDAR_BANK_2_REG(base,index) ((base)->CANIDAR_BANK_2[index]) #define MSCAN_CANIDAR_BANK_2_COUNT 4 #define MSCAN_CANIDMR_BANK_2_REG(base,index) ((base)->CANIDMR_BANK_2[index]) #define MSCAN_CANIDMR_BANK_2_COUNT 4 #define MSCAN_REIDR0_REG(base) ((base)->REIDR0) #define MSCAN_RSIDR0_REG(base) ((base)->RSIDR0) #define MSCAN_REIDR1_REG(base) ((base)->REIDR1) #define MSCAN_RSIDR1_REG(base) ((base)->RSIDR1) #define MSCAN_REIDR2_REG(base) ((base)->REIDR2) #define MSCAN_REIDR3_REG(base) ((base)->REIDR3) #define MSCAN_REDSR_REG(base,index) ((base)->REDSR[index]) #define MSCAN_REDSR_COUNT 8 #define MSCAN_RDLR_REG(base) ((base)->RDLR) #define MSCAN_RTSRH_REG(base) ((base)->RTSRH) #define MSCAN_RTSRL_REG(base) ((base)->RTSRL) #define MSCAN_TEIDR0_REG(base) ((base)->TEIDR0) #define MSCAN_TSIDR0_REG(base) ((base)->TSIDR0) #define MSCAN_TEIDR1_REG(base) ((base)->TEIDR1) #define MSCAN_TSIDR1_REG(base) ((base)->TSIDR1) #define MSCAN_TEIDR2_REG(base) ((base)->TEIDR2) #define MSCAN_TEIDR3_REG(base) ((base)->TEIDR3) #define MSCAN_TEDSR_REG(base,index) ((base)->TEDSR[index]) #define MSCAN_TEDSR_COUNT 8 #define MSCAN_TDLR_REG(base) ((base)->TDLR) #define MSCAN_TBPR_REG(base) ((base)->TBPR) #define MSCAN_TTSRH_REG(base) ((base)->TTSRH) #define MSCAN_TTSRL_REG(base) ((base)->TTSRL) /*! * @} */ /* end of group MSCAN_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- MSCAN Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup MSCAN_Register_Masks MSCAN Register Masks * @{ */ /* CANCTL0 Bit Fields */ #define MSCAN_CANCTL0_INITRQ_MASK 0x1u #define MSCAN_CANCTL0_INITRQ_SHIFT 0 #define MSCAN_CANCTL0_INITRQ_WIDTH 1 #define MSCAN_CANCTL0_INITRQ(x) (((uint8_t)(((uint8_t)(x))<BACKKEY0) #define NV_BACKKEY1_REG(base) ((base)->BACKKEY1) #define NV_BACKKEY2_REG(base) ((base)->BACKKEY2) #define NV_BACKKEY3_REG(base) ((base)->BACKKEY3) #define NV_BACKKEY4_REG(base) ((base)->BACKKEY4) #define NV_BACKKEY5_REG(base) ((base)->BACKKEY5) #define NV_BACKKEY6_REG(base) ((base)->BACKKEY6) #define NV_BACKKEY7_REG(base) ((base)->BACKKEY7) #define NV_FPROT_REG(base) ((base)->FPROT) #define NV_FSEC_REG(base) ((base)->FSEC) #define NV_FOPT_REG(base) ((base)->FOPT) /*! * @} */ /* end of group NV_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- NV Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup NV_Register_Masks NV Register Masks * @{ */ /* BACKKEY0 Bit Fields */ #define NV_BACKKEY0_KEY_MASK 0xFFu #define NV_BACKKEY0_KEY_SHIFT 0 #define NV_BACKKEY0_KEY_WIDTH 8 #define NV_BACKKEY0_KEY(x) (((uint8_t)(((uint8_t)(x))<CR) /*! * @} */ /* end of group OSC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- OSC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup OSC_Register_Masks OSC Register Masks * @{ */ /* CR Bit Fields */ #define OSC_CR_OSCINIT_MASK 0x1u #define OSC_CR_OSCINIT_SHIFT 0 #define OSC_CR_OSCINIT_WIDTH 1 #define OSC_CR_OSCINIT(x) (((uint8_t)(((uint8_t)(x))<MCR) #define PIT_LDVAL_REG(base,index) ((base)->CHANNEL[index].LDVAL) #define PIT_LDVAL_COUNT 2 #define PIT_CVAL_REG(base,index) ((base)->CHANNEL[index].CVAL) #define PIT_CVAL_COUNT 2 #define PIT_TCTRL_REG(base,index) ((base)->CHANNEL[index].TCTRL) #define PIT_TCTRL_COUNT 2 #define PIT_TFLG_REG(base,index) ((base)->CHANNEL[index].TFLG) #define PIT_TFLG_COUNT 2 /*! * @} */ /* end of group PIT_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PIT Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup PIT_Register_Masks PIT Register Masks * @{ */ /* MCR Bit Fields */ #define PIT_MCR_FRZ_MASK 0x1u #define PIT_MCR_FRZ_SHIFT 0 #define PIT_MCR_FRZ_WIDTH 1 #define PIT_MCR_FRZ(x) (((uint32_t)(((uint32_t)(x))<SPMSC1) #define PMC_SPMSC2_REG(base) ((base)->SPMSC2) /*! * @} */ /* end of group PMC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PMC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup PMC_Register_Masks PMC Register Masks * @{ */ /* SPMSC1 Bit Fields */ #define PMC_SPMSC1_BGBE_MASK 0x1u #define PMC_SPMSC1_BGBE_SHIFT 0 #define PMC_SPMSC1_BGBE_WIDTH 1 #define PMC_SPMSC1_BGBE(x) (((uint8_t)(((uint8_t)(x))<IOFLT0) #define PORT_IOFLT1_REG(base) ((base)->IOFLT1) #define PORT_PUE0_REG(base) ((base)->PUE0) #define PORT_PUE1_REG(base) ((base)->PUE1) #define PORT_PUE2_REG(base) ((base)->PUE2) #define PORT_HDRVE_REG(base) ((base)->HDRVE) /*! * @} */ /* end of group PORT_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PORT Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup PORT_Register_Masks PORT Register Masks * @{ */ /* IOFLT0 Bit Fields */ #define PORT_IOFLT0_FLTA_MASK 0x3u #define PORT_IOFLT0_FLTA_SHIFT 0 #define PORT_IOFLT0_FLTA_WIDTH 2 #define PORT_IOFLT0_FLTA(x) (((uint32_t)(((uint32_t)(x))<R1) #define PWT_R2_REG(base) ((base)->R2) /*! * @} */ /* end of group PWT_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PWT Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup PWT_Register_Masks PWT Register Masks * @{ */ /* R1 Bit Fields */ #define PWT_R1_PWTOV_MASK 0x1u #define PWT_R1_PWTOV_SHIFT 0 #define PWT_R1_PWTOV_WIDTH 1 #define PWT_R1_PWTOV(x) (((uint32_t)(((uint32_t)(x))<ENTRY[index]) #define ROM_ENTRY_COUNT 1 #define ROM_TABLEMARK_REG(base) ((base)->TABLEMARK) #define ROM_SYSACCESS_REG(base) ((base)->SYSACCESS) #define ROM_PERIPHID4_REG(base) ((base)->PERIPHID4) #define ROM_PERIPHID5_REG(base) ((base)->PERIPHID5) #define ROM_PERIPHID6_REG(base) ((base)->PERIPHID6) #define ROM_PERIPHID7_REG(base) ((base)->PERIPHID7) #define ROM_PERIPHID0_REG(base) ((base)->PERIPHID0) #define ROM_PERIPHID1_REG(base) ((base)->PERIPHID1) #define ROM_PERIPHID2_REG(base) ((base)->PERIPHID2) #define ROM_PERIPHID3_REG(base) ((base)->PERIPHID3) #define ROM_COMPID_REG(base,index) ((base)->COMPID[index]) #define ROM_COMPID_COUNT 4 /*! * @} */ /* end of group ROM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- ROM Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup ROM_Register_Masks ROM Register Masks * @{ */ /* ENTRY Bit Fields */ #define ROM_ENTRY_ENTRY_MASK 0xFFFFFFFFu #define ROM_ENTRY_ENTRY_SHIFT 0 #define ROM_ENTRY_ENTRY_WIDTH 32 #define ROM_ENTRY_ENTRY(x) (((uint32_t)(((uint32_t)(x))<SC) #define RTC_MOD_REG(base) ((base)->MOD) #define RTC_CNT_REG(base) ((base)->CNT) /*! * @} */ /* end of group RTC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- RTC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup RTC_Register_Masks RTC Register Masks * @{ */ /* SC Bit Fields */ #define RTC_SC_RTCO_MASK 0x10u #define RTC_SC_RTCO_SHIFT 4 #define RTC_SC_RTCO_WIDTH 1 #define RTC_SC_RTCO(x) (((uint32_t)(((uint32_t)(x))<SRSID) #define SIM_SOPT0_REG(base) ((base)->SOPT0) #define SIM_SOPT1_REG(base) ((base)->SOPT1) #define SIM_PINSEL_REG(base) ((base)->PINSEL) #define SIM_PINSEL1_REG(base) ((base)->PINSEL1) #define SIM_SCGC_REG(base) ((base)->SCGC) #define SIM_UUIDL_REG(base) ((base)->UUIDL) #define SIM_UUIDML_REG(base) ((base)->UUIDML) #define SIM_UUIDMH_REG(base) ((base)->UUIDMH) #define SIM_CLKDIV_REG(base) ((base)->CLKDIV) /*! * @} */ /* end of group SIM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SIM Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup SIM_Register_Masks SIM Register Masks * @{ */ /* SRSID Bit Fields */ #define SIM_SRSID_LVD_MASK 0x2u #define SIM_SRSID_LVD_SHIFT 1 #define SIM_SRSID_LVD_WIDTH 1 #define SIM_SRSID_LVD(x) (((uint32_t)(((uint32_t)(x))<C1) #define SPI_C2_REG(base) ((base)->C2) #define SPI_BR_REG(base) ((base)->BR) #define SPI_S_REG(base) ((base)->S) #define SPI_D_REG(base) ((base)->D) #define SPI_M_REG(base) ((base)->M) /*! * @} */ /* end of group SPI_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SPI Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup SPI_Register_Masks SPI Register Masks * @{ */ /* C1 Bit Fields */ #define SPI_C1_LSBFE_MASK 0x1u #define SPI_C1_LSBFE_SHIFT 0 #define SPI_C1_LSBFE_WIDTH 1 #define SPI_C1_LSBFE(x) (((uint8_t)(((uint8_t)(x))<BDH) #define UART_BDL_REG(base) ((base)->BDL) #define UART_C1_REG(base) ((base)->C1) #define UART_C2_REG(base) ((base)->C2) #define UART_S1_REG(base) ((base)->S1) #define UART_S2_REG(base) ((base)->S2) #define UART_C3_REG(base) ((base)->C3) #define UART_D_REG(base) ((base)->D) /*! * @} */ /* end of group UART_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- UART Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup UART_Register_Masks UART Register Masks * @{ */ /* BDH Bit Fields */ #define UART_BDH_SBR_MASK 0x1Fu #define UART_BDH_SBR_SHIFT 0 #define UART_BDH_SBR_WIDTH 5 #define UART_BDH_SBR(x) (((uint8_t)(((uint8_t)(x))<CS1) #define WDOG_CS2_REG(base) ((base)->CS2) #define WDOG_CNT_REG(base) ((base)->CNT) #define WDOG_CNTH_REG(base) ((base)->CNT8B.CNTH) #define WDOG_CNTL_REG(base) ((base)->CNT8B.CNTL) #define WDOG_TOVAL_REG(base) ((base)->TOVAL) #define WDOG_TOVALH_REG(base) ((base)->TOVAL8B.TOVALH) #define WDOG_TOVALL_REG(base) ((base)->TOVAL8B.TOVALL) #define WDOG_WIN_REG(base) ((base)->WIN) #define WDOG_WINH_REG(base) ((base)->WIN8B.WINH) #define WDOG_WINL_REG(base) ((base)->WIN8B.WINL) /*! * @} */ /* end of group WDOG_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- WDOG Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup WDOG_Register_Masks WDOG Register Masks * @{ */ /* CS1 Bit Fields */ #define WDOG_CS1_STOP_MASK 0x1u #define WDOG_CS1_STOP_SHIFT 0 #define WDOG_CS1_STOP_WIDTH 1 #define WDOG_CS1_STOP(x) (((uint8_t)(((uint8_t)(x))<