/****************************************************************************************************//** * @file XMC1300.h * * @brief CMSIS Cortex-M0 Peripheral Access Layer Header File for * XMC1300 from Infineon. * * @version V1.0.3 (Reference Manual v1.0) * @date 13. December 2012 * * @note Generated with SVDConv V2.78b * from CMSIS SVD File 'XMC1300_Processed_SVD.xml' Version 1.0.3 (Reference Manual v1.0), *******************************************************************************************************/ /** @addtogroup Infineon * @{ */ /** @addtogroup XMC1300 * @{ */ #ifndef XMC1300_H #define XMC1300_H #ifdef __cplusplus extern "C" { #endif /* ------------------------- Interrupt Number Definition ------------------------ */ typedef enum { /* ------------------- Cortex-M0 Processor Exceptions Numbers ------------------- */ Reset_IRQn = -15, /*!< 1 Reset Vector, invoked on Power up and warm reset */ NonMaskableInt_IRQn = -14, /*!< 2 Non maskable Interrupt, cannot be stopped or preempted */ HardFault_IRQn = -13, /*!< 3 Hard Fault, all classes of Fault */ SVCall_IRQn = -5, /*!< 11 System Service Call via SVC instruction */ DebugMonitor_IRQn = -4, /*!< 12 Debug Monitor */ PendSV_IRQn = -2, /*!< 14 Pendable request for system service */ SysTick_IRQn = -1, /*!< 15 System Tick Timer */ /* --------------------- XMC1300 Specific Interrupt Numbers --------------------- */ SCU_0_IRQn = 0, /*!< SCU SR0 Interrupt */ SCU_1_IRQn = 1, /*!< SCU SR1 Interrupt */ SCU_2_IRQn = 2, /*!< SCU SR2 Interrupt */ ERU0_0_IRQn = 3, /*!< ERU0 SR0 Interrupt */ ERU0_1_IRQn = 4, /*!< ERU0 SR1 Interrupt */ ERU0_2_IRQn = 5, /*!< ERU0 SR2 Interrupt */ ERU0_3_IRQn = 6, /*!< ERU0 SR3 Interrupt */ MATH0_0_IRQn = 7, /*!< MATH0 SR0 Interrupt */ USIC0_0_IRQn = 9, /*!< USIC SR0 Interrupt */ USIC0_1_IRQn = 10, /*!< USIC SR1 Interrupt */ USIC0_2_IRQn = 11, /*!< USIC SR2 Interrupt */ USIC0_3_IRQn = 12, /*!< USIC SR3 Interrupt */ USIC0_4_IRQn = 13, /*!< USIC SR4 Interrupt */ USIC0_5_IRQn = 14, /*!< USIC SR5 Interrupt */ VADC0_C0_0_IRQn = 15, /*!< VADC SR0 Interrupt */ VADC0_C0_1_IRQn = 16, /*!< VADC SR1 Interrupt */ VADC0_G0_0_IRQn = 17, /*!< VADC SR2 Interrupt */ VADC0_G0_1_IRQn = 18, /*!< VADC SR3 Interrupt */ VADC0_G1_0_IRQn = 19, /*!< VADC SR4 Interrupt */ VADC0_G1_1_IRQn = 20, /*!< VADC SR5 Interrupt */ CCU40_0_IRQn = 21, /*!< CCU40 SR0 Interrupt */ CCU40_1_IRQn = 22, /*!< CCU40 SR1 Interrupt */ CCU40_2_IRQn = 23, /*!< CCU40 SR2 Interrupt */ CCU40_3_IRQn = 24, /*!< CCU40 SR3 Interrupt */ CCU80_0_IRQn = 25, /*!< CCU80 SR0 Interrupt */ CCU80_1_IRQn = 26, /*!< CCU80 SR1 Interrupt */ POSIF0_0_IRQn = 27, /*!< POSIF0 SR0 Interrupt */ POSIF0_1_IRQn = 28, /*!< POSIF1 SR1 Interrupt */ BCCU0_0_IRQn = 31, /*!< BCCU0 SR0 Interrupt */ } IRQn_Type; /** @addtogroup Configuration_of_CMSIS * @{ */ /* ================================================================================ */ /* ================ Processor and Core Peripheral Section ================ */ /* ================================================================================ */ /* ----------------Configuration of the Cortex-M0 Processor and Core Peripherals---------------- */ #define __CM0_REV 0x0000 /*!< Cortex-M0 Core Revision */ #define __MPU_PRESENT 0 /*!< MPU present or not */ #define __NVIC_PRIO_BITS 2 /*!< Number of Bits used for Priority Levels */ #define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */ /** @} */ /* End of group Configuration_of_CMSIS */ #include /*!< Cortex-M0 processor and core peripherals */ #include "system_XMC1300.h" /*!< XMC1300 System */ /* ================================================================================ */ /* ================ Device Specific Peripheral Section ================ */ /* ================================================================================ */ /* Macro to modify desired bitfields of a register */ #define WR_REG(reg, mask, pos, val) reg = (((uint32_t)val << pos) & \ ((uint32_t)mask)) | \ (reg & ((uint32_t)~((uint32_t)mask))) /* Macro to modify desired bitfields of a register */ #define WR_REG_SIZE(reg, mask, pos, val, size) { \ uint##size##_t VAL1 = (uint##size##_t)((uint##size##_t)val << pos); \ uint##size##_t VAL2 = (uint##size##_t) (VAL1 & (uint##size##_t)mask); \ uint##size##_t VAL3 = (uint##size##_t)~((uint##size##_t)mask); \ uint##size##_t VAL4 = (uint##size##_t) ((uint##size##_t)reg & VAL3); \ reg = (uint##size##_t) (VAL2 | VAL4);\ } /** Macro to read bitfields from a register */ #define RD_REG(reg, mask, pos) (((uint32_t)reg & (uint32_t)mask) >> pos) /** Macro to read bitfields from a register */ #define RD_REG_SIZE(reg, mask, pos,size) ((uint##size##_t)(((uint32_t)reg & \ (uint32_t)mask) >> pos) ) /** Macro to set a bit in register */ #define SET_BIT(reg, pos) (reg |= ((uint32_t)1<