/* ** ################################################################### ** 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: K22P121M120SF7RM, Rev. 1, March 24, 2014 ** Version: rev. 2.5, 2014-05-06 ** Build: b140604 ** ** Abstract: ** CMSIS Peripheral Access Layer for MK22F51212 ** ** Copyright (c) 1997 - 2014 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-23) ** Initial version. ** - rev. 1.1 (2013-09-17) ** RM rev. 0.4 update. ** - rev. 2.0 (2013-10-29) ** Register accessor macros added to the memory map. ** Symbols for Processor Expert memory map compatibility added to the memory map. ** Startup file for gcc has been updated according to CMSIS 3.2. ** System initialization updated. ** - rev. 2.1 (2013-10-30) ** Definition of BITBAND macros updated to support peripherals with 32-bit acces disabled. ** - rev. 2.2 (2013-12-20) ** Update according to reference manual rev. 0.6, ** - rev. 2.3 (2014-01-13) ** Update according to reference manual rev. 0.61, ** - rev. 2.4 (2014-02-10) ** The declaration of clock configurations has been moved to separate header file system_MK22F51212.h ** - rev. 2.5 (2014-05-06) ** Update according to reference manual rev. 1.0, ** Update of system and startup files. ** Module access macro module_BASES replaced by module_BASE_PTRS. ** ** ################################################################### */ /*! * @file MK22F51212.h * @version 2.5 * @date 2014-05-06 * @brief CMSIS Peripheral Access Layer for MK22F51212 * * CMSIS Peripheral Access Layer for MK22F51212 */ /* ---------------------------------------------------------------------------- -- MCU activation ---------------------------------------------------------------------------- */ /* Prevention from multiple including the same memory map */ #if !defined(MK22F51212_H_) /* Check if memory map has not been already included */ #define MK22F51212_H_ #define MCU_MK22F51212 /* Check if another memory map has not been also included */ #if (defined(MCU_ACTIVE)) #error MK22F51212 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 0x0200u /** Memory map minor version */ #define MCU_MEM_MAP_VERSION_MINOR 0x0005u /** * @brief Macro to calculate address of an aliased word in the peripheral * bitband area for a peripheral register and bit (bit band region 0x40000000 to * 0x400FFFFF). * @param Reg Register to access. * @param Bit Bit number to access. * @return Address of the aliased word in the peripheral bitband area. */ #define BITBAND_REGADDR(Reg,Bit) (0x42000000u + (32u*((uint32_t)&(Reg) - (uint32_t)0x40000000u)) + (4u*((uint32_t)(Bit)))) /** * @brief Macro to access a single bit of a peripheral register (bit band region * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can * be used for peripherals with 32bit access allowed. * @param Reg Register to access. * @param Bit Bit number to access. * @return Value of the targeted bit in the bit band region. */ #define BITBAND_REG32(Reg,Bit) (*((uint32_t volatile*)(BITBAND_REGADDR(Reg,Bit)))) #define BITBAND_REG(Reg,Bit) (BITBAND_REG32(Reg,Bit)) /** * @brief Macro to access a single bit of a peripheral register (bit band region * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can * be used for peripherals with 16bit access allowed. * @param Reg Register to access. * @param Bit Bit number to access. * @return Value of the targeted bit in the bit band region. */ #define BITBAND_REG16(Reg,Bit) (*((uint16_t volatile*)(BITBAND_REGADDR(Reg,Bit)))) /** * @brief Macro to access a single bit of a peripheral register (bit band region * 0x40000000 to 0x400FFFFF) using the bit-band alias region access. Can * be used for peripherals with 8bit access allowed. * @param Reg Register to access. * @param Bit Bit number to access. * @return Value of the targeted bit in the bit band region. */ #define BITBAND_REG8(Reg,Bit) (*((uint8_t volatile*)(BITBAND_REGADDR(Reg,Bit)))) /* ---------------------------------------------------------------------------- -- Interrupt vector numbers ---------------------------------------------------------------------------- */ /*! * @addtogroup Interrupt_vector_numbers Interrupt vector numbers * @{ */ /** Interrupt Number Definitions */ #define NUMBER_OF_INT_VECTORS 102 /**< Number of interrupts in the Vector table */ typedef enum IRQn { /* Core interrupts */ NonMaskableInt_IRQn = -14, /**< Non Maskable Interrupt */ HardFault_IRQn = -13, /**< Cortex-M4 SV Hard Fault Interrupt */ MemoryManagement_IRQn = -12, /**< Cortex-M4 Memory Management Interrupt */ BusFault_IRQn = -11, /**< Cortex-M4 Bus Fault Interrupt */ UsageFault_IRQn = -10, /**< Cortex-M4 Usage Fault Interrupt */ SVCall_IRQn = -5, /**< Cortex-M4 SV Call Interrupt */ DebugMonitor_IRQn = -4, /**< Cortex-M4 Debug Monitor Interrupt */ PendSV_IRQn = -2, /**< Cortex-M4 Pend SV Interrupt */ SysTick_IRQn = -1, /**< Cortex-M4 System Tick Interrupt */ /* Device specific interrupts */ DMA0_IRQn = 0, /**< DMA Channel 0 Transfer Complete */ DMA1_IRQn = 1, /**< DMA Channel 1 Transfer Complete */ DMA2_IRQn = 2, /**< DMA Channel 2 Transfer Complete */ DMA3_IRQn = 3, /**< DMA Channel 3 Transfer Complete */ DMA4_IRQn = 4, /**< DMA Channel 4 Transfer Complete */ DMA5_IRQn = 5, /**< DMA Channel 5 Transfer Complete */ DMA6_IRQn = 6, /**< DMA Channel 6 Transfer Complete */ DMA7_IRQn = 7, /**< DMA Channel 7 Transfer Complete */ DMA8_IRQn = 8, /**< DMA Channel 8 Transfer Complete */ DMA9_IRQn = 9, /**< DMA Channel 9 Transfer Complete */ DMA10_IRQn = 10, /**< DMA Channel 10 Transfer Complete */ DMA11_IRQn = 11, /**< DMA Channel 11 Transfer Complete */ DMA12_IRQn = 12, /**< DMA Channel 12 Transfer Complete */ DMA13_IRQn = 13, /**< DMA Channel 13 Transfer Complete */ DMA14_IRQn = 14, /**< DMA Channel 14 Transfer Complete */ DMA15_IRQn = 15, /**< DMA Channel 15 Transfer Complete */ DMA_Error_IRQn = 16, /**< DMA Error Interrupt */ MCM_IRQn = 17, /**< Normal Interrupt */ FTF_IRQn = 18, /**< FTFA Command complete interrupt */ Read_Collision_IRQn = 19, /**< Read Collision Interrupt */ LVD_LVW_IRQn = 20, /**< Low Voltage Detect, Low Voltage Warning */ LLW_IRQn = 21, /**< Low Leakage Wakeup */ Watchdog_IRQn = 22, /**< WDOG Interrupt */ RNG_IRQn = 23, /**< RNG Interrupt */ I2C0_IRQn = 24, /**< I2C0 interrupt */ I2C1_IRQn = 25, /**< I2C1 interrupt */ SPI0_IRQn = 26, /**< SPI0 Interrupt */ SPI1_IRQn = 27, /**< SPI1 Interrupt */ I2S0_Tx_IRQn = 28, /**< I2S0 transmit interrupt */ I2S0_Rx_IRQn = 29, /**< I2S0 receive interrupt */ LPUART0_IRQn = 30, /**< LPUART0 status/error interrupt */ UART0_RX_TX_IRQn = 31, /**< UART0 Receive/Transmit interrupt */ UART0_ERR_IRQn = 32, /**< UART0 Error interrupt */ UART1_RX_TX_IRQn = 33, /**< UART1 Receive/Transmit interrupt */ UART1_ERR_IRQn = 34, /**< UART1 Error interrupt */ UART2_RX_TX_IRQn = 35, /**< UART2 Receive/Transmit interrupt */ UART2_ERR_IRQn = 36, /**< UART2 Error interrupt */ Reserved53_IRQn = 37, /**< Reserved interrupt 53 */ Reserved54_IRQn = 38, /**< Reserved interrupt 54 */ ADC0_IRQn = 39, /**< ADC0 interrupt */ CMP0_IRQn = 40, /**< CMP0 interrupt */ CMP1_IRQn = 41, /**< CMP1 interrupt */ FTM0_IRQn = 42, /**< FTM0 fault, overflow and channels interrupt */ FTM1_IRQn = 43, /**< FTM1 fault, overflow and channels interrupt */ FTM2_IRQn = 44, /**< FTM2 fault, overflow and channels interrupt */ Reserved61_IRQn = 45, /**< Reserved interrupt 61 */ RTC_IRQn = 46, /**< RTC interrupt */ RTC_Seconds_IRQn = 47, /**< RTC seconds interrupt */ PIT0_IRQn = 48, /**< PIT timer channel 0 interrupt */ PIT1_IRQn = 49, /**< PIT timer channel 1 interrupt */ PIT2_IRQn = 50, /**< PIT timer channel 2 interrupt */ PIT3_IRQn = 51, /**< PIT timer channel 3 interrupt */ PDB0_IRQn = 52, /**< PDB0 Interrupt */ USB0_IRQn = 53, /**< USB0 interrupt */ Reserved70_IRQn = 54, /**< Reserved interrupt 70 */ Reserved71_IRQn = 55, /**< Reserved interrupt 71 */ DAC0_IRQn = 56, /**< DAC0 interrupt */ MCG_IRQn = 57, /**< MCG Interrupt */ LPTimer_IRQn = 58, /**< LPTimer interrupt */ PORTA_IRQn = 59, /**< Port A interrupt */ PORTB_IRQn = 60, /**< Port B interrupt */ PORTC_IRQn = 61, /**< Port C interrupt */ PORTD_IRQn = 62, /**< Port D interrupt */ PORTE_IRQn = 63, /**< Port E interrupt */ SWI_IRQn = 64, /**< Software interrupt */ Reserved81_IRQn = 65, /**< Reserved interrupt 81 */ Reserved82_IRQn = 66, /**< Reserved interrupt 82 */ Reserved83_IRQn = 67, /**< Reserved interrupt 83 */ Reserved84_IRQn = 68, /**< Reserved interrupt 84 */ Reserved85_IRQn = 69, /**< Reserved interrupt 85 */ Reserved86_IRQn = 70, /**< Reserved interrupt 86 */ FTM3_IRQn = 71, /**< FTM3 fault, overflow and channels interrupt */ DAC1_IRQn = 72, /**< DAC1 interrupt */ ADC1_IRQn = 73, /**< ADC1 interrupt */ Reserved90_IRQn = 74, /**< Reserved Interrupt 90 */ Reserved91_IRQn = 75, /**< Reserved Interrupt 91 */ Reserved92_IRQn = 76, /**< Reserved Interrupt 92 */ Reserved93_IRQn = 77, /**< Reserved Interrupt 93 */ Reserved94_IRQn = 78, /**< Reserved Interrupt 94 */ Reserved95_IRQn = 79, /**< Reserved Interrupt 95 */ Reserved96_IRQn = 80, /**< Reserved Interrupt 96 */ Reserved97_IRQn = 81, /**< Reserved Interrupt 97 */ Reserved98_IRQn = 82, /**< Reserved Interrupt 98 */ Reserved99_IRQn = 83, /**< Reserved Interrupt 99 */ Reserved100_IRQn = 84, /**< Reserved Interrupt 100 */ Reserved101_IRQn = 85 /**< Reserved Interrupt 101 */ } IRQn_Type; /*! * @} */ /* end of group Interrupt_vector_numbers */ /* ---------------------------------------------------------------------------- -- Cortex M4 Core Configuration ---------------------------------------------------------------------------- */ /*! * @addtogroup Cortex_Core_Configuration Cortex M4 Core Configuration * @{ */ #define __MPU_PRESENT 0 /**< Defines if an MPU is present or not */ #define __NVIC_PRIO_BITS 4 /**< Number of priority bits implemented in the NVIC */ #define __Vendor_SysTickConfig 0 /**< Vendor specific implementation of SysTickConfig is defined */ #define __FPU_PRESENT 1 /**< Defines if an FPU is present or not */ #include "core_cm4.h" /* Core Peripheral Access Layer */ #include "system_MK22F51212.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 #else #error Not supported compiler type #endif /* ---------------------------------------------------------------------------- -- ADC Peripheral Access Layer ---------------------------------------------------------------------------- */ /*! * @addtogroup ADC_Peripheral_Access_Layer ADC Peripheral Access Layer * @{ */ /** ADC - Register Layout Typedef */ typedef struct { __IO uint32_t SC1[2]; /**< ADC Status and Control Registers 1, array offset: 0x0, array step: 0x4 */ __IO uint32_t CFG1; /**< ADC Configuration Register 1, offset: 0x8 */ __IO uint32_t CFG2; /**< ADC Configuration Register 2, offset: 0xC */ __I uint32_t R[2]; /**< ADC Data Result Register, array offset: 0x10, array step: 0x4 */ __IO uint32_t CV1; /**< Compare Value Registers, offset: 0x18 */ __IO uint32_t CV2; /**< Compare Value Registers, offset: 0x1C */ __IO uint32_t SC2; /**< Status and Control Register 2, offset: 0x20 */ __IO uint32_t SC3; /**< Status and Control Register 3, offset: 0x24 */ __IO uint32_t OFS; /**< ADC Offset Correction Register, offset: 0x28 */ __IO uint32_t PG; /**< ADC Plus-Side Gain Register, offset: 0x2C */ __IO uint32_t MG; /**< ADC Minus-Side Gain Register, offset: 0x30 */ __IO uint32_t CLPD; /**< ADC Plus-Side General Calibration Value Register, offset: 0x34 */ __IO uint32_t CLPS; /**< ADC Plus-Side General Calibration Value Register, offset: 0x38 */ __IO uint32_t CLP4; /**< ADC Plus-Side General Calibration Value Register, offset: 0x3C */ __IO uint32_t CLP3; /**< ADC Plus-Side General Calibration Value Register, offset: 0x40 */ __IO uint32_t CLP2; /**< ADC Plus-Side General Calibration Value Register, offset: 0x44 */ __IO uint32_t CLP1; /**< ADC Plus-Side General Calibration Value Register, offset: 0x48 */ __IO uint32_t CLP0; /**< ADC Plus-Side General Calibration Value Register, offset: 0x4C */ uint8_t RESERVED_0[4]; __IO uint32_t CLMD; /**< ADC Minus-Side General Calibration Value Register, offset: 0x54 */ __IO uint32_t CLMS; /**< ADC Minus-Side General Calibration Value Register, offset: 0x58 */ __IO uint32_t CLM4; /**< ADC Minus-Side General Calibration Value Register, offset: 0x5C */ __IO uint32_t CLM3; /**< ADC Minus-Side General Calibration Value Register, offset: 0x60 */ __IO uint32_t CLM2; /**< ADC Minus-Side General Calibration Value Register, offset: 0x64 */ __IO uint32_t CLM1; /**< ADC Minus-Side General Calibration Value Register, offset: 0x68 */ __IO uint32_t CLM0; /**< ADC Minus-Side General Calibration Value Register, offset: 0x6C */ } ADC_Type, *ADC_MemMapPtr; /* ---------------------------------------------------------------------------- -- ADC - Register accessor macros ---------------------------------------------------------------------------- */ /*! * @addtogroup ADC_Register_Accessor_Macros ADC - Register accessor macros * @{ */ /* ADC - Register accessors */ #define ADC_SC1_REG(base,index) ((base)->SC1[index]) #define ADC_CFG1_REG(base) ((base)->CFG1) #define ADC_CFG2_REG(base) ((base)->CFG2) #define ADC_R_REG(base,index) ((base)->R[index]) #define ADC_CV1_REG(base) ((base)->CV1) #define ADC_CV2_REG(base) ((base)->CV2) #define ADC_SC2_REG(base) ((base)->SC2) #define ADC_SC3_REG(base) ((base)->SC3) #define ADC_OFS_REG(base) ((base)->OFS) #define ADC_PG_REG(base) ((base)->PG) #define ADC_MG_REG(base) ((base)->MG) #define ADC_CLPD_REG(base) ((base)->CLPD) #define ADC_CLPS_REG(base) ((base)->CLPS) #define ADC_CLP4_REG(base) ((base)->CLP4) #define ADC_CLP3_REG(base) ((base)->CLP3) #define ADC_CLP2_REG(base) ((base)->CLP2) #define ADC_CLP1_REG(base) ((base)->CLP1) #define ADC_CLP0_REG(base) ((base)->CLP0) #define ADC_CLMD_REG(base) ((base)->CLMD) #define ADC_CLMS_REG(base) ((base)->CLMS) #define ADC_CLM4_REG(base) ((base)->CLM4) #define ADC_CLM3_REG(base) ((base)->CLM3) #define ADC_CLM2_REG(base) ((base)->CLM2) #define ADC_CLM1_REG(base) ((base)->CLM1) #define ADC_CLM0_REG(base) ((base)->CLM0) /*! * @} */ /* 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(x) (((uint32_t)(((uint32_t)(x))<CR0) #define CMP_CR1_REG(base) ((base)->CR1) #define CMP_FPR_REG(base) ((base)->FPR) #define CMP_SCR_REG(base) ((base)->SCR) #define CMP_DACCR_REG(base) ((base)->DACCR) #define CMP_MUXCR_REG(base) ((base)->MUXCR) /*! * @} */ /* end of group CMP_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- CMP Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup CMP_Register_Masks CMP Register Masks * @{ */ /* CR0 Bit Fields */ #define CMP_CR0_HYSTCTR_MASK 0x3u #define CMP_CR0_HYSTCTR_SHIFT 0 #define CMP_CR0_HYSTCTR(x) (((uint8_t)(((uint8_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(x) (((uint16_t)(((uint16_t)(x))<DAT[index].DATL) #define DAC_DATH_REG(base,index) ((base)->DAT[index].DATH) #define DAC_SR_REG(base) ((base)->SR) #define DAC_C0_REG(base) ((base)->C0) #define DAC_C1_REG(base) ((base)->C1) #define DAC_C2_REG(base) ((base)->C2) /*! * @} */ /* end of group DAC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- DAC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup DAC_Register_Masks DAC Register Masks * @{ */ /* DATL Bit Fields */ #define DAC_DATL_DATA0_MASK 0xFFu #define DAC_DATL_DATA0_SHIFT 0 #define DAC_DATL_DATA0(x) (((uint8_t)(((uint8_t)(x))<CR) #define DMA_ES_REG(base) ((base)->ES) #define DMA_ERQ_REG(base) ((base)->ERQ) #define DMA_EEI_REG(base) ((base)->EEI) #define DMA_CEEI_REG(base) ((base)->CEEI) #define DMA_SEEI_REG(base) ((base)->SEEI) #define DMA_CERQ_REG(base) ((base)->CERQ) #define DMA_SERQ_REG(base) ((base)->SERQ) #define DMA_CDNE_REG(base) ((base)->CDNE) #define DMA_SSRT_REG(base) ((base)->SSRT) #define DMA_CERR_REG(base) ((base)->CERR) #define DMA_CINT_REG(base) ((base)->CINT) #define DMA_INT_REG(base) ((base)->INT) #define DMA_ERR_REG(base) ((base)->ERR) #define DMA_HRS_REG(base) ((base)->HRS) #define DMA_EARS_REG(base) ((base)->EARS) #define DMA_DCHPRI3_REG(base) ((base)->DCHPRI3) #define DMA_DCHPRI2_REG(base) ((base)->DCHPRI2) #define DMA_DCHPRI1_REG(base) ((base)->DCHPRI1) #define DMA_DCHPRI0_REG(base) ((base)->DCHPRI0) #define DMA_DCHPRI7_REG(base) ((base)->DCHPRI7) #define DMA_DCHPRI6_REG(base) ((base)->DCHPRI6) #define DMA_DCHPRI5_REG(base) ((base)->DCHPRI5) #define DMA_DCHPRI4_REG(base) ((base)->DCHPRI4) #define DMA_DCHPRI11_REG(base) ((base)->DCHPRI11) #define DMA_DCHPRI10_REG(base) ((base)->DCHPRI10) #define DMA_DCHPRI9_REG(base) ((base)->DCHPRI9) #define DMA_DCHPRI8_REG(base) ((base)->DCHPRI8) #define DMA_DCHPRI15_REG(base) ((base)->DCHPRI15) #define DMA_DCHPRI14_REG(base) ((base)->DCHPRI14) #define DMA_DCHPRI13_REG(base) ((base)->DCHPRI13) #define DMA_DCHPRI12_REG(base) ((base)->DCHPRI12) #define DMA_SADDR_REG(base,index) ((base)->TCD[index].SADDR) #define DMA_SOFF_REG(base,index) ((base)->TCD[index].SOFF) #define DMA_ATTR_REG(base,index) ((base)->TCD[index].ATTR) #define DMA_NBYTES_MLNO_REG(base,index) ((base)->TCD[index].NBYTES_MLNO) #define DMA_NBYTES_MLOFFNO_REG(base,index) ((base)->TCD[index].NBYTES_MLOFFNO) #define DMA_NBYTES_MLOFFYES_REG(base,index) ((base)->TCD[index].NBYTES_MLOFFYES) #define DMA_SLAST_REG(base,index) ((base)->TCD[index].SLAST) #define DMA_DADDR_REG(base,index) ((base)->TCD[index].DADDR) #define DMA_DOFF_REG(base,index) ((base)->TCD[index].DOFF) #define DMA_CITER_ELINKNO_REG(base,index) ((base)->TCD[index].CITER_ELINKNO) #define DMA_CITER_ELINKYES_REG(base,index) ((base)->TCD[index].CITER_ELINKYES) #define DMA_DLAST_SGA_REG(base,index) ((base)->TCD[index].DLAST_SGA) #define DMA_CSR_REG(base,index) ((base)->TCD[index].CSR) #define DMA_BITER_ELINKNO_REG(base,index) ((base)->TCD[index].BITER_ELINKNO) #define DMA_BITER_ELINKYES_REG(base,index) ((base)->TCD[index].BITER_ELINKYES) /*! * @} */ /* end of group DMA_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- DMA Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup DMA_Register_Masks DMA Register Masks * @{ */ /* CR Bit Fields */ #define DMA_CR_EDBG_MASK 0x2u #define DMA_CR_EDBG_SHIFT 1 #define DMA_CR_ERCA_MASK 0x4u #define DMA_CR_ERCA_SHIFT 2 #define DMA_CR_HOE_MASK 0x10u #define DMA_CR_HOE_SHIFT 4 #define DMA_CR_HALT_MASK 0x20u #define DMA_CR_HALT_SHIFT 5 #define DMA_CR_CLM_MASK 0x40u #define DMA_CR_CLM_SHIFT 6 #define DMA_CR_EMLM_MASK 0x80u #define DMA_CR_EMLM_SHIFT 7 #define DMA_CR_ECX_MASK 0x10000u #define DMA_CR_ECX_SHIFT 16 #define DMA_CR_CX_MASK 0x20000u #define DMA_CR_CX_SHIFT 17 /* ES Bit Fields */ #define DMA_ES_DBE_MASK 0x1u #define DMA_ES_DBE_SHIFT 0 #define DMA_ES_SBE_MASK 0x2u #define DMA_ES_SBE_SHIFT 1 #define DMA_ES_SGE_MASK 0x4u #define DMA_ES_SGE_SHIFT 2 #define DMA_ES_NCE_MASK 0x8u #define DMA_ES_NCE_SHIFT 3 #define DMA_ES_DOE_MASK 0x10u #define DMA_ES_DOE_SHIFT 4 #define DMA_ES_DAE_MASK 0x20u #define DMA_ES_DAE_SHIFT 5 #define DMA_ES_SOE_MASK 0x40u #define DMA_ES_SOE_SHIFT 6 #define DMA_ES_SAE_MASK 0x80u #define DMA_ES_SAE_SHIFT 7 #define DMA_ES_ERRCHN_MASK 0xF00u #define DMA_ES_ERRCHN_SHIFT 8 #define DMA_ES_ERRCHN(x) (((uint32_t)(((uint32_t)(x))<CHCFG[index]) /*! * @} */ /* end of group DMAMUX_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- DMAMUX Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup DMAMUX_Register_Masks DMAMUX Register Masks * @{ */ /* CHCFG Bit Fields */ #define DMAMUX_CHCFG_SOURCE_MASK 0x3Fu #define DMAMUX_CHCFG_SOURCE_SHIFT 0 #define DMAMUX_CHCFG_SOURCE(x) (((uint8_t)(((uint8_t)(x))<CTRL) #define EWM_SERV_REG(base) ((base)->SERV) #define EWM_CMPL_REG(base) ((base)->CMPL) #define EWM_CMPH_REG(base) ((base)->CMPH) #define EWM_CLKPRESCALER_REG(base) ((base)->CLKPRESCALER) /*! * @} */ /* end of group EWM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- EWM Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup EWM_Register_Masks EWM Register Masks * @{ */ /* CTRL Bit Fields */ #define EWM_CTRL_EWMEN_MASK 0x1u #define EWM_CTRL_EWMEN_SHIFT 0 #define EWM_CTRL_ASSIN_MASK 0x2u #define EWM_CTRL_ASSIN_SHIFT 1 #define EWM_CTRL_INEN_MASK 0x4u #define EWM_CTRL_INEN_SHIFT 2 #define EWM_CTRL_INTEN_MASK 0x8u #define EWM_CTRL_INTEN_SHIFT 3 /* SERV Bit Fields */ #define EWM_SERV_SERVICE_MASK 0xFFu #define EWM_SERV_SERVICE_SHIFT 0 #define EWM_SERV_SERVICE(x) (((uint8_t)(((uint8_t)(x))<CS[index].CSAR) #define FB_CSMR_REG(base,index) ((base)->CS[index].CSMR) #define FB_CSCR_REG(base,index) ((base)->CS[index].CSCR) #define FB_CSPMCR_REG(base) ((base)->CSPMCR) /*! * @} */ /* end of group FB_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- FB Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup FB_Register_Masks FB Register Masks * @{ */ /* CSAR Bit Fields */ #define FB_CSAR_BA_MASK 0xFFFF0000u #define FB_CSAR_BA_SHIFT 16 #define FB_CSAR_BA(x) (((uint32_t)(((uint32_t)(x))<PFAPR) #define FMC_PFB0CR_REG(base) ((base)->PFB0CR) #define FMC_PFB1CR_REG(base) ((base)->PFB1CR) #define FMC_TAGVDW0S_REG(base,index) ((base)->TAGVDW0S[index]) #define FMC_TAGVDW1S_REG(base,index) ((base)->TAGVDW1S[index]) #define FMC_TAGVDW2S_REG(base,index) ((base)->TAGVDW2S[index]) #define FMC_TAGVDW3S_REG(base,index) ((base)->TAGVDW3S[index]) #define FMC_DATA_U_REG(base,index,index2) ((base)->SET[index][index2].DATA_U) #define FMC_DATA_L_REG(base,index,index2) ((base)->SET[index][index2].DATA_L) /*! * @} */ /* end of group FMC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- FMC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup FMC_Register_Masks FMC Register Masks * @{ */ /* PFAPR Bit Fields */ #define FMC_PFAPR_M0AP_MASK 0x3u #define FMC_PFAPR_M0AP_SHIFT 0 #define FMC_PFAPR_M0AP(x) (((uint32_t)(((uint32_t)(x))<FSTAT) #define FTFA_FCNFG_REG(base) ((base)->FCNFG) #define FTFA_FSEC_REG(base) ((base)->FSEC) #define FTFA_FOPT_REG(base) ((base)->FOPT) #define FTFA_FCCOB3_REG(base) ((base)->FCCOB3) #define FTFA_FCCOB2_REG(base) ((base)->FCCOB2) #define FTFA_FCCOB1_REG(base) ((base)->FCCOB1) #define FTFA_FCCOB0_REG(base) ((base)->FCCOB0) #define FTFA_FCCOB7_REG(base) ((base)->FCCOB7) #define FTFA_FCCOB6_REG(base) ((base)->FCCOB6) #define FTFA_FCCOB5_REG(base) ((base)->FCCOB5) #define FTFA_FCCOB4_REG(base) ((base)->FCCOB4) #define FTFA_FCCOBB_REG(base) ((base)->FCCOBB) #define FTFA_FCCOBA_REG(base) ((base)->FCCOBA) #define FTFA_FCCOB9_REG(base) ((base)->FCCOB9) #define FTFA_FCCOB8_REG(base) ((base)->FCCOB8) #define FTFA_FPROT3_REG(base) ((base)->FPROT3) #define FTFA_FPROT2_REG(base) ((base)->FPROT2) #define FTFA_FPROT1_REG(base) ((base)->FPROT1) #define FTFA_FPROT0_REG(base) ((base)->FPROT0) #define FTFA_XACCH3_REG(base) ((base)->XACCH3) #define FTFA_XACCH2_REG(base) ((base)->XACCH2) #define FTFA_XACCH1_REG(base) ((base)->XACCH1) #define FTFA_XACCH0_REG(base) ((base)->XACCH0) #define FTFA_XACCL3_REG(base) ((base)->XACCL3) #define FTFA_XACCL2_REG(base) ((base)->XACCL2) #define FTFA_XACCL1_REG(base) ((base)->XACCL1) #define FTFA_XACCL0_REG(base) ((base)->XACCL0) #define FTFA_SACCH3_REG(base) ((base)->SACCH3) #define FTFA_SACCH2_REG(base) ((base)->SACCH2) #define FTFA_SACCH1_REG(base) ((base)->SACCH1) #define FTFA_SACCH0_REG(base) ((base)->SACCH0) #define FTFA_SACCL3_REG(base) ((base)->SACCL3) #define FTFA_SACCL2_REG(base) ((base)->SACCL2) #define FTFA_SACCL1_REG(base) ((base)->SACCL1) #define FTFA_SACCL0_REG(base) ((base)->SACCL0) #define FTFA_FACSS_REG(base) ((base)->FACSS) #define FTFA_FACSN_REG(base) ((base)->FACSN) /*! * @} */ /* end of group FTFA_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- FTFA Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup FTFA_Register_Masks FTFA Register Masks * @{ */ /* FSTAT Bit Fields */ #define FTFA_FSTAT_MGSTAT0_MASK 0x1u #define FTFA_FSTAT_MGSTAT0_SHIFT 0 #define FTFA_FSTAT_FPVIOL_MASK 0x10u #define FTFA_FSTAT_FPVIOL_SHIFT 4 #define FTFA_FSTAT_ACCERR_MASK 0x20u #define FTFA_FSTAT_ACCERR_SHIFT 5 #define FTFA_FSTAT_RDCOLERR_MASK 0x40u #define FTFA_FSTAT_RDCOLERR_SHIFT 6 #define FTFA_FSTAT_CCIF_MASK 0x80u #define FTFA_FSTAT_CCIF_SHIFT 7 /* FCNFG Bit Fields */ #define FTFA_FCNFG_ERSSUSP_MASK 0x10u #define FTFA_FCNFG_ERSSUSP_SHIFT 4 #define FTFA_FCNFG_ERSAREQ_MASK 0x20u #define FTFA_FCNFG_ERSAREQ_SHIFT 5 #define FTFA_FCNFG_RDCOLLIE_MASK 0x40u #define FTFA_FCNFG_RDCOLLIE_SHIFT 6 #define FTFA_FCNFG_CCIE_MASK 0x80u #define FTFA_FCNFG_CCIE_SHIFT 7 /* FSEC Bit Fields */ #define FTFA_FSEC_SEC_MASK 0x3u #define FTFA_FSEC_SEC_SHIFT 0 #define FTFA_FSEC_SEC(x) (((uint8_t)(((uint8_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_CnV_REG(base,index) ((base)->CONTROLS[index].CnV) #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_QDCTRL_REG(base) ((base)->QDCTRL) #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(x) (((uint32_t)(((uint32_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) /*! * @} */ /* 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(x) (((uint32_t)(((uint32_t)(x))<A1) #define I2C_F_REG(base) ((base)->F) #define I2C_C1_REG(base) ((base)->C1) #define I2C_S_REG(base) ((base)->S) #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(x) (((uint8_t)(((uint8_t)(x))<TCSR) #define I2S_TCR1_REG(base) ((base)->TCR1) #define I2S_TCR2_REG(base) ((base)->TCR2) #define I2S_TCR3_REG(base) ((base)->TCR3) #define I2S_TCR4_REG(base) ((base)->TCR4) #define I2S_TCR5_REG(base) ((base)->TCR5) #define I2S_TDR_REG(base,index) ((base)->TDR[index]) #define I2S_TFR_REG(base,index) ((base)->TFR[index]) #define I2S_TMR_REG(base) ((base)->TMR) #define I2S_RCSR_REG(base) ((base)->RCSR) #define I2S_RCR1_REG(base) ((base)->RCR1) #define I2S_RCR2_REG(base) ((base)->RCR2) #define I2S_RCR3_REG(base) ((base)->RCR3) #define I2S_RCR4_REG(base) ((base)->RCR4) #define I2S_RCR5_REG(base) ((base)->RCR5) #define I2S_RDR_REG(base,index) ((base)->RDR[index]) #define I2S_RFR_REG(base,index) ((base)->RFR[index]) #define I2S_RMR_REG(base) ((base)->RMR) #define I2S_MCR_REG(base) ((base)->MCR) #define I2S_MDR_REG(base) ((base)->MDR) /*! * @} */ /* end of group I2S_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- I2S Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup I2S_Register_Masks I2S Register Masks * @{ */ /* TCSR Bit Fields */ #define I2S_TCSR_FRDE_MASK 0x1u #define I2S_TCSR_FRDE_SHIFT 0 #define I2S_TCSR_FWDE_MASK 0x2u #define I2S_TCSR_FWDE_SHIFT 1 #define I2S_TCSR_FRIE_MASK 0x100u #define I2S_TCSR_FRIE_SHIFT 8 #define I2S_TCSR_FWIE_MASK 0x200u #define I2S_TCSR_FWIE_SHIFT 9 #define I2S_TCSR_FEIE_MASK 0x400u #define I2S_TCSR_FEIE_SHIFT 10 #define I2S_TCSR_SEIE_MASK 0x800u #define I2S_TCSR_SEIE_SHIFT 11 #define I2S_TCSR_WSIE_MASK 0x1000u #define I2S_TCSR_WSIE_SHIFT 12 #define I2S_TCSR_FRF_MASK 0x10000u #define I2S_TCSR_FRF_SHIFT 16 #define I2S_TCSR_FWF_MASK 0x20000u #define I2S_TCSR_FWF_SHIFT 17 #define I2S_TCSR_FEF_MASK 0x40000u #define I2S_TCSR_FEF_SHIFT 18 #define I2S_TCSR_SEF_MASK 0x80000u #define I2S_TCSR_SEF_SHIFT 19 #define I2S_TCSR_WSF_MASK 0x100000u #define I2S_TCSR_WSF_SHIFT 20 #define I2S_TCSR_SR_MASK 0x1000000u #define I2S_TCSR_SR_SHIFT 24 #define I2S_TCSR_FR_MASK 0x2000000u #define I2S_TCSR_FR_SHIFT 25 #define I2S_TCSR_BCE_MASK 0x10000000u #define I2S_TCSR_BCE_SHIFT 28 #define I2S_TCSR_DBGE_MASK 0x20000000u #define I2S_TCSR_DBGE_SHIFT 29 #define I2S_TCSR_STOPE_MASK 0x40000000u #define I2S_TCSR_STOPE_SHIFT 30 #define I2S_TCSR_TE_MASK 0x80000000u #define I2S_TCSR_TE_SHIFT 31 /* TCR1 Bit Fields */ #define I2S_TCR1_TFW_MASK 0x7u #define I2S_TCR1_TFW_SHIFT 0 #define I2S_TCR1_TFW(x) (((uint32_t)(((uint32_t)(x))<PE1) #define LLWU_PE2_REG(base) ((base)->PE2) #define LLWU_PE3_REG(base) ((base)->PE3) #define LLWU_PE4_REG(base) ((base)->PE4) #define LLWU_ME_REG(base) ((base)->ME) #define LLWU_F1_REG(base) ((base)->F1) #define LLWU_F2_REG(base) ((base)->F2) #define LLWU_F3_REG(base) ((base)->F3) #define LLWU_FILT1_REG(base) ((base)->FILT1) #define LLWU_FILT2_REG(base) ((base)->FILT2) /*! * @} */ /* end of group LLWU_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- LLWU Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup LLWU_Register_Masks LLWU Register Masks * @{ */ /* PE1 Bit Fields */ #define LLWU_PE1_WUPE0_MASK 0x3u #define LLWU_PE1_WUPE0_SHIFT 0 #define LLWU_PE1_WUPE0(x) (((uint8_t)(((uint8_t)(x))<CSR) #define LPTMR_PSR_REG(base) ((base)->PSR) #define LPTMR_CMR_REG(base) ((base)->CMR) #define LPTMR_CNR_REG(base) ((base)->CNR) /*! * @} */ /* end of group LPTMR_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- LPTMR Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup LPTMR_Register_Masks LPTMR Register Masks * @{ */ /* CSR Bit Fields */ #define LPTMR_CSR_TEN_MASK 0x1u #define LPTMR_CSR_TEN_SHIFT 0 #define LPTMR_CSR_TMS_MASK 0x2u #define LPTMR_CSR_TMS_SHIFT 1 #define LPTMR_CSR_TFC_MASK 0x4u #define LPTMR_CSR_TFC_SHIFT 2 #define LPTMR_CSR_TPP_MASK 0x8u #define LPTMR_CSR_TPP_SHIFT 3 #define LPTMR_CSR_TPS_MASK 0x30u #define LPTMR_CSR_TPS_SHIFT 4 #define LPTMR_CSR_TPS(x) (((uint32_t)(((uint32_t)(x))<BAUD) #define LPUART_STAT_REG(base) ((base)->STAT) #define LPUART_CTRL_REG(base) ((base)->CTRL) #define LPUART_DATA_REG(base) ((base)->DATA) #define LPUART_MATCH_REG(base) ((base)->MATCH) #define LPUART_MODIR_REG(base) ((base)->MODIR) /*! * @} */ /* end of group LPUART_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- LPUART Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup LPUART_Register_Masks LPUART Register Masks * @{ */ /* BAUD Bit Fields */ #define LPUART_BAUD_SBR_MASK 0x1FFFu #define LPUART_BAUD_SBR_SHIFT 0 #define LPUART_BAUD_SBR(x) (((uint32_t)(((uint32_t)(x))<C1) #define MCG_C2_REG(base) ((base)->C2) #define MCG_C3_REG(base) ((base)->C3) #define MCG_C4_REG(base) ((base)->C4) #define MCG_C5_REG(base) ((base)->C5) #define MCG_C6_REG(base) ((base)->C6) #define MCG_S_REG(base) ((base)->S) #define MCG_SC_REG(base) ((base)->SC) #define MCG_ATCVH_REG(base) ((base)->ATCVH) #define MCG_ATCVL_REG(base) ((base)->ATCVL) #define MCG_C7_REG(base) ((base)->C7) #define MCG_C8_REG(base) ((base)->C8) /*! * @} */ /* end of group MCG_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- MCG Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup MCG_Register_Masks MCG Register Masks * @{ */ /* C1 Bit Fields */ #define MCG_C1_IREFSTEN_MASK 0x1u #define MCG_C1_IREFSTEN_SHIFT 0 #define MCG_C1_IRCLKEN_MASK 0x2u #define MCG_C1_IRCLKEN_SHIFT 1 #define MCG_C1_IREFS_MASK 0x4u #define MCG_C1_IREFS_SHIFT 2 #define MCG_C1_FRDIV_MASK 0x38u #define MCG_C1_FRDIV_SHIFT 3 #define MCG_C1_FRDIV(x) (((uint8_t)(((uint8_t)(x))<PLASC) #define MCM_PLAMC_REG(base) ((base)->PLAMC) #define MCM_PLACR_REG(base) ((base)->PLACR) #define MCM_ISCR_REG(base) ((base)->ISCR) #define MCM_CPO_REG(base) ((base)->CPO) /*! * @} */ /* 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(x) (((uint16_t)(((uint16_t)(x))<BACKKEY3) #define NV_BACKKEY2_REG(base) ((base)->BACKKEY2) #define NV_BACKKEY1_REG(base) ((base)->BACKKEY1) #define NV_BACKKEY0_REG(base) ((base)->BACKKEY0) #define NV_BACKKEY7_REG(base) ((base)->BACKKEY7) #define NV_BACKKEY6_REG(base) ((base)->BACKKEY6) #define NV_BACKKEY5_REG(base) ((base)->BACKKEY5) #define NV_BACKKEY4_REG(base) ((base)->BACKKEY4) #define NV_FPROT3_REG(base) ((base)->FPROT3) #define NV_FPROT2_REG(base) ((base)->FPROT2) #define NV_FPROT1_REG(base) ((base)->FPROT1) #define NV_FPROT0_REG(base) ((base)->FPROT0) #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 * @{ */ /* BACKKEY3 Bit Fields */ #define NV_BACKKEY3_KEY_MASK 0xFFu #define NV_BACKKEY3_KEY_SHIFT 0 #define NV_BACKKEY3_KEY(x) (((uint8_t)(((uint8_t)(x))<CR) #define OSC_DIV_REG(base) ((base)->DIV) /*! * @} */ /* end of group OSC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- OSC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup OSC_Register_Masks OSC Register Masks * @{ */ /* CR Bit Fields */ #define OSC_CR_SC16P_MASK 0x1u #define OSC_CR_SC16P_SHIFT 0 #define OSC_CR_SC8P_MASK 0x2u #define OSC_CR_SC8P_SHIFT 1 #define OSC_CR_SC4P_MASK 0x4u #define OSC_CR_SC4P_SHIFT 2 #define OSC_CR_SC2P_MASK 0x8u #define OSC_CR_SC2P_SHIFT 3 #define OSC_CR_EREFSTEN_MASK 0x20u #define OSC_CR_EREFSTEN_SHIFT 5 #define OSC_CR_ERCLKEN_MASK 0x80u #define OSC_CR_ERCLKEN_SHIFT 7 /* DIV Bit Fields */ #define OSC_DIV_ERPS_MASK 0xC0u #define OSC_DIV_ERPS_SHIFT 6 #define OSC_DIV_ERPS(x) (((uint8_t)(((uint8_t)(x))<SC) #define PDB_MOD_REG(base) ((base)->MOD) #define PDB_CNT_REG(base) ((base)->CNT) #define PDB_IDLY_REG(base) ((base)->IDLY) #define PDB_C1_REG(base,index) ((base)->CH[index].C1) #define PDB_S_REG(base,index) ((base)->CH[index].S) #define PDB_DLY_REG(base,index,index2) ((base)->CH[index].DLY[index2]) #define PDB_INTC_REG(base,index) ((base)->DAC[index].INTC) #define PDB_INT_REG(base,index) ((base)->DAC[index].INT) #define PDB_POEN_REG(base) ((base)->POEN) #define PDB_PODLY_REG(base,index) ((base)->PODLY[index]) /*! * @} */ /* end of group PDB_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PDB Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup PDB_Register_Masks PDB Register Masks * @{ */ /* SC Bit Fields */ #define PDB_SC_LDOK_MASK 0x1u #define PDB_SC_LDOK_SHIFT 0 #define PDB_SC_CONT_MASK 0x2u #define PDB_SC_CONT_SHIFT 1 #define PDB_SC_MULT_MASK 0xCu #define PDB_SC_MULT_SHIFT 2 #define PDB_SC_MULT(x) (((uint32_t)(((uint32_t)(x))<MCR) #define PIT_LDVAL_REG(base,index) ((base)->CHANNEL[index].LDVAL) #define PIT_CVAL_REG(base,index) ((base)->CHANNEL[index].CVAL) #define PIT_TCTRL_REG(base,index) ((base)->CHANNEL[index].TCTRL) #define PIT_TFLG_REG(base,index) ((base)->CHANNEL[index].TFLG) /*! * @} */ /* 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_MDIS_MASK 0x2u #define PIT_MCR_MDIS_SHIFT 1 /* LDVAL Bit Fields */ #define PIT_LDVAL_TSV_MASK 0xFFFFFFFFu #define PIT_LDVAL_TSV_SHIFT 0 #define PIT_LDVAL_TSV(x) (((uint32_t)(((uint32_t)(x))<LVDSC1) #define PMC_LVDSC2_REG(base) ((base)->LVDSC2) #define PMC_REGSC_REG(base) ((base)->REGSC) /*! * @} */ /* end of group PMC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PMC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup PMC_Register_Masks PMC Register Masks * @{ */ /* LVDSC1 Bit Fields */ #define PMC_LVDSC1_LVDV_MASK 0x3u #define PMC_LVDSC1_LVDV_SHIFT 0 #define PMC_LVDSC1_LVDV(x) (((uint8_t)(((uint8_t)(x))<PCR[index]) #define PORT_GPCLR_REG(base) ((base)->GPCLR) #define PORT_GPCHR_REG(base) ((base)->GPCHR) #define PORT_ISFR_REG(base) ((base)->ISFR) #define PORT_DFER_REG(base) ((base)->DFER) #define PORT_DFCR_REG(base) ((base)->DFCR) #define PORT_DFWR_REG(base) ((base)->DFWR) /*! * @} */ /* end of group PORT_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- PORT Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup PORT_Register_Masks PORT Register Masks * @{ */ /* PCR Bit Fields */ #define PORT_PCR_PS_MASK 0x1u #define PORT_PCR_PS_SHIFT 0 #define PORT_PCR_PE_MASK 0x2u #define PORT_PCR_PE_SHIFT 1 #define PORT_PCR_SRE_MASK 0x4u #define PORT_PCR_SRE_SHIFT 2 #define PORT_PCR_PFE_MASK 0x10u #define PORT_PCR_PFE_SHIFT 4 #define PORT_PCR_ODE_MASK 0x20u #define PORT_PCR_ODE_SHIFT 5 #define PORT_PCR_DSE_MASK 0x40u #define PORT_PCR_DSE_SHIFT 6 #define PORT_PCR_MUX_MASK 0x700u #define PORT_PCR_MUX_SHIFT 8 #define PORT_PCR_MUX(x) (((uint32_t)(((uint32_t)(x))<SRS0) #define RCM_SRS1_REG(base) ((base)->SRS1) #define RCM_RPFC_REG(base) ((base)->RPFC) #define RCM_RPFW_REG(base) ((base)->RPFW) #define RCM_MR_REG(base) ((base)->MR) #define RCM_SSRS0_REG(base) ((base)->SSRS0) #define RCM_SSRS1_REG(base) ((base)->SSRS1) /*! * @} */ /* end of group RCM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- RCM Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup RCM_Register_Masks RCM Register Masks * @{ */ /* SRS0 Bit Fields */ #define RCM_SRS0_WAKEUP_MASK 0x1u #define RCM_SRS0_WAKEUP_SHIFT 0 #define RCM_SRS0_LVD_MASK 0x2u #define RCM_SRS0_LVD_SHIFT 1 #define RCM_SRS0_LOC_MASK 0x4u #define RCM_SRS0_LOC_SHIFT 2 #define RCM_SRS0_LOL_MASK 0x8u #define RCM_SRS0_LOL_SHIFT 3 #define RCM_SRS0_WDOG_MASK 0x20u #define RCM_SRS0_WDOG_SHIFT 5 #define RCM_SRS0_PIN_MASK 0x40u #define RCM_SRS0_PIN_SHIFT 6 #define RCM_SRS0_POR_MASK 0x80u #define RCM_SRS0_POR_SHIFT 7 /* SRS1 Bit Fields */ #define RCM_SRS1_JTAG_MASK 0x1u #define RCM_SRS1_JTAG_SHIFT 0 #define RCM_SRS1_LOCKUP_MASK 0x2u #define RCM_SRS1_LOCKUP_SHIFT 1 #define RCM_SRS1_SW_MASK 0x4u #define RCM_SRS1_SW_SHIFT 2 #define RCM_SRS1_MDM_AP_MASK 0x8u #define RCM_SRS1_MDM_AP_SHIFT 3 #define RCM_SRS1_EZPT_MASK 0x10u #define RCM_SRS1_EZPT_SHIFT 4 #define RCM_SRS1_SACKERR_MASK 0x20u #define RCM_SRS1_SACKERR_SHIFT 5 /* RPFC Bit Fields */ #define RCM_RPFC_RSTFLTSRW_MASK 0x3u #define RCM_RPFC_RSTFLTSRW_SHIFT 0 #define RCM_RPFC_RSTFLTSRW(x) (((uint8_t)(((uint8_t)(x))<REG[index]) /*! * @} */ /* end of group RFSYS_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- RFSYS Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup RFSYS_Register_Masks RFSYS Register Masks * @{ */ /* REG Bit Fields */ #define RFSYS_REG_LL_MASK 0xFFu #define RFSYS_REG_LL_SHIFT 0 #define RFSYS_REG_LL(x) (((uint32_t)(((uint32_t)(x))<REG[index]) /*! * @} */ /* end of group RFVBAT_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- RFVBAT Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup RFVBAT_Register_Masks RFVBAT Register Masks * @{ */ /* REG Bit Fields */ #define RFVBAT_REG_LL_MASK 0xFFu #define RFVBAT_REG_LL_SHIFT 0 #define RFVBAT_REG_LL(x) (((uint32_t)(((uint32_t)(x))<CR) #define RNG_SR_REG(base) ((base)->SR) #define RNG_ER_REG(base) ((base)->ER) #define RNG_OR_REG(base) ((base)->OR) /*! * @} */ /* end of group RNG_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- RNG Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup RNG_Register_Masks RNG Register Masks * @{ */ /* CR Bit Fields */ #define RNG_CR_GO_MASK 0x1u #define RNG_CR_GO_SHIFT 0 #define RNG_CR_HA_MASK 0x2u #define RNG_CR_HA_SHIFT 1 #define RNG_CR_INTM_MASK 0x4u #define RNG_CR_INTM_SHIFT 2 #define RNG_CR_CLRI_MASK 0x8u #define RNG_CR_CLRI_SHIFT 3 #define RNG_CR_SLP_MASK 0x10u #define RNG_CR_SLP_SHIFT 4 /* SR Bit Fields */ #define RNG_SR_SECV_MASK 0x1u #define RNG_SR_SECV_SHIFT 0 #define RNG_SR_LRS_MASK 0x2u #define RNG_SR_LRS_SHIFT 1 #define RNG_SR_ORU_MASK 0x4u #define RNG_SR_ORU_SHIFT 2 #define RNG_SR_ERRI_MASK 0x8u #define RNG_SR_ERRI_SHIFT 3 #define RNG_SR_SLP_MASK 0x10u #define RNG_SR_SLP_SHIFT 4 #define RNG_SR_OREG_LVL_MASK 0xFF00u #define RNG_SR_OREG_LVL_SHIFT 8 #define RNG_SR_OREG_LVL(x) (((uint32_t)(((uint32_t)(x))<TSR) #define RTC_TPR_REG(base) ((base)->TPR) #define RTC_TAR_REG(base) ((base)->TAR) #define RTC_TCR_REG(base) ((base)->TCR) #define RTC_CR_REG(base) ((base)->CR) #define RTC_SR_REG(base) ((base)->SR) #define RTC_LR_REG(base) ((base)->LR) #define RTC_IER_REG(base) ((base)->IER) #define RTC_WAR_REG(base) ((base)->WAR) #define RTC_RAR_REG(base) ((base)->RAR) /*! * @} */ /* end of group RTC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- RTC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup RTC_Register_Masks RTC Register Masks * @{ */ /* TSR Bit Fields */ #define RTC_TSR_TSR_MASK 0xFFFFFFFFu #define RTC_TSR_TSR_SHIFT 0 #define RTC_TSR_TSR(x) (((uint32_t)(((uint32_t)(x))<SOPT1) #define SIM_SOPT1CFG_REG(base) ((base)->SOPT1CFG) #define SIM_SOPT2_REG(base) ((base)->SOPT2) #define SIM_SOPT4_REG(base) ((base)->SOPT4) #define SIM_SOPT5_REG(base) ((base)->SOPT5) #define SIM_SOPT7_REG(base) ((base)->SOPT7) #define SIM_SOPT8_REG(base) ((base)->SOPT8) #define SIM_SDID_REG(base) ((base)->SDID) #define SIM_SCGC4_REG(base) ((base)->SCGC4) #define SIM_SCGC5_REG(base) ((base)->SCGC5) #define SIM_SCGC6_REG(base) ((base)->SCGC6) #define SIM_SCGC7_REG(base) ((base)->SCGC7) #define SIM_CLKDIV1_REG(base) ((base)->CLKDIV1) #define SIM_CLKDIV2_REG(base) ((base)->CLKDIV2) #define SIM_FCFG1_REG(base) ((base)->FCFG1) #define SIM_FCFG2_REG(base) ((base)->FCFG2) #define SIM_UIDH_REG(base) ((base)->UIDH) #define SIM_UIDMH_REG(base) ((base)->UIDMH) #define SIM_UIDML_REG(base) ((base)->UIDML) #define SIM_UIDL_REG(base) ((base)->UIDL) /*! * @} */ /* end of group SIM_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SIM Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup SIM_Register_Masks SIM Register Masks * @{ */ /* SOPT1 Bit Fields */ #define SIM_SOPT1_RAMSIZE_MASK 0xF000u #define SIM_SOPT1_RAMSIZE_SHIFT 12 #define SIM_SOPT1_RAMSIZE(x) (((uint32_t)(((uint32_t)(x))<PMPROT) #define SMC_PMCTRL_REG(base) ((base)->PMCTRL) #define SMC_STOPCTRL_REG(base) ((base)->STOPCTRL) #define SMC_PMSTAT_REG(base) ((base)->PMSTAT) /*! * @} */ /* end of group SMC_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SMC Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup SMC_Register_Masks SMC Register Masks * @{ */ /* PMPROT Bit Fields */ #define SMC_PMPROT_AVLLS_MASK 0x2u #define SMC_PMPROT_AVLLS_SHIFT 1 #define SMC_PMPROT_ALLS_MASK 0x8u #define SMC_PMPROT_ALLS_SHIFT 3 #define SMC_PMPROT_AVLP_MASK 0x20u #define SMC_PMPROT_AVLP_SHIFT 5 #define SMC_PMPROT_AHSRUN_MASK 0x80u #define SMC_PMPROT_AHSRUN_SHIFT 7 /* PMCTRL Bit Fields */ #define SMC_PMCTRL_STOPM_MASK 0x7u #define SMC_PMCTRL_STOPM_SHIFT 0 #define SMC_PMCTRL_STOPM(x) (((uint8_t)(((uint8_t)(x))<MCR) #define SPI_TCR_REG(base) ((base)->TCR) #define SPI_CTAR_REG(base,index2) ((base)->CTAR[index2]) #define SPI_CTAR_SLAVE_REG(base,index2) ((base)->CTAR_SLAVE[index2]) #define SPI_SR_REG(base) ((base)->SR) #define SPI_RSER_REG(base) ((base)->RSER) #define SPI_PUSHR_REG(base) ((base)->PUSHR) #define SPI_PUSHR_SLAVE_REG(base) ((base)->PUSHR_SLAVE) #define SPI_POPR_REG(base) ((base)->POPR) #define SPI_TXFR0_REG(base) ((base)->TXFR0) #define SPI_TXFR1_REG(base) ((base)->TXFR1) #define SPI_TXFR2_REG(base) ((base)->TXFR2) #define SPI_TXFR3_REG(base) ((base)->TXFR3) #define SPI_RXFR0_REG(base) ((base)->RXFR0) #define SPI_RXFR1_REG(base) ((base)->RXFR1) #define SPI_RXFR2_REG(base) ((base)->RXFR2) #define SPI_RXFR3_REG(base) ((base)->RXFR3) /*! * @} */ /* end of group SPI_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- SPI Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup SPI_Register_Masks SPI Register Masks * @{ */ /* MCR Bit Fields */ #define SPI_MCR_HALT_MASK 0x1u #define SPI_MCR_HALT_SHIFT 0 #define SPI_MCR_SMPL_PT_MASK 0x300u #define SPI_MCR_SMPL_PT_SHIFT 8 #define SPI_MCR_SMPL_PT(x) (((uint32_t)(((uint32_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) #define UART_MA1_REG(base) ((base)->MA1) #define UART_MA2_REG(base) ((base)->MA2) #define UART_C4_REG(base) ((base)->C4) #define UART_C5_REG(base) ((base)->C5) #define UART_ED_REG(base) ((base)->ED) #define UART_MODEM_REG(base) ((base)->MODEM) #define UART_IR_REG(base) ((base)->IR) #define UART_PFIFO_REG(base) ((base)->PFIFO) #define UART_CFIFO_REG(base) ((base)->CFIFO) #define UART_SFIFO_REG(base) ((base)->SFIFO) #define UART_TWFIFO_REG(base) ((base)->TWFIFO) #define UART_TCFIFO_REG(base) ((base)->TCFIFO) #define UART_RWFIFO_REG(base) ((base)->RWFIFO) #define UART_RCFIFO_REG(base) ((base)->RCFIFO) #define UART_C7816_REG(base) ((base)->C7816) #define UART_IE7816_REG(base) ((base)->IE7816) #define UART_IS7816_REG(base) ((base)->IS7816) #define UART_WP7816_REG(base) ((base)->WP7816) #define UART_WN7816_REG(base) ((base)->WN7816) #define UART_WF7816_REG(base) ((base)->WF7816) #define UART_ET7816_REG(base) ((base)->ET7816) #define UART_TL7816_REG(base) ((base)->TL7816) #define UART_AP7816A_T0_REG(base) ((base)->AP7816A_T0) #define UART_AP7816B_T0_REG(base) ((base)->AP7816B_T0) #define UART_WP7816A_T0_REG(base) ((base)->TYPE0.WP7816A_T0) #define UART_WP7816B_T0_REG(base) ((base)->TYPE0.WP7816B_T0) #define UART_WP7816A_T1_REG(base) ((base)->TYPE1.WP7816A_T1) #define UART_WP7816B_T1_REG(base) ((base)->TYPE1.WP7816B_T1) #define UART_WGP7816_T1_REG(base) ((base)->WGP7816_T1) #define UART_WP7816C_T1_REG(base) ((base)->WP7816C_T1) /*! * @} */ /* 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(x) (((uint8_t)(((uint8_t)(x))<PERID) #define USB_IDCOMP_REG(base) ((base)->IDCOMP) #define USB_REV_REG(base) ((base)->REV) #define USB_ADDINFO_REG(base) ((base)->ADDINFO) #define USB_OTGISTAT_REG(base) ((base)->OTGISTAT) #define USB_OTGICR_REG(base) ((base)->OTGICR) #define USB_OTGSTAT_REG(base) ((base)->OTGSTAT) #define USB_OTGCTL_REG(base) ((base)->OTGCTL) #define USB_ISTAT_REG(base) ((base)->ISTAT) #define USB_INTEN_REG(base) ((base)->INTEN) #define USB_ERRSTAT_REG(base) ((base)->ERRSTAT) #define USB_ERREN_REG(base) ((base)->ERREN) #define USB_STAT_REG(base) ((base)->STAT) #define USB_CTL_REG(base) ((base)->CTL) #define USB_ADDR_REG(base) ((base)->ADDR) #define USB_BDTPAGE1_REG(base) ((base)->BDTPAGE1) #define USB_FRMNUML_REG(base) ((base)->FRMNUML) #define USB_FRMNUMH_REG(base) ((base)->FRMNUMH) #define USB_TOKEN_REG(base) ((base)->TOKEN) #define USB_SOFTHLD_REG(base) ((base)->SOFTHLD) #define USB_BDTPAGE2_REG(base) ((base)->BDTPAGE2) #define USB_BDTPAGE3_REG(base) ((base)->BDTPAGE3) #define USB_ENDPT_REG(base,index) ((base)->ENDPOINT[index].ENDPT) #define USB_USBCTRL_REG(base) ((base)->USBCTRL) #define USB_OBSERVE_REG(base) ((base)->OBSERVE) #define USB_CONTROL_REG(base) ((base)->CONTROL) #define USB_USBTRC0_REG(base) ((base)->USBTRC0) #define USB_USBFRMADJUST_REG(base) ((base)->USBFRMADJUST) #define USB_CLK_RECOVER_CTRL_REG(base) ((base)->CLK_RECOVER_CTRL) #define USB_CLK_RECOVER_IRC_EN_REG(base) ((base)->CLK_RECOVER_IRC_EN) #define USB_CLK_RECOVER_INT_STATUS_REG(base) ((base)->CLK_RECOVER_INT_STATUS) /*! * @} */ /* end of group USB_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- USB Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup USB_Register_Masks USB Register Masks * @{ */ /* PERID Bit Fields */ #define USB_PERID_ID_MASK 0x3Fu #define USB_PERID_ID_SHIFT 0 #define USB_PERID_ID(x) (((uint8_t)(((uint8_t)(x))<TRM) #define VREF_SC_REG(base) ((base)->SC) /*! * @} */ /* end of group VREF_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- VREF Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup VREF_Register_Masks VREF Register Masks * @{ */ /* TRM Bit Fields */ #define VREF_TRM_TRIM_MASK 0x3Fu #define VREF_TRM_TRIM_SHIFT 0 #define VREF_TRM_TRIM(x) (((uint8_t)(((uint8_t)(x))<STCTRLH) #define WDOG_STCTRLL_REG(base) ((base)->STCTRLL) #define WDOG_TOVALH_REG(base) ((base)->TOVALH) #define WDOG_TOVALL_REG(base) ((base)->TOVALL) #define WDOG_WINH_REG(base) ((base)->WINH) #define WDOG_WINL_REG(base) ((base)->WINL) #define WDOG_REFRESH_REG(base) ((base)->REFRESH) #define WDOG_UNLOCK_REG(base) ((base)->UNLOCK) #define WDOG_TMROUTH_REG(base) ((base)->TMROUTH) #define WDOG_TMROUTL_REG(base) ((base)->TMROUTL) #define WDOG_RSTCNT_REG(base) ((base)->RSTCNT) #define WDOG_PRESC_REG(base) ((base)->PRESC) /*! * @} */ /* end of group WDOG_Register_Accessor_Macros */ /* ---------------------------------------------------------------------------- -- WDOG Register Masks ---------------------------------------------------------------------------- */ /*! * @addtogroup WDOG_Register_Masks WDOG Register Masks * @{ */ /* STCTRLH Bit Fields */ #define WDOG_STCTRLH_WDOGEN_MASK 0x1u #define WDOG_STCTRLH_WDOGEN_SHIFT 0 #define WDOG_STCTRLH_CLKSRC_MASK 0x2u #define WDOG_STCTRLH_CLKSRC_SHIFT 1 #define WDOG_STCTRLH_IRQRSTEN_MASK 0x4u #define WDOG_STCTRLH_IRQRSTEN_SHIFT 2 #define WDOG_STCTRLH_WINEN_MASK 0x8u #define WDOG_STCTRLH_WINEN_SHIFT 3 #define WDOG_STCTRLH_ALLOWUPDATE_MASK 0x10u #define WDOG_STCTRLH_ALLOWUPDATE_SHIFT 4 #define WDOG_STCTRLH_DBGEN_MASK 0x20u #define WDOG_STCTRLH_DBGEN_SHIFT 5 #define WDOG_STCTRLH_STOPEN_MASK 0x40u #define WDOG_STCTRLH_STOPEN_SHIFT 6 #define WDOG_STCTRLH_WAITEN_MASK 0x80u #define WDOG_STCTRLH_WAITEN_SHIFT 7 #define WDOG_STCTRLH_TESTWDOG_MASK 0x400u #define WDOG_STCTRLH_TESTWDOG_SHIFT 10 #define WDOG_STCTRLH_TESTSEL_MASK 0x800u #define WDOG_STCTRLH_TESTSEL_SHIFT 11 #define WDOG_STCTRLH_BYTESEL_MASK 0x3000u #define WDOG_STCTRLH_BYTESEL_SHIFT 12 #define WDOG_STCTRLH_BYTESEL(x) (((uint16_t)(((uint16_t)(x))<