mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Fri Jul 17 09:15:10 2015 +0100
Revision:
592:a274ee790e56
Parent:
579:53297373a894
Synchronized with git revision e7144f83a8d75df80c4877936b6ffe552b0be9e6

Full URL: https://github.com/mbedmicro/mbed/commit/e7144f83a8d75df80c4877936b6ffe552b0be9e6/

More API implementation for SAMR21

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 579:53297373a894 1 #ifndef _SAMD21_EVSYS_INSTANCE_
mbed_official 579:53297373a894 2 #define _SAMD21_EVSYS_INSTANCE_
mbed_official 579:53297373a894 3
mbed_official 579:53297373a894 4 /* ========== Register definition for EVSYS peripheral ========== */
mbed_official 579:53297373a894 5 #if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
mbed_official 579:53297373a894 6 #define REG_EVSYS_CTRL (0x42000400U) /**< \brief (EVSYS) Control */
mbed_official 579:53297373a894 7 #define REG_EVSYS_CHANNEL (0x42000404U) /**< \brief (EVSYS) Channel */
mbed_official 579:53297373a894 8 #define REG_EVSYS_USER (0x42000408U) /**< \brief (EVSYS) User Multiplexer */
mbed_official 579:53297373a894 9 #define REG_EVSYS_CHSTATUS (0x4200040CU) /**< \brief (EVSYS) Channel Status */
mbed_official 579:53297373a894 10 #define REG_EVSYS_INTENCLR (0x42000410U) /**< \brief (EVSYS) Interrupt Enable Clear */
mbed_official 579:53297373a894 11 #define REG_EVSYS_INTENSET (0x42000414U) /**< \brief (EVSYS) Interrupt Enable Set */
mbed_official 579:53297373a894 12 #define REG_EVSYS_INTFLAG (0x42000418U) /**< \brief (EVSYS) Interrupt Flag Status and Clear */
mbed_official 579:53297373a894 13 #else
mbed_official 579:53297373a894 14 #define REG_EVSYS_CTRL (*(WoReg8 *)0x42000400U) /**< \brief (EVSYS) Control */
mbed_official 579:53297373a894 15 #define REG_EVSYS_CHANNEL (*(RwReg *)0x42000404U) /**< \brief (EVSYS) Channel */
mbed_official 579:53297373a894 16 #define REG_EVSYS_USER (*(RwReg16*)0x42000408U) /**< \brief (EVSYS) User Multiplexer */
mbed_official 579:53297373a894 17 #define REG_EVSYS_CHSTATUS (*(RoReg *)0x4200040CU) /**< \brief (EVSYS) Channel Status */
mbed_official 579:53297373a894 18 #define REG_EVSYS_INTENCLR (*(RwReg *)0x42000410U) /**< \brief (EVSYS) Interrupt Enable Clear */
mbed_official 579:53297373a894 19 #define REG_EVSYS_INTENSET (*(RwReg *)0x42000414U) /**< \brief (EVSYS) Interrupt Enable Set */
mbed_official 579:53297373a894 20 #define REG_EVSYS_INTFLAG (*(RwReg *)0x42000418U) /**< \brief (EVSYS) Interrupt Flag Status and Clear */
mbed_official 579:53297373a894 21 #endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
mbed_official 579:53297373a894 22
mbed_official 579:53297373a894 23 /* ========== Instance parameters for EVSYS peripheral ========== */
mbed_official 579:53297373a894 24 #define EVSYS_CHANNELS 12 // Number of Channels
mbed_official 579:53297373a894 25 #define EVSYS_CHANNELS_BITS 4 // Number of bits to select Channel
mbed_official 579:53297373a894 26 #define EVSYS_CHANNELS_MSB 11 // Number of Channels - 1
mbed_official 579:53297373a894 27 #define EVSYS_EXTEVT_NUM 0 // Number of External Event Generators
mbed_official 579:53297373a894 28 #define EVSYS_GCLK_ID_0 7
mbed_official 579:53297373a894 29 #define EVSYS_GCLK_ID_1 8
mbed_official 579:53297373a894 30 #define EVSYS_GCLK_ID_2 9
mbed_official 579:53297373a894 31 #define EVSYS_GCLK_ID_3 10
mbed_official 579:53297373a894 32 #define EVSYS_GCLK_ID_4 11
mbed_official 579:53297373a894 33 #define EVSYS_GCLK_ID_5 12
mbed_official 579:53297373a894 34 #define EVSYS_GCLK_ID_6 13
mbed_official 579:53297373a894 35 #define EVSYS_GCLK_ID_7 14
mbed_official 579:53297373a894 36 #define EVSYS_GCLK_ID_8 15
mbed_official 579:53297373a894 37 #define EVSYS_GCLK_ID_9 16
mbed_official 579:53297373a894 38 #define EVSYS_GCLK_ID_10 17
mbed_official 579:53297373a894 39 #define EVSYS_GCLK_ID_11 18
mbed_official 579:53297373a894 40 #define EVSYS_GCLK_ID_LSB 7
mbed_official 579:53297373a894 41 #define EVSYS_GCLK_ID_MSB 18
mbed_official 579:53297373a894 42 #define EVSYS_GCLK_ID_SIZE 12
mbed_official 579:53297373a894 43 #define EVSYS_GENERATORS 73 // Total Number of Event Generators
mbed_official 579:53297373a894 44 #define EVSYS_GENERATORS_BITS 7 // Number of bits to select Event Generator
mbed_official 579:53297373a894 45 #define EVSYS_USERS 29 // Total Number of Event Users
mbed_official 579:53297373a894 46 #define EVSYS_USERS_BITS 5 // Number of bits to select Event User
mbed_official 579:53297373a894 47
mbed_official 579:53297373a894 48 // GENERATORS
mbed_official 579:53297373a894 49 #define EVSYS_ID_GEN_RTC_CMP_0 1
mbed_official 579:53297373a894 50 #define EVSYS_ID_GEN_RTC_CMP_1 2
mbed_official 579:53297373a894 51 #define EVSYS_ID_GEN_RTC_OVF 3
mbed_official 579:53297373a894 52 #define EVSYS_ID_GEN_RTC_PER_0 4
mbed_official 579:53297373a894 53 #define EVSYS_ID_GEN_RTC_PER_1 5
mbed_official 579:53297373a894 54 #define EVSYS_ID_GEN_RTC_PER_2 6
mbed_official 579:53297373a894 55 #define EVSYS_ID_GEN_RTC_PER_3 7
mbed_official 579:53297373a894 56 #define EVSYS_ID_GEN_RTC_PER_4 8
mbed_official 579:53297373a894 57 #define EVSYS_ID_GEN_RTC_PER_5 9
mbed_official 579:53297373a894 58 #define EVSYS_ID_GEN_RTC_PER_6 10
mbed_official 579:53297373a894 59 #define EVSYS_ID_GEN_RTC_PER_7 11
mbed_official 579:53297373a894 60 #define EVSYS_ID_GEN_EIC_EXTINT_0 12
mbed_official 579:53297373a894 61 #define EVSYS_ID_GEN_EIC_EXTINT_1 13
mbed_official 579:53297373a894 62 #define EVSYS_ID_GEN_EIC_EXTINT_2 14
mbed_official 579:53297373a894 63 #define EVSYS_ID_GEN_EIC_EXTINT_3 15
mbed_official 579:53297373a894 64 #define EVSYS_ID_GEN_EIC_EXTINT_4 16
mbed_official 579:53297373a894 65 #define EVSYS_ID_GEN_EIC_EXTINT_5 17
mbed_official 579:53297373a894 66 #define EVSYS_ID_GEN_EIC_EXTINT_6 18
mbed_official 579:53297373a894 67 #define EVSYS_ID_GEN_EIC_EXTINT_7 19
mbed_official 579:53297373a894 68 #define EVSYS_ID_GEN_EIC_EXTINT_8 20
mbed_official 579:53297373a894 69 #define EVSYS_ID_GEN_EIC_EXTINT_9 21
mbed_official 579:53297373a894 70 #define EVSYS_ID_GEN_EIC_EXTINT_10 22
mbed_official 579:53297373a894 71 #define EVSYS_ID_GEN_EIC_EXTINT_11 23
mbed_official 579:53297373a894 72 #define EVSYS_ID_GEN_EIC_EXTINT_12 24
mbed_official 579:53297373a894 73 #define EVSYS_ID_GEN_EIC_EXTINT_13 25
mbed_official 579:53297373a894 74 #define EVSYS_ID_GEN_EIC_EXTINT_14 26
mbed_official 579:53297373a894 75 #define EVSYS_ID_GEN_EIC_EXTINT_15 27
mbed_official 579:53297373a894 76 #define EVSYS_ID_GEN_EIC_EXTINT_16 28
mbed_official 579:53297373a894 77 #define EVSYS_ID_GEN_EIC_EXTINT_17 29
mbed_official 579:53297373a894 78 #define EVSYS_ID_GEN_DMAC_CH_0 30
mbed_official 579:53297373a894 79 #define EVSYS_ID_GEN_DMAC_CH_1 31
mbed_official 579:53297373a894 80 #define EVSYS_ID_GEN_DMAC_CH_2 32
mbed_official 579:53297373a894 81 #define EVSYS_ID_GEN_DMAC_CH_3 33
mbed_official 579:53297373a894 82 #define EVSYS_ID_GEN_TCC0_OVF 34
mbed_official 579:53297373a894 83 #define EVSYS_ID_GEN_TCC0_TRG 35
mbed_official 579:53297373a894 84 #define EVSYS_ID_GEN_TCC0_CNT 36
mbed_official 579:53297373a894 85 #define EVSYS_ID_GEN_TCC0_MCX_0 37
mbed_official 579:53297373a894 86 #define EVSYS_ID_GEN_TCC0_MCX_1 38
mbed_official 579:53297373a894 87 #define EVSYS_ID_GEN_TCC0_MCX_2 39
mbed_official 579:53297373a894 88 #define EVSYS_ID_GEN_TCC0_MCX_3 40
mbed_official 579:53297373a894 89 #define EVSYS_ID_GEN_TCC1_OVF 41
mbed_official 579:53297373a894 90 #define EVSYS_ID_GEN_TCC1_TRG 42
mbed_official 579:53297373a894 91 #define EVSYS_ID_GEN_TCC1_CNT 43
mbed_official 579:53297373a894 92 #define EVSYS_ID_GEN_TCC1_MCX_0 44
mbed_official 579:53297373a894 93 #define EVSYS_ID_GEN_TCC1_MCX_1 45
mbed_official 579:53297373a894 94 #define EVSYS_ID_GEN_TCC2_OVF 46
mbed_official 579:53297373a894 95 #define EVSYS_ID_GEN_TCC2_TRG 47
mbed_official 579:53297373a894 96 #define EVSYS_ID_GEN_TCC2_CNT 48
mbed_official 579:53297373a894 97 #define EVSYS_ID_GEN_TCC2_MCX_0 49
mbed_official 579:53297373a894 98 #define EVSYS_ID_GEN_TCC2_MCX_1 50
mbed_official 579:53297373a894 99 #define EVSYS_ID_GEN_TC3_OVF 51
mbed_official 579:53297373a894 100 #define EVSYS_ID_GEN_TC3_MCX_0 52
mbed_official 579:53297373a894 101 #define EVSYS_ID_GEN_TC3_MCX_1 53
mbed_official 579:53297373a894 102 #define EVSYS_ID_GEN_TC4_OVF 54
mbed_official 579:53297373a894 103 #define EVSYS_ID_GEN_TC4_MCX_0 55
mbed_official 579:53297373a894 104 #define EVSYS_ID_GEN_TC4_MCX_1 56
mbed_official 579:53297373a894 105 #define EVSYS_ID_GEN_TC5_OVF 57
mbed_official 579:53297373a894 106 #define EVSYS_ID_GEN_TC5_MCX_0 58
mbed_official 579:53297373a894 107 #define EVSYS_ID_GEN_TC5_MCX_1 59
mbed_official 579:53297373a894 108 #define EVSYS_ID_GEN_TC6_OVF 60
mbed_official 579:53297373a894 109 #define EVSYS_ID_GEN_TC6_MCX_0 61
mbed_official 579:53297373a894 110 #define EVSYS_ID_GEN_TC6_MCX_1 62
mbed_official 579:53297373a894 111 #define EVSYS_ID_GEN_TC7_OVF 63
mbed_official 579:53297373a894 112 #define EVSYS_ID_GEN_TC7_MCX_0 64
mbed_official 579:53297373a894 113 #define EVSYS_ID_GEN_TC7_MCX_1 65
mbed_official 579:53297373a894 114 #define EVSYS_ID_GEN_ADC_RESRDY 66
mbed_official 579:53297373a894 115 #define EVSYS_ID_GEN_ADC_WINMON 67
mbed_official 579:53297373a894 116 #define EVSYS_ID_GEN_AC_COMP_0 68
mbed_official 579:53297373a894 117 #define EVSYS_ID_GEN_AC_COMP_1 69
mbed_official 579:53297373a894 118 #define EVSYS_ID_GEN_AC_WIN_0 70
mbed_official 579:53297373a894 119 #define EVSYS_ID_GEN_DAC_EMPTY 71
mbed_official 579:53297373a894 120 #define EVSYS_ID_GEN_PTC_EOC 72
mbed_official 579:53297373a894 121 #define EVSYS_ID_GEN_PTC_WCOMP 73
mbed_official 579:53297373a894 122
mbed_official 579:53297373a894 123 // USERS
mbed_official 579:53297373a894 124 #define EVSYS_ID_USER_DMAC_CH_0 0
mbed_official 579:53297373a894 125 #define EVSYS_ID_USER_DMAC_CH_1 1
mbed_official 579:53297373a894 126 #define EVSYS_ID_USER_DMAC_CH_2 2
mbed_official 579:53297373a894 127 #define EVSYS_ID_USER_DMAC_CH_3 3
mbed_official 579:53297373a894 128 #define EVSYS_ID_USER_TCC0_EV_0 4
mbed_official 579:53297373a894 129 #define EVSYS_ID_USER_TCC0_EV_1 5
mbed_official 579:53297373a894 130 #define EVSYS_ID_USER_TCC0_MC_0 6
mbed_official 579:53297373a894 131 #define EVSYS_ID_USER_TCC0_MC_1 7
mbed_official 579:53297373a894 132 #define EVSYS_ID_USER_TCC0_MC_2 8
mbed_official 579:53297373a894 133 #define EVSYS_ID_USER_TCC0_MC_3 9
mbed_official 579:53297373a894 134 #define EVSYS_ID_USER_TCC1_EV_0 10
mbed_official 579:53297373a894 135 #define EVSYS_ID_USER_TCC1_EV_1 11
mbed_official 579:53297373a894 136 #define EVSYS_ID_USER_TCC1_MC_0 12
mbed_official 579:53297373a894 137 #define EVSYS_ID_USER_TCC1_MC_1 13
mbed_official 579:53297373a894 138 #define EVSYS_ID_USER_TCC2_EV_0 14
mbed_official 579:53297373a894 139 #define EVSYS_ID_USER_TCC2_EV_1 15
mbed_official 579:53297373a894 140 #define EVSYS_ID_USER_TCC2_MC_0 16
mbed_official 579:53297373a894 141 #define EVSYS_ID_USER_TCC2_MC_1 17
mbed_official 579:53297373a894 142 #define EVSYS_ID_USER_TC3_EVU 18
mbed_official 579:53297373a894 143 #define EVSYS_ID_USER_TC4_EVU 19
mbed_official 579:53297373a894 144 #define EVSYS_ID_USER_TC5_EVU 20
mbed_official 579:53297373a894 145 #define EVSYS_ID_USER_TC6_EVU 21
mbed_official 579:53297373a894 146 #define EVSYS_ID_USER_TC7_EVU 22
mbed_official 579:53297373a894 147 #define EVSYS_ID_USER_ADC_START 23
mbed_official 579:53297373a894 148 #define EVSYS_ID_USER_ADC_SYNC 24
mbed_official 579:53297373a894 149 #define EVSYS_ID_USER_AC_SOC_0 25
mbed_official 579:53297373a894 150 #define EVSYS_ID_USER_AC_SOC_1 26
mbed_official 579:53297373a894 151 #define EVSYS_ID_USER_DAC_START 27
mbed_official 579:53297373a894 152 #define EVSYS_ID_USER_PTC_STCONV 28
mbed_official 579:53297373a894 153
mbed_official 579:53297373a894 154 #endif /* _SAMD21_EVSYS_INSTANCE_ */