619 lines
39 KiB
C
619 lines
39 KiB
C
|
/* Macros from the MCU main header file */
|
||
|
|
||
|
#ifndef SIMUL_REGS_H
|
||
|
#define SIMUL_REGS_H
|
||
|
|
||
|
// Macros for registry manipulation
|
||
|
/*!
|
||
|
* @addtogroup SIM_Register_Masks SIM Register Masks
|
||
|
* @{
|
||
|
*/
|
||
|
|
||
|
/* SOPT1 Bit Fields */
|
||
|
#define SIM_SOPT1_OSC32KSEL_MASK 0xC0000u
|
||
|
#define SIM_SOPT1_OSC32KSEL_SHIFT 18
|
||
|
#define SIM_SOPT1_OSC32KSEL_WIDTH 2
|
||
|
#define SIM_SOPT1_OSC32KSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT1_OSC32KSEL_SHIFT))&SIM_SOPT1_OSC32KSEL_MASK)
|
||
|
#define SIM_SOPT1_USBVSTBY_MASK 0x20000000u
|
||
|
#define SIM_SOPT1_USBVSTBY_SHIFT 29
|
||
|
#define SIM_SOPT1_USBVSTBY_WIDTH 1
|
||
|
#define SIM_SOPT1_USBVSTBY(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT1_USBVSTBY_SHIFT))&SIM_SOPT1_USBVSTBY_MASK)
|
||
|
#define SIM_SOPT1_USBSSTBY_MASK 0x40000000u
|
||
|
#define SIM_SOPT1_USBSSTBY_SHIFT 30
|
||
|
#define SIM_SOPT1_USBSSTBY_WIDTH 1
|
||
|
#define SIM_SOPT1_USBSSTBY(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT1_USBSSTBY_SHIFT))&SIM_SOPT1_USBSSTBY_MASK)
|
||
|
#define SIM_SOPT1_USBREGEN_MASK 0x80000000u
|
||
|
#define SIM_SOPT1_USBREGEN_SHIFT 31
|
||
|
#define SIM_SOPT1_USBREGEN_WIDTH 1
|
||
|
#define SIM_SOPT1_USBREGEN(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT1_USBREGEN_SHIFT))&SIM_SOPT1_USBREGEN_MASK)
|
||
|
/* SOPT1CFG Bit Fields */
|
||
|
#define SIM_SOPT1CFG_URWE_MASK 0x1000000u
|
||
|
#define SIM_SOPT1CFG_URWE_SHIFT 24
|
||
|
#define SIM_SOPT1CFG_URWE_WIDTH 1
|
||
|
#define SIM_SOPT1CFG_URWE(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT1CFG_URWE_SHIFT))&SIM_SOPT1CFG_URWE_MASK)
|
||
|
#define SIM_SOPT1CFG_UVSWE_MASK 0x2000000u
|
||
|
#define SIM_SOPT1CFG_UVSWE_SHIFT 25
|
||
|
#define SIM_SOPT1CFG_UVSWE_WIDTH 1
|
||
|
#define SIM_SOPT1CFG_UVSWE(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT1CFG_UVSWE_SHIFT))&SIM_SOPT1CFG_UVSWE_MASK)
|
||
|
#define SIM_SOPT1CFG_USSWE_MASK 0x4000000u
|
||
|
#define SIM_SOPT1CFG_USSWE_SHIFT 26
|
||
|
#define SIM_SOPT1CFG_USSWE_WIDTH 1
|
||
|
#define SIM_SOPT1CFG_USSWE(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT1CFG_USSWE_SHIFT))&SIM_SOPT1CFG_USSWE_MASK)
|
||
|
/* SOPT2 Bit Fields */
|
||
|
#define SIM_SOPT2_RTCCLKOUTSEL_MASK 0x10u
|
||
|
#define SIM_SOPT2_RTCCLKOUTSEL_SHIFT 4
|
||
|
#define SIM_SOPT2_RTCCLKOUTSEL_WIDTH 1
|
||
|
#define SIM_SOPT2_RTCCLKOUTSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT2_RTCCLKOUTSEL_SHIFT))&SIM_SOPT2_RTCCLKOUTSEL_MASK)
|
||
|
#define SIM_SOPT2_CLKOUTSEL_MASK 0xE0u
|
||
|
#define SIM_SOPT2_CLKOUTSEL_SHIFT 5
|
||
|
#define SIM_SOPT2_CLKOUTSEL_WIDTH 3
|
||
|
#define SIM_SOPT2_CLKOUTSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT2_CLKOUTSEL_SHIFT))&SIM_SOPT2_CLKOUTSEL_MASK)
|
||
|
#define SIM_SOPT2_PLLFLLSEL_MASK 0x10000u
|
||
|
#define SIM_SOPT2_PLLFLLSEL_SHIFT 16
|
||
|
#define SIM_SOPT2_PLLFLLSEL_WIDTH 1
|
||
|
#define SIM_SOPT2_PLLFLLSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT2_PLLFLLSEL_SHIFT))&SIM_SOPT2_PLLFLLSEL_MASK)
|
||
|
#define SIM_SOPT2_USBSRC_MASK 0x40000u
|
||
|
#define SIM_SOPT2_USBSRC_SHIFT 18
|
||
|
#define SIM_SOPT2_USBSRC_WIDTH 1
|
||
|
#define SIM_SOPT2_USBSRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT2_USBSRC_SHIFT))&SIM_SOPT2_USBSRC_MASK)
|
||
|
#define SIM_SOPT2_TPMSRC_MASK 0x3000000u
|
||
|
#define SIM_SOPT2_TPMSRC_SHIFT 24
|
||
|
#define SIM_SOPT2_TPMSRC_WIDTH 2
|
||
|
#define SIM_SOPT2_TPMSRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT2_TPMSRC_SHIFT))&SIM_SOPT2_TPMSRC_MASK)
|
||
|
#define SIM_SOPT2_UART0SRC_MASK 0xC000000u
|
||
|
#define SIM_SOPT2_UART0SRC_SHIFT 26
|
||
|
#define SIM_SOPT2_UART0SRC_WIDTH 2
|
||
|
#define SIM_SOPT2_UART0SRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT2_UART0SRC_SHIFT))&SIM_SOPT2_UART0SRC_MASK)
|
||
|
/* SOPT4 Bit Fields */
|
||
|
#define SIM_SOPT4_TPM1CH0SRC_MASK 0x40000u
|
||
|
#define SIM_SOPT4_TPM1CH0SRC_SHIFT 18
|
||
|
#define SIM_SOPT4_TPM1CH0SRC_WIDTH 1
|
||
|
#define SIM_SOPT4_TPM1CH0SRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT4_TPM1CH0SRC_SHIFT))&SIM_SOPT4_TPM1CH0SRC_MASK)
|
||
|
#define SIM_SOPT4_TPM2CH0SRC_MASK 0x100000u
|
||
|
#define SIM_SOPT4_TPM2CH0SRC_SHIFT 20
|
||
|
#define SIM_SOPT4_TPM2CH0SRC_WIDTH 1
|
||
|
#define SIM_SOPT4_TPM2CH0SRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT4_TPM2CH0SRC_SHIFT))&SIM_SOPT4_TPM2CH0SRC_MASK)
|
||
|
#define SIM_SOPT4_TPM0CLKSEL_MASK 0x1000000u
|
||
|
#define SIM_SOPT4_TPM0CLKSEL_SHIFT 24
|
||
|
#define SIM_SOPT4_TPM0CLKSEL_WIDTH 1
|
||
|
#define SIM_SOPT4_TPM0CLKSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT4_TPM0CLKSEL_SHIFT))&SIM_SOPT4_TPM0CLKSEL_MASK)
|
||
|
#define SIM_SOPT4_TPM1CLKSEL_MASK 0x2000000u
|
||
|
#define SIM_SOPT4_TPM1CLKSEL_SHIFT 25
|
||
|
#define SIM_SOPT4_TPM1CLKSEL_WIDTH 1
|
||
|
#define SIM_SOPT4_TPM1CLKSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT4_TPM1CLKSEL_SHIFT))&SIM_SOPT4_TPM1CLKSEL_MASK)
|
||
|
#define SIM_SOPT4_TPM2CLKSEL_MASK 0x4000000u
|
||
|
#define SIM_SOPT4_TPM2CLKSEL_SHIFT 26
|
||
|
#define SIM_SOPT4_TPM2CLKSEL_WIDTH 1
|
||
|
#define SIM_SOPT4_TPM2CLKSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT4_TPM2CLKSEL_SHIFT))&SIM_SOPT4_TPM2CLKSEL_MASK)
|
||
|
/* SOPT5 Bit Fields */
|
||
|
#define SIM_SOPT5_UART0TXSRC_MASK 0x3u
|
||
|
#define SIM_SOPT5_UART0TXSRC_SHIFT 0
|
||
|
#define SIM_SOPT5_UART0TXSRC_WIDTH 2
|
||
|
#define SIM_SOPT5_UART0TXSRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT5_UART0TXSRC_SHIFT))&SIM_SOPT5_UART0TXSRC_MASK)
|
||
|
#define SIM_SOPT5_UART0RXSRC_MASK 0x4u
|
||
|
#define SIM_SOPT5_UART0RXSRC_SHIFT 2
|
||
|
#define SIM_SOPT5_UART0RXSRC_WIDTH 1
|
||
|
#define SIM_SOPT5_UART0RXSRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT5_UART0RXSRC_SHIFT))&SIM_SOPT5_UART0RXSRC_MASK)
|
||
|
#define SIM_SOPT5_UART1TXSRC_MASK 0x30u
|
||
|
#define SIM_SOPT5_UART1TXSRC_SHIFT 4
|
||
|
#define SIM_SOPT5_UART1TXSRC_WIDTH 2
|
||
|
#define SIM_SOPT5_UART1TXSRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT5_UART1TXSRC_SHIFT))&SIM_SOPT5_UART1TXSRC_MASK)
|
||
|
#define SIM_SOPT5_UART1RXSRC_MASK 0x40u
|
||
|
#define SIM_SOPT5_UART1RXSRC_SHIFT 6
|
||
|
#define SIM_SOPT5_UART1RXSRC_WIDTH 1
|
||
|
#define SIM_SOPT5_UART1RXSRC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT5_UART1RXSRC_SHIFT))&SIM_SOPT5_UART1RXSRC_MASK)
|
||
|
#define SIM_SOPT5_UART0ODE_MASK 0x10000u
|
||
|
#define SIM_SOPT5_UART0ODE_SHIFT 16
|
||
|
#define SIM_SOPT5_UART0ODE_WIDTH 1
|
||
|
#define SIM_SOPT5_UART0ODE(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT5_UART0ODE_SHIFT))&SIM_SOPT5_UART0ODE_MASK)
|
||
|
#define SIM_SOPT5_UART1ODE_MASK 0x20000u
|
||
|
#define SIM_SOPT5_UART1ODE_SHIFT 17
|
||
|
#define SIM_SOPT5_UART1ODE_WIDTH 1
|
||
|
#define SIM_SOPT5_UART1ODE(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT5_UART1ODE_SHIFT))&SIM_SOPT5_UART1ODE_MASK)
|
||
|
#define SIM_SOPT5_UART2ODE_MASK 0x40000u
|
||
|
#define SIM_SOPT5_UART2ODE_SHIFT 18
|
||
|
#define SIM_SOPT5_UART2ODE_WIDTH 1
|
||
|
#define SIM_SOPT5_UART2ODE(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT5_UART2ODE_SHIFT))&SIM_SOPT5_UART2ODE_MASK)
|
||
|
/* SOPT7 Bit Fields */
|
||
|
#define SIM_SOPT7_ADC0TRGSEL_MASK 0xFu
|
||
|
#define SIM_SOPT7_ADC0TRGSEL_SHIFT 0
|
||
|
#define SIM_SOPT7_ADC0TRGSEL_WIDTH 4
|
||
|
#define SIM_SOPT7_ADC0TRGSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT7_ADC0TRGSEL_SHIFT))&SIM_SOPT7_ADC0TRGSEL_MASK)
|
||
|
#define SIM_SOPT7_ADC0PRETRGSEL_MASK 0x10u
|
||
|
#define SIM_SOPT7_ADC0PRETRGSEL_SHIFT 4
|
||
|
#define SIM_SOPT7_ADC0PRETRGSEL_WIDTH 1
|
||
|
#define SIM_SOPT7_ADC0PRETRGSEL(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT7_ADC0PRETRGSEL_SHIFT))&SIM_SOPT7_ADC0PRETRGSEL_MASK)
|
||
|
#define SIM_SOPT7_ADC0ALTTRGEN_MASK 0x80u
|
||
|
#define SIM_SOPT7_ADC0ALTTRGEN_SHIFT 7
|
||
|
#define SIM_SOPT7_ADC0ALTTRGEN_WIDTH 1
|
||
|
#define SIM_SOPT7_ADC0ALTTRGEN(x) (((uint32_t)(((uint32_t)(x))<<SIM_SOPT7_ADC0ALTTRGEN_SHIFT))&SIM_SOPT7_ADC0ALTTRGEN_MASK)
|
||
|
/* SDID Bit Fields */
|
||
|
#define SIM_SDID_PINID_MASK 0xFu
|
||
|
#define SIM_SDID_PINID_SHIFT 0
|
||
|
#define SIM_SDID_PINID_WIDTH 4
|
||
|
#define SIM_SDID_PINID(x) (((uint32_t)(((uint32_t)(x))<<SIM_SDID_PINID_SHIFT))&SIM_SDID_PINID_MASK)
|
||
|
#define SIM_SDID_DIEID_MASK 0xF80u
|
||
|
#define SIM_SDID_DIEID_SHIFT 7
|
||
|
#define SIM_SDID_DIEID_WIDTH 5
|
||
|
#define SIM_SDID_DIEID(x) (((uint32_t)(((uint32_t)(x))<<SIM_SDID_DIEID_SHIFT))&SIM_SDID_DIEID_MASK)
|
||
|
#define SIM_SDID_REVID_MASK 0xF000u
|
||
|
#define SIM_SDID_REVID_SHIFT 12
|
||
|
#define SIM_SDID_REVID_WIDTH 4
|
||
|
#define SIM_SDID_REVID(x) (((uint32_t)(((uint32_t)(x))<<SIM_SDID_REVID_SHIFT))&SIM_SDID_REVID_MASK)
|
||
|
#define SIM_SDID_SRAMSIZE_MASK 0xF0000u
|
||
|
#define SIM_SDID_SRAMSIZE_SHIFT 16
|
||
|
#define SIM_SDID_SRAMSIZE_WIDTH 4
|
||
|
#define SIM_SDID_SRAMSIZE(x) (((uint32_t)(((uint32_t)(x))<<SIM_SDID_SRAMSIZE_SHIFT))&SIM_SDID_SRAMSIZE_MASK)
|
||
|
#define SIM_SDID_SERIESID_MASK 0xF00000u
|
||
|
#define SIM_SDID_SERIESID_SHIFT 20
|
||
|
#define SIM_SDID_SERIESID_WIDTH 4
|
||
|
#define SIM_SDID_SERIESID(x) (((uint32_t)(((uint32_t)(x))<<SIM_SDID_SERIESID_SHIFT))&SIM_SDID_SERIESID_MASK)
|
||
|
#define SIM_SDID_SUBFAMID_MASK 0xF000000u
|
||
|
#define SIM_SDID_SUBFAMID_SHIFT 24
|
||
|
#define SIM_SDID_SUBFAMID_WIDTH 4
|
||
|
#define SIM_SDID_SUBFAMID(x) (((uint32_t)(((uint32_t)(x))<<SIM_SDID_SUBFAMID_SHIFT))&SIM_SDID_SUBFAMID_MASK)
|
||
|
#define SIM_SDID_FAMID_MASK 0xF0000000u
|
||
|
#define SIM_SDID_FAMID_SHIFT 28
|
||
|
#define SIM_SDID_FAMID_WIDTH 4
|
||
|
#define SIM_SDID_FAMID(x) (((uint32_t)(((uint32_t)(x))<<SIM_SDID_FAMID_SHIFT))&SIM_SDID_FAMID_MASK)
|
||
|
/* SCGC4 Bit Fields */
|
||
|
#define SIM_SCGC4_I2C0_MASK 0x40u
|
||
|
#define SIM_SCGC4_I2C0_SHIFT 6
|
||
|
#define SIM_SCGC4_I2C0_WIDTH 1
|
||
|
#define SIM_SCGC4_I2C0(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_I2C0_SHIFT))&SIM_SCGC4_I2C0_MASK)
|
||
|
#define SIM_SCGC4_I2C1_MASK 0x80u
|
||
|
#define SIM_SCGC4_I2C1_SHIFT 7
|
||
|
#define SIM_SCGC4_I2C1_WIDTH 1
|
||
|
#define SIM_SCGC4_I2C1(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_I2C1_SHIFT))&SIM_SCGC4_I2C1_MASK)
|
||
|
#define SIM_SCGC4_UART0_MASK 0x400u
|
||
|
#define SIM_SCGC4_UART0_SHIFT 10
|
||
|
#define SIM_SCGC4_UART0_WIDTH 1
|
||
|
#define SIM_SCGC4_UART0(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_UART0_SHIFT))&SIM_SCGC4_UART0_MASK)
|
||
|
#define SIM_SCGC4_UART1_MASK 0x800u
|
||
|
#define SIM_SCGC4_UART1_SHIFT 11
|
||
|
#define SIM_SCGC4_UART1_WIDTH 1
|
||
|
#define SIM_SCGC4_UART1(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_UART1_SHIFT))&SIM_SCGC4_UART1_MASK)
|
||
|
#define SIM_SCGC4_UART2_MASK 0x1000u
|
||
|
#define SIM_SCGC4_UART2_SHIFT 12
|
||
|
#define SIM_SCGC4_UART2_WIDTH 1
|
||
|
#define SIM_SCGC4_UART2(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_UART2_SHIFT))&SIM_SCGC4_UART2_MASK)
|
||
|
#define SIM_SCGC4_USBOTG_MASK 0x40000u
|
||
|
#define SIM_SCGC4_USBOTG_SHIFT 18
|
||
|
#define SIM_SCGC4_USBOTG_WIDTH 1
|
||
|
#define SIM_SCGC4_USBOTG(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_USBOTG_SHIFT))&SIM_SCGC4_USBOTG_MASK)
|
||
|
#define SIM_SCGC4_CMP_MASK 0x80000u
|
||
|
#define SIM_SCGC4_CMP_SHIFT 19
|
||
|
#define SIM_SCGC4_CMP_WIDTH 1
|
||
|
#define SIM_SCGC4_CMP(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_CMP_SHIFT))&SIM_SCGC4_CMP_MASK)
|
||
|
#define SIM_SCGC4_SPI0_MASK 0x400000u
|
||
|
#define SIM_SCGC4_SPI0_SHIFT 22
|
||
|
#define SIM_SCGC4_SPI0_WIDTH 1
|
||
|
#define SIM_SCGC4_SPI0(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_SPI0_SHIFT))&SIM_SCGC4_SPI0_MASK)
|
||
|
#define SIM_SCGC4_SPI1_MASK 0x800000u
|
||
|
#define SIM_SCGC4_SPI1_SHIFT 23
|
||
|
#define SIM_SCGC4_SPI1_WIDTH 1
|
||
|
#define SIM_SCGC4_SPI1(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC4_SPI1_SHIFT))&SIM_SCGC4_SPI1_MASK)
|
||
|
/* SCGC5 Bit Fields */
|
||
|
#define SIM_SCGC5_LPTMR_MASK 0x1u
|
||
|
#define SIM_SCGC5_LPTMR_SHIFT 0
|
||
|
#define SIM_SCGC5_LPTMR_WIDTH 1
|
||
|
#define SIM_SCGC5_LPTMR(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC5_LPTMR_SHIFT))&SIM_SCGC5_LPTMR_MASK)
|
||
|
#define SIM_SCGC5_TSI_MASK 0x20u
|
||
|
#define SIM_SCGC5_TSI_SHIFT 5
|
||
|
#define SIM_SCGC5_TSI_WIDTH 1
|
||
|
#define SIM_SCGC5_TSI(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC5_TSI_SHIFT))&SIM_SCGC5_TSI_MASK)
|
||
|
#define SIM_SCGC5_PORTA_MASK 0x200u
|
||
|
#define SIM_SCGC5_PORTA_SHIFT 9
|
||
|
#define SIM_SCGC5_PORTA_WIDTH 1
|
||
|
#define SIM_SCGC5_PORTA(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC5_PORTA_SHIFT))&SIM_SCGC5_PORTA_MASK)
|
||
|
#define SIM_SCGC5_PORTB_MASK 0x400u
|
||
|
#define SIM_SCGC5_PORTB_SHIFT 10
|
||
|
#define SIM_SCGC5_PORTB_WIDTH 1
|
||
|
#define SIM_SCGC5_PORTB(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC5_PORTB_SHIFT))&SIM_SCGC5_PORTB_MASK)
|
||
|
#define SIM_SCGC5_PORTC_MASK 0x800u
|
||
|
#define SIM_SCGC5_PORTC_SHIFT 11
|
||
|
#define SIM_SCGC5_PORTC_WIDTH 1
|
||
|
#define SIM_SCGC5_PORTC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC5_PORTC_SHIFT))&SIM_SCGC5_PORTC_MASK)
|
||
|
#define SIM_SCGC5_PORTD_MASK 0x1000u
|
||
|
#define SIM_SCGC5_PORTD_SHIFT 12
|
||
|
#define SIM_SCGC5_PORTD_WIDTH 1
|
||
|
#define SIM_SCGC5_PORTD(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC5_PORTD_SHIFT))&SIM_SCGC5_PORTD_MASK)
|
||
|
#define SIM_SCGC5_PORTE_MASK 0x2000u
|
||
|
#define SIM_SCGC5_PORTE_SHIFT 13
|
||
|
#define SIM_SCGC5_PORTE_WIDTH 1
|
||
|
#define SIM_SCGC5_PORTE(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC5_PORTE_SHIFT))&SIM_SCGC5_PORTE_MASK)
|
||
|
/* SCGC6 Bit Fields */
|
||
|
#define SIM_SCGC6_FTF_MASK 0x1u
|
||
|
#define SIM_SCGC6_FTF_SHIFT 0
|
||
|
#define SIM_SCGC6_FTF_WIDTH 1
|
||
|
#define SIM_SCGC6_FTF(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_FTF_SHIFT))&SIM_SCGC6_FTF_MASK)
|
||
|
#define SIM_SCGC6_DMAMUX_MASK 0x2u
|
||
|
#define SIM_SCGC6_DMAMUX_SHIFT 1
|
||
|
#define SIM_SCGC6_DMAMUX_WIDTH 1
|
||
|
#define SIM_SCGC6_DMAMUX(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_DMAMUX_SHIFT))&SIM_SCGC6_DMAMUX_MASK)
|
||
|
#define SIM_SCGC6_PIT_MASK 0x800000u
|
||
|
#define SIM_SCGC6_PIT_SHIFT 23
|
||
|
#define SIM_SCGC6_PIT_WIDTH 1
|
||
|
#define SIM_SCGC6_PIT(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_PIT_SHIFT))&SIM_SCGC6_PIT_MASK)
|
||
|
#define SIM_SCGC6_TPM0_MASK 0x1000000u
|
||
|
#define SIM_SCGC6_TPM0_SHIFT 24
|
||
|
#define SIM_SCGC6_TPM0_WIDTH 1
|
||
|
#define SIM_SCGC6_TPM0(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_TPM0_SHIFT))&SIM_SCGC6_TPM0_MASK)
|
||
|
#define SIM_SCGC6_TPM1_MASK 0x2000000u
|
||
|
#define SIM_SCGC6_TPM1_SHIFT 25
|
||
|
#define SIM_SCGC6_TPM1_WIDTH 1
|
||
|
#define SIM_SCGC6_TPM1(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_TPM1_SHIFT))&SIM_SCGC6_TPM1_MASK)
|
||
|
#define SIM_SCGC6_TPM2_MASK 0x4000000u
|
||
|
#define SIM_SCGC6_TPM2_SHIFT 26
|
||
|
#define SIM_SCGC6_TPM2_WIDTH 1
|
||
|
#define SIM_SCGC6_TPM2(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_TPM2_SHIFT))&SIM_SCGC6_TPM2_MASK)
|
||
|
#define SIM_SCGC6_ADC0_MASK 0x8000000u
|
||
|
#define SIM_SCGC6_ADC0_SHIFT 27
|
||
|
#define SIM_SCGC6_ADC0_WIDTH 1
|
||
|
#define SIM_SCGC6_ADC0(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_ADC0_SHIFT))&SIM_SCGC6_ADC0_MASK)
|
||
|
#define SIM_SCGC6_RTC_MASK 0x20000000u
|
||
|
#define SIM_SCGC6_RTC_SHIFT 29
|
||
|
#define SIM_SCGC6_RTC_WIDTH 1
|
||
|
#define SIM_SCGC6_RTC(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_RTC_SHIFT))&SIM_SCGC6_RTC_MASK)
|
||
|
#define SIM_SCGC6_DAC0_MASK 0x80000000u
|
||
|
#define SIM_SCGC6_DAC0_SHIFT 31
|
||
|
#define SIM_SCGC6_DAC0_WIDTH 1
|
||
|
#define SIM_SCGC6_DAC0(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC6_DAC0_SHIFT))&SIM_SCGC6_DAC0_MASK)
|
||
|
/* SCGC7 Bit Fields */
|
||
|
#define SIM_SCGC7_DMA_MASK 0x100u
|
||
|
#define SIM_SCGC7_DMA_SHIFT 8
|
||
|
#define SIM_SCGC7_DMA_WIDTH 1
|
||
|
#define SIM_SCGC7_DMA(x) (((uint32_t)(((uint32_t)(x))<<SIM_SCGC7_DMA_SHIFT))&SIM_SCGC7_DMA_MASK)
|
||
|
/* CLKDIV1 Bit Fields */
|
||
|
#define SIM_CLKDIV1_OUTDIV4_MASK 0x70000u
|
||
|
#define SIM_CLKDIV1_OUTDIV4_SHIFT 16
|
||
|
#define SIM_CLKDIV1_OUTDIV4_WIDTH 3
|
||
|
#define SIM_CLKDIV1_OUTDIV4(x) (((uint32_t)(((uint32_t)(x))<<SIM_CLKDIV1_OUTDIV4_SHIFT))&SIM_CLKDIV1_OUTDIV4_MASK)
|
||
|
#define SIM_CLKDIV1_OUTDIV1_MASK 0xF0000000u
|
||
|
#define SIM_CLKDIV1_OUTDIV1_SHIFT 28
|
||
|
#define SIM_CLKDIV1_OUTDIV1_WIDTH 4
|
||
|
#define SIM_CLKDIV1_OUTDIV1(x) (((uint32_t)(((uint32_t)(x))<<SIM_CLKDIV1_OUTDIV1_SHIFT))&SIM_CLKDIV1_OUTDIV1_MASK)
|
||
|
/* FCFG1 Bit Fields */
|
||
|
#define SIM_FCFG1_FLASHDIS_MASK 0x1u
|
||
|
#define SIM_FCFG1_FLASHDIS_SHIFT 0
|
||
|
#define SIM_FCFG1_FLASHDIS_WIDTH 1
|
||
|
#define SIM_FCFG1_FLASHDIS(x) (((uint32_t)(((uint32_t)(x))<<SIM_FCFG1_FLASHDIS_SHIFT))&SIM_FCFG1_FLASHDIS_MASK)
|
||
|
#define SIM_FCFG1_FLASHDOZE_MASK 0x2u
|
||
|
#define SIM_FCFG1_FLASHDOZE_SHIFT 1
|
||
|
#define SIM_FCFG1_FLASHDOZE_WIDTH 1
|
||
|
#define SIM_FCFG1_FLASHDOZE(x) (((uint32_t)(((uint32_t)(x))<<SIM_FCFG1_FLASHDOZE_SHIFT))&SIM_FCFG1_FLASHDOZE_MASK)
|
||
|
#define SIM_FCFG1_PFSIZE_MASK 0xF000000u
|
||
|
#define SIM_FCFG1_PFSIZE_SHIFT 24
|
||
|
#define SIM_FCFG1_PFSIZE_WIDTH 4
|
||
|
#define SIM_FCFG1_PFSIZE(x) (((uint32_t)(((uint32_t)(x))<<SIM_FCFG1_PFSIZE_SHIFT))&SIM_FCFG1_PFSIZE_MASK)
|
||
|
/* FCFG2 Bit Fields */
|
||
|
#define SIM_FCFG2_MAXADDR0_MASK 0x7F000000u
|
||
|
#define SIM_FCFG2_MAXADDR0_SHIFT 24
|
||
|
#define SIM_FCFG2_MAXADDR0_WIDTH 7
|
||
|
#define SIM_FCFG2_MAXADDR0(x) (((uint32_t)(((uint32_t)(x))<<SIM_FCFG2_MAXADDR0_SHIFT))&SIM_FCFG2_MAXADDR0_MASK)
|
||
|
/* UIDMH Bit Fields */
|
||
|
#define SIM_UIDMH_UID_MASK 0xFFFFu
|
||
|
#define SIM_UIDMH_UID_SHIFT 0
|
||
|
#define SIM_UIDMH_UID_WIDTH 16
|
||
|
#define SIM_UIDMH_UID(x) (((uint32_t)(((uint32_t)(x))<<SIM_UIDMH_UID_SHIFT))&SIM_UIDMH_UID_MASK)
|
||
|
/* UIDML Bit Fields */
|
||
|
#define SIM_UIDML_UID_MASK 0xFFFFFFFFu
|
||
|
#define SIM_UIDML_UID_SHIFT 0
|
||
|
#define SIM_UIDML_UID_WIDTH 32
|
||
|
#define SIM_UIDML_UID(x) (((uint32_t)(((uint32_t)(x))<<SIM_UIDML_UID_SHIFT))&SIM_UIDML_UID_MASK)
|
||
|
/* UIDL Bit Fields */
|
||
|
#define SIM_UIDL_UID_MASK 0xFFFFFFFFu
|
||
|
#define SIM_UIDL_UID_SHIFT 0
|
||
|
#define SIM_UIDL_UID_WIDTH 32
|
||
|
#define SIM_UIDL_UID(x) (((uint32_t)(((uint32_t)(x))<<SIM_UIDL_UID_SHIFT))&SIM_UIDL_UID_MASK)
|
||
|
/* COPC Bit Fields */
|
||
|
#define SIM_COPC_COPW_MASK 0x1u
|
||
|
#define SIM_COPC_COPW_SHIFT 0
|
||
|
#define SIM_COPC_COPW_WIDTH 1
|
||
|
#define SIM_COPC_COPW(x) (((uint32_t)(((uint32_t)(x))<<SIM_COPC_COPW_SHIFT))&SIM_COPC_COPW_MASK)
|
||
|
#define SIM_COPC_COPCLKS_MASK 0x2u
|
||
|
#define SIM_COPC_COPCLKS_SHIFT 1
|
||
|
#define SIM_COPC_COPCLKS_WIDTH 1
|
||
|
#define SIM_COPC_COPCLKS(x) (((uint32_t)(((uint32_t)(x))<<SIM_COPC_COPCLKS_SHIFT))&SIM_COPC_COPCLKS_MASK)
|
||
|
#define SIM_COPC_COPT_MASK 0xCu
|
||
|
#define SIM_COPC_COPT_SHIFT 2
|
||
|
#define SIM_COPC_COPT_WIDTH 2
|
||
|
#define SIM_COPC_COPT(x) (((uint32_t)(((uint32_t)(x))<<SIM_COPC_COPT_SHIFT))&SIM_COPC_COPT_MASK)
|
||
|
/* SRVCOP Bit Fields */
|
||
|
#define SIM_SRVCOP_SRVCOP_MASK 0xFFu
|
||
|
#define SIM_SRVCOP_SRVCOP_SHIFT 0
|
||
|
#define SIM_SRVCOP_SRVCOP_WIDTH 8
|
||
|
#define SIM_SRVCOP_SRVCOP(x) (((uint32_t)(((uint32_t)(x))<<SIM_SRVCOP_SRVCOP_SHIFT))&SIM_SRVCOP_SRVCOP_MASK)
|
||
|
|
||
|
/*!
|
||
|
* @}
|
||
|
*/ /* end of group SIM_Register_Masks */
|
||
|
|
||
|
/* ----------------------------------------------------------------------------
|
||
|
-- 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_PS_WIDTH 1
|
||
|
#define PORT_PCR_PS(x) (((uint32_t)(((uint32_t)(x))<<PORT_PCR_PS_SHIFT))&PORT_PCR_PS_MASK)
|
||
|
#define PORT_PCR_PE_MASK 0x2u
|
||
|
#define PORT_PCR_PE_SHIFT 1
|
||
|
#define PORT_PCR_PE_WIDTH 1
|
||
|
#define PORT_PCR_PE(x) (((uint32_t)(((uint32_t)(x))<<PORT_PCR_PE_SHIFT))&PORT_PCR_PE_MASK)
|
||
|
#define PORT_PCR_SRE_MASK 0x4u
|
||
|
#define PORT_PCR_SRE_SHIFT 2
|
||
|
#define PORT_PCR_SRE_WIDTH 1
|
||
|
#define PORT_PCR_SRE(x) (((uint32_t)(((uint32_t)(x))<<PORT_PCR_SRE_SHIFT))&PORT_PCR_SRE_MASK)
|
||
|
#define PORT_PCR_PFE_MASK 0x10u
|
||
|
#define PORT_PCR_PFE_SHIFT 4
|
||
|
#define PORT_PCR_PFE_WIDTH 1
|
||
|
#define PORT_PCR_PFE(x) (((uint32_t)(((uint32_t)(x))<<PORT_PCR_PFE_SHIFT))&PORT_PCR_PFE_MASK)
|
||
|
#define PORT_PCR_DSE_MASK 0x40u
|
||
|
#define PORT_PCR_DSE_SHIFT 6
|
||
|
#define PORT_PCR_DSE_WIDTH 1
|
||
|
#define PORT_PCR_DSE(x) (((uint32_t)(((uint32_t)(x))<<PORT_PCR_DSE_SHIFT))&PORT_PCR_DSE_MASK)
|
||
|
#define PORT_PCR_MUX_MASK 0x700u
|
||
|
#define PORT_PCR_MUX_SHIFT 8
|
||
|
#define PORT_PCR_MUX_WIDTH 3
|
||
|
#define PORT_PCR_MUX(x) (((uint32_t)(((uint32_t)(x))<<PORT_PCR_MUX_SHIFT))&PORT_PCR_MUX_MASK)
|
||
|
#define PORT_PCR_IRQC_MASK 0xF0000u
|
||
|
#define PORT_PCR_IRQC_SHIFT 16
|
||
|
#define PORT_PCR_IRQC_WIDTH 4
|
||
|
#define PORT_PCR_IRQC(x) (((uint32_t)(((uint32_t)(x))<<PORT_PCR_IRQC_SHIFT))&PORT_PCR_IRQC_MASK)
|
||
|
#define PORT_PCR_ISF_MASK 0x1000000u
|
||
|
#define PORT_PCR_ISF_SHIFT 24
|
||
|
#define PORT_PCR_ISF_WIDTH 1
|
||
|
#define PORT_PCR_ISF(x) (((uint32_t)(((uint32_t)(x))<<PORT_PCR_ISF_SHIFT))&PORT_PCR_ISF_MASK)
|
||
|
/* GPCLR Bit Fields */
|
||
|
#define PORT_GPCLR_GPWD_MASK 0xFFFFu
|
||
|
#define PORT_GPCLR_GPWD_SHIFT 0
|
||
|
#define PORT_GPCLR_GPWD_WIDTH 16
|
||
|
#define PORT_GPCLR_GPWD(x) (((uint32_t)(((uint32_t)(x))<<PORT_GPCLR_GPWD_SHIFT))&PORT_GPCLR_GPWD_MASK)
|
||
|
#define PORT_GPCLR_GPWE_MASK 0xFFFF0000u
|
||
|
#define PORT_GPCLR_GPWE_SHIFT 16
|
||
|
#define PORT_GPCLR_GPWE_WIDTH 16
|
||
|
#define PORT_GPCLR_GPWE(x) (((uint32_t)(((uint32_t)(x))<<PORT_GPCLR_GPWE_SHIFT))&PORT_GPCLR_GPWE_MASK)
|
||
|
/* GPCHR Bit Fields */
|
||
|
#define PORT_GPCHR_GPWD_MASK 0xFFFFu
|
||
|
#define PORT_GPCHR_GPWD_SHIFT 0
|
||
|
#define PORT_GPCHR_GPWD_WIDTH 16
|
||
|
#define PORT_GPCHR_GPWD(x) (((uint32_t)(((uint32_t)(x))<<PORT_GPCHR_GPWD_SHIFT))&PORT_GPCHR_GPWD_MASK)
|
||
|
#define PORT_GPCHR_GPWE_MASK 0xFFFF0000u
|
||
|
#define PORT_GPCHR_GPWE_SHIFT 16
|
||
|
#define PORT_GPCHR_GPWE_WIDTH 16
|
||
|
#define PORT_GPCHR_GPWE(x) (((uint32_t)(((uint32_t)(x))<<PORT_GPCHR_GPWE_SHIFT))&PORT_GPCHR_GPWE_MASK)
|
||
|
/* ISFR Bit Fields */
|
||
|
#define PORT_ISFR_ISF_MASK 0xFFFFFFFFu
|
||
|
#define PORT_ISFR_ISF_SHIFT 0
|
||
|
#define PORT_ISFR_ISF_WIDTH 32
|
||
|
#define PORT_ISFR_ISF(x) (((uint32_t)(((uint32_t)(x))<<PORT_ISFR_ISF_SHIFT))&PORT_ISFR_ISF_MASK)
|
||
|
|
||
|
/*!
|
||
|
* @}
|
||
|
*/ /* end of group PORT_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))<<ADC_SC1_ADCH_SHIFT))&ADC_SC1_ADCH_MASK)
|
||
|
#define ADC_SC1_DIFF_MASK 0x20u
|
||
|
#define ADC_SC1_DIFF_SHIFT 5
|
||
|
#define ADC_SC1_DIFF_WIDTH 1
|
||
|
#define ADC_SC1_DIFF(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC1_DIFF_SHIFT))&ADC_SC1_DIFF_MASK)
|
||
|
#define ADC_SC1_AIEN_MASK 0x40u
|
||
|
#define ADC_SC1_AIEN_SHIFT 6
|
||
|
#define ADC_SC1_AIEN_WIDTH 1
|
||
|
#define ADC_SC1_AIEN(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC1_AIEN_SHIFT))&ADC_SC1_AIEN_MASK)
|
||
|
#define ADC_SC1_COCO_MASK 0x80u
|
||
|
#define ADC_SC1_COCO_SHIFT 7
|
||
|
#define ADC_SC1_COCO_WIDTH 1
|
||
|
#define ADC_SC1_COCO(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC1_COCO_SHIFT))&ADC_SC1_COCO_MASK)
|
||
|
/* CFG1 Bit Fields */
|
||
|
#define ADC_CFG1_ADICLK_MASK 0x3u
|
||
|
#define ADC_CFG1_ADICLK_SHIFT 0
|
||
|
#define ADC_CFG1_ADICLK_WIDTH 2
|
||
|
#define ADC_CFG1_ADICLK(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG1_ADICLK_SHIFT))&ADC_CFG1_ADICLK_MASK)
|
||
|
#define ADC_CFG1_MODE_MASK 0xCu
|
||
|
#define ADC_CFG1_MODE_SHIFT 2
|
||
|
#define ADC_CFG1_MODE_WIDTH 2
|
||
|
#define ADC_CFG1_MODE(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG1_MODE_SHIFT))&ADC_CFG1_MODE_MASK)
|
||
|
#define ADC_CFG1_ADLSMP_MASK 0x10u
|
||
|
#define ADC_CFG1_ADLSMP_SHIFT 4
|
||
|
#define ADC_CFG1_ADLSMP_WIDTH 1
|
||
|
#define ADC_CFG1_ADLSMP(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG1_ADLSMP_SHIFT))&ADC_CFG1_ADLSMP_MASK)
|
||
|
#define ADC_CFG1_ADIV_MASK 0x60u
|
||
|
#define ADC_CFG1_ADIV_SHIFT 5
|
||
|
#define ADC_CFG1_ADIV_WIDTH 2
|
||
|
#define ADC_CFG1_ADIV(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG1_ADIV_SHIFT))&ADC_CFG1_ADIV_MASK)
|
||
|
#define ADC_CFG1_ADLPC_MASK 0x80u
|
||
|
#define ADC_CFG1_ADLPC_SHIFT 7
|
||
|
#define ADC_CFG1_ADLPC_WIDTH 1
|
||
|
#define ADC_CFG1_ADLPC(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG1_ADLPC_SHIFT))&ADC_CFG1_ADLPC_MASK)
|
||
|
/* CFG2 Bit Fields */
|
||
|
#define ADC_CFG2_ADLSTS_MASK 0x3u
|
||
|
#define ADC_CFG2_ADLSTS_SHIFT 0
|
||
|
#define ADC_CFG2_ADLSTS_WIDTH 2
|
||
|
#define ADC_CFG2_ADLSTS(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG2_ADLSTS_SHIFT))&ADC_CFG2_ADLSTS_MASK)
|
||
|
#define ADC_CFG2_ADHSC_MASK 0x4u
|
||
|
#define ADC_CFG2_ADHSC_SHIFT 2
|
||
|
#define ADC_CFG2_ADHSC_WIDTH 1
|
||
|
#define ADC_CFG2_ADHSC(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG2_ADHSC_SHIFT))&ADC_CFG2_ADHSC_MASK)
|
||
|
#define ADC_CFG2_ADACKEN_MASK 0x8u
|
||
|
#define ADC_CFG2_ADACKEN_SHIFT 3
|
||
|
#define ADC_CFG2_ADACKEN_WIDTH 1
|
||
|
#define ADC_CFG2_ADACKEN(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG2_ADACKEN_SHIFT))&ADC_CFG2_ADACKEN_MASK)
|
||
|
#define ADC_CFG2_MUXSEL_MASK 0x10u
|
||
|
#define ADC_CFG2_MUXSEL_SHIFT 4
|
||
|
#define ADC_CFG2_MUXSEL_WIDTH 1
|
||
|
#define ADC_CFG2_MUXSEL(x) (((uint32_t)(((uint32_t)(x))<<ADC_CFG2_MUXSEL_SHIFT))&ADC_CFG2_MUXSEL_MASK)
|
||
|
/* R Bit Fields */
|
||
|
#define ADC_R_D_MASK 0xFFFFu
|
||
|
#define ADC_R_D_SHIFT 0
|
||
|
#define ADC_R_D_WIDTH 16
|
||
|
#define ADC_R_D(x) (((uint32_t)(((uint32_t)(x))<<ADC_R_D_SHIFT))&ADC_R_D_MASK)
|
||
|
/* CV1 Bit Fields */
|
||
|
#define ADC_CV1_CV_MASK 0xFFFFu
|
||
|
#define ADC_CV1_CV_SHIFT 0
|
||
|
#define ADC_CV1_CV_WIDTH 16
|
||
|
#define ADC_CV1_CV(x) (((uint32_t)(((uint32_t)(x))<<ADC_CV1_CV_SHIFT))&ADC_CV1_CV_MASK)
|
||
|
/* CV2 Bit Fields */
|
||
|
#define ADC_CV2_CV_MASK 0xFFFFu
|
||
|
#define ADC_CV2_CV_SHIFT 0
|
||
|
#define ADC_CV2_CV_WIDTH 16
|
||
|
#define ADC_CV2_CV(x) (((uint32_t)(((uint32_t)(x))<<ADC_CV2_CV_SHIFT))&ADC_CV2_CV_MASK)
|
||
|
/* SC2 Bit Fields */
|
||
|
#define ADC_SC2_REFSEL_MASK 0x3u
|
||
|
#define ADC_SC2_REFSEL_SHIFT 0
|
||
|
#define ADC_SC2_REFSEL_WIDTH 2
|
||
|
#define ADC_SC2_REFSEL(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC2_REFSEL_SHIFT))&ADC_SC2_REFSEL_MASK)
|
||
|
#define ADC_SC2_DMAEN_MASK 0x4u
|
||
|
#define ADC_SC2_DMAEN_SHIFT 2
|
||
|
#define ADC_SC2_DMAEN_WIDTH 1
|
||
|
#define ADC_SC2_DMAEN(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC2_DMAEN_SHIFT))&ADC_SC2_DMAEN_MASK)
|
||
|
#define ADC_SC2_ACREN_MASK 0x8u
|
||
|
#define ADC_SC2_ACREN_SHIFT 3
|
||
|
#define ADC_SC2_ACREN_WIDTH 1
|
||
|
#define ADC_SC2_ACREN(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC2_ACREN_SHIFT))&ADC_SC2_ACREN_MASK)
|
||
|
#define ADC_SC2_ACFGT_MASK 0x10u
|
||
|
#define ADC_SC2_ACFGT_SHIFT 4
|
||
|
#define ADC_SC2_ACFGT_WIDTH 1
|
||
|
#define ADC_SC2_ACFGT(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC2_ACFGT_SHIFT))&ADC_SC2_ACFGT_MASK)
|
||
|
#define ADC_SC2_ACFE_MASK 0x20u
|
||
|
#define ADC_SC2_ACFE_SHIFT 5
|
||
|
#define ADC_SC2_ACFE_WIDTH 1
|
||
|
#define ADC_SC2_ACFE(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC2_ACFE_SHIFT))&ADC_SC2_ACFE_MASK)
|
||
|
#define ADC_SC2_ADTRG_MASK 0x40u
|
||
|
#define ADC_SC2_ADTRG_SHIFT 6
|
||
|
#define ADC_SC2_ADTRG_WIDTH 1
|
||
|
#define ADC_SC2_ADTRG(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC2_ADTRG_SHIFT))&ADC_SC2_ADTRG_MASK)
|
||
|
#define ADC_SC2_ADACT_MASK 0x80u
|
||
|
#define ADC_SC2_ADACT_SHIFT 7
|
||
|
#define ADC_SC2_ADACT_WIDTH 1
|
||
|
#define ADC_SC2_ADACT(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC2_ADACT_SHIFT))&ADC_SC2_ADACT_MASK)
|
||
|
/* SC3 Bit Fields */
|
||
|
#define ADC_SC3_AVGS_MASK 0x3u
|
||
|
#define ADC_SC3_AVGS_SHIFT 0
|
||
|
#define ADC_SC3_AVGS_WIDTH 2
|
||
|
#define ADC_SC3_AVGS(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC3_AVGS_SHIFT))&ADC_SC3_AVGS_MASK)
|
||
|
#define ADC_SC3_AVGE_MASK 0x4u
|
||
|
#define ADC_SC3_AVGE_SHIFT 2
|
||
|
#define ADC_SC3_AVGE_WIDTH 1
|
||
|
#define ADC_SC3_AVGE(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC3_AVGE_SHIFT))&ADC_SC3_AVGE_MASK)
|
||
|
#define ADC_SC3_ADCO_MASK 0x8u
|
||
|
#define ADC_SC3_ADCO_SHIFT 3
|
||
|
#define ADC_SC3_ADCO_WIDTH 1
|
||
|
#define ADC_SC3_ADCO(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC3_ADCO_SHIFT))&ADC_SC3_ADCO_MASK)
|
||
|
#define ADC_SC3_CALF_MASK 0x40u
|
||
|
#define ADC_SC3_CALF_SHIFT 6
|
||
|
#define ADC_SC3_CALF_WIDTH 1
|
||
|
#define ADC_SC3_CALF(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC3_CALF_SHIFT))&ADC_SC3_CALF_MASK)
|
||
|
#define ADC_SC3_CAL_MASK 0x80u
|
||
|
#define ADC_SC3_CAL_SHIFT 7
|
||
|
#define ADC_SC3_CAL_WIDTH 1
|
||
|
#define ADC_SC3_CAL(x) (((uint32_t)(((uint32_t)(x))<<ADC_SC3_CAL_SHIFT))&ADC_SC3_CAL_MASK)
|
||
|
/* OFS Bit Fields */
|
||
|
#define ADC_OFS_OFS_MASK 0xFFFFu
|
||
|
#define ADC_OFS_OFS_SHIFT 0
|
||
|
#define ADC_OFS_OFS_WIDTH 16
|
||
|
#define ADC_OFS_OFS(x) (((uint32_t)(((uint32_t)(x))<<ADC_OFS_OFS_SHIFT))&ADC_OFS_OFS_MASK)
|
||
|
/* PG Bit Fields */
|
||
|
#define ADC_PG_PG_MASK 0xFFFFu
|
||
|
#define ADC_PG_PG_SHIFT 0
|
||
|
#define ADC_PG_PG_WIDTH 16
|
||
|
#define ADC_PG_PG(x) (((uint32_t)(((uint32_t)(x))<<ADC_PG_PG_SHIFT))&ADC_PG_PG_MASK)
|
||
|
/* MG Bit Fields */
|
||
|
#define ADC_MG_MG_MASK 0xFFFFu
|
||
|
#define ADC_MG_MG_SHIFT 0
|
||
|
#define ADC_MG_MG_WIDTH 16
|
||
|
#define ADC_MG_MG(x) (((uint32_t)(((uint32_t)(x))<<ADC_MG_MG_SHIFT))&ADC_MG_MG_MASK)
|
||
|
/* CLPD Bit Fields */
|
||
|
#define ADC_CLPD_CLPD_MASK 0x3Fu
|
||
|
#define ADC_CLPD_CLPD_SHIFT 0
|
||
|
#define ADC_CLPD_CLPD_WIDTH 6
|
||
|
#define ADC_CLPD_CLPD(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLPD_CLPD_SHIFT))&ADC_CLPD_CLPD_MASK)
|
||
|
/* CLPS Bit Fields */
|
||
|
#define ADC_CLPS_CLPS_MASK 0x3Fu
|
||
|
#define ADC_CLPS_CLPS_SHIFT 0
|
||
|
#define ADC_CLPS_CLPS_WIDTH 6
|
||
|
#define ADC_CLPS_CLPS(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLPS_CLPS_SHIFT))&ADC_CLPS_CLPS_MASK)
|
||
|
/* CLP4 Bit Fields */
|
||
|
#define ADC_CLP4_CLP4_MASK 0x3FFu
|
||
|
#define ADC_CLP4_CLP4_SHIFT 0
|
||
|
#define ADC_CLP4_CLP4_WIDTH 10
|
||
|
#define ADC_CLP4_CLP4(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLP4_CLP4_SHIFT))&ADC_CLP4_CLP4_MASK)
|
||
|
/* CLP3 Bit Fields */
|
||
|
#define ADC_CLP3_CLP3_MASK 0x1FFu
|
||
|
#define ADC_CLP3_CLP3_SHIFT 0
|
||
|
#define ADC_CLP3_CLP3_WIDTH 9
|
||
|
#define ADC_CLP3_CLP3(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLP3_CLP3_SHIFT))&ADC_CLP3_CLP3_MASK)
|
||
|
/* CLP2 Bit Fields */
|
||
|
#define ADC_CLP2_CLP2_MASK 0xFFu
|
||
|
#define ADC_CLP2_CLP2_SHIFT 0
|
||
|
#define ADC_CLP2_CLP2_WIDTH 8
|
||
|
#define ADC_CLP2_CLP2(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLP2_CLP2_SHIFT))&ADC_CLP2_CLP2_MASK)
|
||
|
/* CLP1 Bit Fields */
|
||
|
#define ADC_CLP1_CLP1_MASK 0x7Fu
|
||
|
#define ADC_CLP1_CLP1_SHIFT 0
|
||
|
#define ADC_CLP1_CLP1_WIDTH 7
|
||
|
#define ADC_CLP1_CLP1(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLP1_CLP1_SHIFT))&ADC_CLP1_CLP1_MASK)
|
||
|
/* CLP0 Bit Fields */
|
||
|
#define ADC_CLP0_CLP0_MASK 0x3Fu
|
||
|
#define ADC_CLP0_CLP0_SHIFT 0
|
||
|
#define ADC_CLP0_CLP0_WIDTH 6
|
||
|
#define ADC_CLP0_CLP0(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLP0_CLP0_SHIFT))&ADC_CLP0_CLP0_MASK)
|
||
|
/* CLMD Bit Fields */
|
||
|
#define ADC_CLMD_CLMD_MASK 0x3Fu
|
||
|
#define ADC_CLMD_CLMD_SHIFT 0
|
||
|
#define ADC_CLMD_CLMD_WIDTH 6
|
||
|
#define ADC_CLMD_CLMD(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLMD_CLMD_SHIFT))&ADC_CLMD_CLMD_MASK)
|
||
|
/* CLMS Bit Fields */
|
||
|
#define ADC_CLMS_CLMS_MASK 0x3Fu
|
||
|
#define ADC_CLMS_CLMS_SHIFT 0
|
||
|
#define ADC_CLMS_CLMS_WIDTH 6
|
||
|
#define ADC_CLMS_CLMS(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLMS_CLMS_SHIFT))&ADC_CLMS_CLMS_MASK)
|
||
|
/* CLM4 Bit Fields */
|
||
|
#define ADC_CLM4_CLM4_MASK 0x3FFu
|
||
|
#define ADC_CLM4_CLM4_SHIFT 0
|
||
|
#define ADC_CLM4_CLM4_WIDTH 10
|
||
|
#define ADC_CLM4_CLM4(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLM4_CLM4_SHIFT))&ADC_CLM4_CLM4_MASK)
|
||
|
/* CLM3 Bit Fields */
|
||
|
#define ADC_CLM3_CLM3_MASK 0x1FFu
|
||
|
#define ADC_CLM3_CLM3_SHIFT 0
|
||
|
#define ADC_CLM3_CLM3_WIDTH 9
|
||
|
#define ADC_CLM3_CLM3(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLM3_CLM3_SHIFT))&ADC_CLM3_CLM3_MASK)
|
||
|
/* CLM2 Bit Fields */
|
||
|
#define ADC_CLM2_CLM2_MASK 0xFFu
|
||
|
#define ADC_CLM2_CLM2_SHIFT 0
|
||
|
#define ADC_CLM2_CLM2_WIDTH 8
|
||
|
#define ADC_CLM2_CLM2(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLM2_CLM2_SHIFT))&ADC_CLM2_CLM2_MASK)
|
||
|
/* CLM1 Bit Fields */
|
||
|
#define ADC_CLM1_CLM1_MASK 0x7Fu
|
||
|
#define ADC_CLM1_CLM1_SHIFT 0
|
||
|
#define ADC_CLM1_CLM1_WIDTH 7
|
||
|
#define ADC_CLM1_CLM1(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLM1_CLM1_SHIFT))&ADC_CLM1_CLM1_MASK)
|
||
|
/* CLM0 Bit Fields */
|
||
|
#define ADC_CLM0_CLM0_MASK 0x3Fu
|
||
|
#define ADC_CLM0_CLM0_SHIFT 0
|
||
|
#define ADC_CLM0_CLM0_WIDTH 6
|
||
|
#define ADC_CLM0_CLM0(x) (((uint32_t)(((uint32_t)(x))<<ADC_CLM0_CLM0_SHIFT))&ADC_CLM0_CLM0_MASK)
|
||
|
|
||
|
/*!
|
||
|
* @}
|
||
|
*/ /* end of group ADC_Register_Masks */
|
||
|
|
||
|
|
||
|
#endif // SIMUL_REGS_H
|