source: rtos_arduino/trunk/arduino_lib/hardware/tools/CMSIS/Device/ATMEL/samd21/include/instance/evsys.h@ 136

Last change on this file since 136 was 136, checked in by ertl-honda, 8 years ago

ライブラリとOS及びベーシックなサンプルの追加.

File size: 8.2 KB
Line 
1/**
2 * \file
3 *
4 * \brief Instance description for EVSYS
5 *
6 * Copyright (c) 2014 Atmel Corporation. All rights reserved.
7 *
8 * \asf_license_start
9 *
10 * \page License
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions are met:
14 *
15 * 1. Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 *
18 * 2. Redistributions in binary form must reproduce the above copyright notice,
19 * this list of conditions and the following disclaimer in the documentation
20 * and/or other materials provided with the distribution.
21 *
22 * 3. The name of Atmel may not be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * 4. This software may only be redistributed and used in connection with an
26 * Atmel microcontroller product.
27 *
28 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
29 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
30 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
31 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
32 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
33 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
34 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
35 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
36 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 * POSSIBILITY OF SUCH DAMAGE.
39 *
40 * \asf_license_stop
41 *
42 */
43
44#ifndef _SAMD21_EVSYS_INSTANCE_
45#define _SAMD21_EVSYS_INSTANCE_
46
47/* ========== Register definition for EVSYS peripheral ========== */
48#if (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
49#define REG_EVSYS_CTRL (0x42000400U) /**< \brief (EVSYS) Control */
50#define REG_EVSYS_CHANNEL (0x42000404U) /**< \brief (EVSYS) Channel */
51#define REG_EVSYS_USER (0x42000408U) /**< \brief (EVSYS) User Multiplexer */
52#define REG_EVSYS_CHSTATUS (0x4200040CU) /**< \brief (EVSYS) Channel Status */
53#define REG_EVSYS_INTENCLR (0x42000410U) /**< \brief (EVSYS) Interrupt Enable Clear */
54#define REG_EVSYS_INTENSET (0x42000414U) /**< \brief (EVSYS) Interrupt Enable Set */
55#define REG_EVSYS_INTFLAG (0x42000418U) /**< \brief (EVSYS) Interrupt Flag Status and Clear */
56#else
57#define REG_EVSYS_CTRL (*(WoReg8 *)0x42000400U) /**< \brief (EVSYS) Control */
58#define REG_EVSYS_CHANNEL (*(RwReg *)0x42000404U) /**< \brief (EVSYS) Channel */
59#define REG_EVSYS_USER (*(RwReg16*)0x42000408U) /**< \brief (EVSYS) User Multiplexer */
60#define REG_EVSYS_CHSTATUS (*(RoReg *)0x4200040CU) /**< \brief (EVSYS) Channel Status */
61#define REG_EVSYS_INTENCLR (*(RwReg *)0x42000410U) /**< \brief (EVSYS) Interrupt Enable Clear */
62#define REG_EVSYS_INTENSET (*(RwReg *)0x42000414U) /**< \brief (EVSYS) Interrupt Enable Set */
63#define REG_EVSYS_INTFLAG (*(RwReg *)0x42000418U) /**< \brief (EVSYS) Interrupt Flag Status and Clear */
64#endif /* (defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
65
66/* ========== Instance parameters for EVSYS peripheral ========== */
67#define EVSYS_CHANNELS 12
68#define EVSYS_CHANNELS_BITS (len(bin(EVSYS_CHANNELS-1))-2)
69#define EVSYS_CHANNELS_MSB (EVSYS_CHANNELS-1)
70#define EVSYS_EXTEVT_NUM 0
71#define EVSYS_GCLK_ID_0 7
72#define EVSYS_GCLK_ID_1 8
73#define EVSYS_GCLK_ID_2 9
74#define EVSYS_GCLK_ID_3 10
75#define EVSYS_GCLK_ID_4 11
76#define EVSYS_GCLK_ID_5 12
77#define EVSYS_GCLK_ID_6 13
78#define EVSYS_GCLK_ID_7 14
79#define EVSYS_GCLK_ID_8 15
80#define EVSYS_GCLK_ID_9 16
81#define EVSYS_GCLK_ID_10 17
82#define EVSYS_GCLK_ID_11 18
83#define EVSYS_GCLK_ID_LSB 7
84#define EVSYS_GCLK_ID_MSB 18
85#define EVSYS_GCLK_ID_SIZE 12
86#define EVSYS_GENERATORS 73
87#define EVSYS_GENERATORS_BITS (len(bin(EVSYS_GENERATORS-1))-2)
88#define EVSYS_USERS 29
89#define EVSYS_USERS_BITS (len(bin(EVSYS_USERS-1))-2)
90
91// GENERATORS
92#define EVSYS_ID_GEN_RTC_CMP_0 1
93#define EVSYS_ID_GEN_RTC_CMP_1 2
94#define EVSYS_ID_GEN_RTC_OVF 3
95#define EVSYS_ID_GEN_RTC_PER_0 4
96#define EVSYS_ID_GEN_RTC_PER_1 5
97#define EVSYS_ID_GEN_RTC_PER_2 6
98#define EVSYS_ID_GEN_RTC_PER_3 7
99#define EVSYS_ID_GEN_RTC_PER_4 8
100#define EVSYS_ID_GEN_RTC_PER_5 9
101#define EVSYS_ID_GEN_RTC_PER_6 10
102#define EVSYS_ID_GEN_RTC_PER_7 11
103#define EVSYS_ID_GEN_EIC_EXTINT_0 12
104#define EVSYS_ID_GEN_EIC_EXTINT_1 13
105#define EVSYS_ID_GEN_EIC_EXTINT_2 14
106#define EVSYS_ID_GEN_EIC_EXTINT_3 15
107#define EVSYS_ID_GEN_EIC_EXTINT_4 16
108#define EVSYS_ID_GEN_EIC_EXTINT_5 17
109#define EVSYS_ID_GEN_EIC_EXTINT_6 18
110#define EVSYS_ID_GEN_EIC_EXTINT_7 19
111#define EVSYS_ID_GEN_EIC_EXTINT_8 20
112#define EVSYS_ID_GEN_EIC_EXTINT_9 21
113#define EVSYS_ID_GEN_EIC_EXTINT_10 22
114#define EVSYS_ID_GEN_EIC_EXTINT_11 23
115#define EVSYS_ID_GEN_EIC_EXTINT_12 24
116#define EVSYS_ID_GEN_EIC_EXTINT_13 25
117#define EVSYS_ID_GEN_EIC_EXTINT_14 26
118#define EVSYS_ID_GEN_EIC_EXTINT_15 27
119#define EVSYS_ID_GEN_EIC_EXTINT_16 28
120#define EVSYS_ID_GEN_EIC_EXTINT_17 29
121#define EVSYS_ID_GEN_DMAC_CH_0 30
122#define EVSYS_ID_GEN_DMAC_CH_1 31
123#define EVSYS_ID_GEN_DMAC_CH_2 32
124#define EVSYS_ID_GEN_DMAC_CH_3 33
125#define EVSYS_ID_GEN_TCC0_OVF 34
126#define EVSYS_ID_GEN_TCC0_TRG 35
127#define EVSYS_ID_GEN_TCC0_CNT 36
128#define EVSYS_ID_GEN_TCC0_MCX_0 37
129#define EVSYS_ID_GEN_TCC0_MCX_1 38
130#define EVSYS_ID_GEN_TCC0_MCX_2 39
131#define EVSYS_ID_GEN_TCC0_MCX_3 40
132#define EVSYS_ID_GEN_TCC1_OVF 41
133#define EVSYS_ID_GEN_TCC1_TRG 42
134#define EVSYS_ID_GEN_TCC1_CNT 43
135#define EVSYS_ID_GEN_TCC1_MCX_0 44
136#define EVSYS_ID_GEN_TCC1_MCX_1 45
137#define EVSYS_ID_GEN_TCC2_OVF 46
138#define EVSYS_ID_GEN_TCC2_TRG 47
139#define EVSYS_ID_GEN_TCC2_CNT 48
140#define EVSYS_ID_GEN_TCC2_MCX_0 49
141#define EVSYS_ID_GEN_TCC2_MCX_1 50
142#define EVSYS_ID_GEN_TC3_OVF 51
143#define EVSYS_ID_GEN_TC3_MCX_0 52
144#define EVSYS_ID_GEN_TC3_MCX_1 53
145#define EVSYS_ID_GEN_TC4_OVF 54
146#define EVSYS_ID_GEN_TC4_MCX_0 55
147#define EVSYS_ID_GEN_TC4_MCX_1 56
148#define EVSYS_ID_GEN_TC5_OVF 57
149#define EVSYS_ID_GEN_TC5_MCX_0 58
150#define EVSYS_ID_GEN_TC5_MCX_1 59
151#define EVSYS_ID_GEN_TC6_OVF 60
152#define EVSYS_ID_GEN_TC6_MCX_0 61
153#define EVSYS_ID_GEN_TC6_MCX_1 62
154#define EVSYS_ID_GEN_TC7_OVF 63
155#define EVSYS_ID_GEN_TC7_MCX_0 64
156#define EVSYS_ID_GEN_TC7_MCX_1 65
157#define EVSYS_ID_GEN_ADC_RESRDY 66
158#define EVSYS_ID_GEN_ADC_WINMON 67
159#define EVSYS_ID_GEN_AC_COMP_0 68
160#define EVSYS_ID_GEN_AC_COMP_1 69
161#define EVSYS_ID_GEN_AC_WIN_0 70
162#define EVSYS_ID_GEN_DAC_EMPTY 71
163#define EVSYS_ID_GEN_PTC_EOC 72
164#define EVSYS_ID_GEN_PTC_WCOMP 73
165
166// USERS
167#define EVSYS_ID_USER_DMAC_CH_0 0
168#define EVSYS_ID_USER_DMAC_CH_1 1
169#define EVSYS_ID_USER_DMAC_CH_2 2
170#define EVSYS_ID_USER_DMAC_CH_3 3
171#define EVSYS_ID_USER_TCC0_EV_0 4
172#define EVSYS_ID_USER_TCC0_EV_1 5
173#define EVSYS_ID_USER_TCC0_MC_0 6
174#define EVSYS_ID_USER_TCC0_MC_1 7
175#define EVSYS_ID_USER_TCC0_MC_2 8
176#define EVSYS_ID_USER_TCC0_MC_3 9
177#define EVSYS_ID_USER_TCC1_EV_0 10
178#define EVSYS_ID_USER_TCC1_EV_1 11
179#define EVSYS_ID_USER_TCC1_MC_0 12
180#define EVSYS_ID_USER_TCC1_MC_1 13
181#define EVSYS_ID_USER_TCC2_EV_0 14
182#define EVSYS_ID_USER_TCC2_EV_1 15
183#define EVSYS_ID_USER_TCC2_MC_0 16
184#define EVSYS_ID_USER_TCC2_MC_1 17
185#define EVSYS_ID_USER_TC3_EVU 18
186#define EVSYS_ID_USER_TC4_EVU 19
187#define EVSYS_ID_USER_TC5_EVU 20
188#define EVSYS_ID_USER_TC6_EVU 21
189#define EVSYS_ID_USER_TC7_EVU 22
190#define EVSYS_ID_USER_ADC_START 23
191#define EVSYS_ID_USER_ADC_SYNC 24
192#define EVSYS_ID_USER_AC_SOC_0 25
193#define EVSYS_ID_USER_AC_SOC_1 26
194#define EVSYS_ID_USER_DAC_START 27
195#define EVSYS_ID_USER_PTC_STCONV 28
196
197#endif /* _SAMD21_EVSYS_INSTANCE_ */
Note: See TracBrowser for help on using the repository browser.