1 <!-- HTML header for doxygen 1.9.6-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=11"/>
7 <meta name="viewport" content="width=device-width, initial-scale=1"/>
8 <title>CMSIS-Core (Cortex-A): Device Header File <Device.h></title>
9 <link href="doxygen.css" rel="stylesheet" type="text/css" />
10 <script type="text/javascript" src="jquery.js"></script>
11 <script type="text/javascript" src="dynsections.js"></script>
12 <script type="text/javascript" src="tabs.js"></script>
13 <script type="text/javascript" src="footer.js"></script>
14 <script type="text/javascript" src="navtree.js"></script>
15 <link href="navtree.css" rel="stylesheet" type="text/css"/>
16 <script type="text/javascript" src="resize.js"></script>
17 <script type="text/javascript" src="navtreedata.js"></script>
18 <script type="text/javascript" src="navtree.js"></script>
19 <link href="search/search.css" rel="stylesheet" type="text/css"/>
20 <script type="text/javascript" src="search/searchdata.js"></script>
21 <script type="text/javascript" src="search/search.js"></script>
22 <script type="text/javascript">
23 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
24 $(document).ready(function() { init_search(); });
27 <script type="text/javascript" src="darkmode_toggle.js"></script>
28 <link href="extra_stylesheet.css" rel="stylesheet" type="text/css"/>
29 <link href="extra_navtree.css" rel="stylesheet" type="text/css"/>
30 <link href="extra_search.css" rel="stylesheet" type="text/css"/>
31 <link href="extra_tabs.css" rel="stylesheet" type="text/css"/>
32 <link href="version.css" rel="stylesheet" type="text/css"/>
33 <script type="text/javascript" src="../../version.js"></script>
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <table cellspacing="0" cellpadding="0">
40 <tr style="height: 55px;">
41 <td id="projectlogo" style="padding: 1.5em;"><img alt="Logo" src="cmsis_logo_white_small.png"/></td>
42 <td style="padding-left: 1em; padding-bottom: 1em;padding-top: 1em;">
43 <div id="projectname">CMSIS-Core (Cortex-A)
44  <span id="projectnumber"><script type="text/javascript">
46 writeHeader.call(this);
47 writeVersionDropdown.call(this, "CMSIS-Core (Cortex-A)");
52 <div id="projectbrief">CMSIS-Core support for Cortex-A processor-based devices</div>
54 <td> <div id="MSearchBox" class="MSearchBoxInactive">
56 <span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
57 <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
58 onfocus="searchBox.OnSearchFieldFocus(true)"
59 onblur="searchBox.OnSearchFieldFocus(false)"
60 onkeyup="searchBox.OnSearchFieldChange(event)"/>
61 </span><span class="right">
62 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
66 <!--END !PROJECT_NAME-->
71 <!-- end header part -->
72 <div id="CMSISnav" class="tabs1">
74 <script type="text/javascript">
75 writeComponentTabs.call(this);
79 <script type="text/javascript">
80 writeSubComponentTabs.call(this);
82 <!-- Generated by Doxygen 1.9.6 -->
83 <script type="text/javascript">
84 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
85 var searchBox = new SearchBox("searchBox", "search/",'.html');
89 <div id="side-nav" class="ui-resizable side-nav-resizable">
91 <div id="nav-tree-contents">
92 <div id="nav-sync" class="sync"></div>
95 <div id="splitbar" style="-moz-user-select:none;"
96 class="ui-resizable-handle">
99 <script type="text/javascript">
100 /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
101 $(document).ready(function(){initNavTree('device_h_pg.html',''); initResizable(); });
104 <div id="doc-content">
105 <!-- window showing the filter options -->
106 <div id="MSearchSelectWindow"
107 onmouseover="return searchBox.OnSearchSelectShow()"
108 onmouseout="return searchBox.OnSearchSelectHide()"
109 onkeydown="return searchBox.OnSearchSelectKey(event)">
112 <!-- iframe showing the search results (closed by default) -->
113 <div id="MSearchResultsWindow">
114 <div id="MSearchResults">
117 <div id="SRResults"></div>
118 <div class="SRStatus" id="Loading">Loading...</div>
119 <div class="SRStatus" id="Searching">Searching...</div>
120 <div class="SRStatus" id="NoMatches">No Matches</div>
126 <div><div class="header">
127 <div class="headertitle"><div class="title">Device Header File <Device.h> </div></div>
129 <div class="contents">
130 <div class="textblock"><p>The <a class="el" href="device_h_pg.html">Device Header File <Device.h></a> contains the following sections that are device specific:</p><ul>
131 <li><a class="el" href="device_h_pg.html#interrupt_number_sec">Interrupt Number Definition</a> provides interrupt numbers (IRQn) for all exceptions and interrupts of the device.</li>
132 <li><a class="el" href="device_h_pg.html#core_config_sect">Configuration of the Processor and Core Peripherals</a> reflect the features of the device.</li>
133 <li><a class="el" href="device_h_pg.html#device_access">Device Peripheral Access Layer</a> definitions for the <a class="el" href="group__peripheral__gr.html">Peripheral Access</a> to all device peripherals. It contains all data structures and the address mapping for device-specific peripherals.</li>
134 <li><b>Access Functions for Peripherals (optional)</b> provide additional helper functions for peripherals that are useful for programming of these peripherals. Access Functions may be provided as inline functions or can be extern references to a device-specific library provided by the silicon vendor.</li>
136 <p><a href="modules.html"><b>Reference</b> </a> describes the standard features and functions of the <a class="el" href="device_h_pg.html">Device Header File <Device.h></a> in detail.</p>
137 <h1><a class="anchor" id="interrupt_number_sec"></a>
138 Interrupt Number Definition</h1>
139 <p><a class="el" href="device_h_pg.html">Device Header File <Device.h></a> contains the enumeration <a class="el" href="irq__ctrl_8h.html#ac62964c04a7fed2c84aeea9e34f415e2">IRQn_ID_t</a> that defines all exceptions and interrupts of the device. For devices implementing an Arm GIC these are defined as:</p><ul>
140 <li>IRQn 0-15 represents software generated interrupts (SGI), local to each processor core.</li>
141 <li>IRQn 16-31 represents private peripheral interrupts (PPI), local to each processor core.</li>
142 <li>IRQn 32-1019 represents shared peripheral interrupts (SPI), routable to all processor cores.</li>
143 <li>IRQn 1020-1023 represents special interrupts, refer to the GIC Architecture Specification.</li>
145 <p><b>Example:</b></p>
146 <p>The following example shows the extension of the interrupt vector table for Cortex-A9 class device.</p>
147 <div class="fragment"><div class="line"><span class="keyword">typedef</span> <span class="keyword">enum</span> IRQn</div>
148 <div class="line">{</div>
149 <div class="line"><span class="comment">/****** SGI Interrupts Numbers ****************************************/</span></div>
150 <div class="line"> <a class="code hl_enumvalue" href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8a056f32088a9c8bdb9309b005dfeb648e">SGI0_IRQn</a> = 0, </div>
151 <div class="line"> <a class="code hl_enumvalue" href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8ab335b8b84021cd5714807d6cd2404c3b">SGI1_IRQn</a> = 1,</div>
152 <div class="line"> <a class="code hl_enumvalue" href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8a2a1cc64c0a2dc0e7f339fbf21c9a2b07">SGI2_IRQn</a> = 2,</div>
153 <div class="line"> : :</div>
154 <div class="line"> <a class="code hl_enumvalue" href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8ac6958eebc9d41a42c739de555cad2321">SGI15_IRQn</a> = 15,</div>
155 <div class="line"> </div>
156 <div class="line"><span class="comment">/****** Cortex-A9 Processor Exceptions Numbers ****************************************/</span></div>
157 <div class="line"> GlobalTimer_IRQn = 27, </div>
158 <div class="line"> PrivTimer_IRQn = 29, </div>
159 <div class="line"> PrivWatchdog_IRQn = 30, </div>
160 <div class="line"><span class="comment">/****** Platform Exceptions Numbers ***************************************************/</span></div>
161 <div class="line"> Watchdog_IRQn = 32, </div>
162 <div class="line"> Timer0_IRQn = 34, </div>
163 <div class="line"> Timer1_IRQn = 35, </div>
164 <div class="line"> RTClock_IRQn = 36, </div>
165 <div class="line"> UART0_IRQn = 37, </div>
166 <div class="line"> : :</div>
167 <div class="line"> : :</div>
168 <div class="line">} <a class="code hl_enumeration" href="group__irq__ctrl__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a>;</div>
169 <div class="ttc" id="agroup__irq__ctrl__gr_html_ga7e1129cd8a196f4284d41db3e82ad5c8"><div class="ttname"><a href="group__irq__ctrl__gr.html#ga7e1129cd8a196f4284d41db3e82ad5c8">IRQn_Type</a></div><div class="ttdeci">IRQn_Type</div><div class="ttdoc">Definition of IRQn numbers.</div><div class="ttdef"><b>Definition:</b> ref_irq_ctrl.txt:79</div></div>
170 <div class="ttc" id="agroup__irq__ctrl__gr_html_gga7e1129cd8a196f4284d41db3e82ad5c8a056f32088a9c8bdb9309b005dfeb648e"><div class="ttname"><a href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8a056f32088a9c8bdb9309b005dfeb648e">SGI0_IRQn</a></div><div class="ttdeci">@ SGI0_IRQn</div><div class="ttdoc">Software Generated Interrupt 0.</div><div class="ttdef"><b>Definition:</b> ref_irq_ctrl.txt:82</div></div>
171 <div class="ttc" id="agroup__irq__ctrl__gr_html_gga7e1129cd8a196f4284d41db3e82ad5c8a2a1cc64c0a2dc0e7f339fbf21c9a2b07"><div class="ttname"><a href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8a2a1cc64c0a2dc0e7f339fbf21c9a2b07">SGI2_IRQn</a></div><div class="ttdeci">@ SGI2_IRQn</div><div class="ttdoc">Software Generated Interrupt 2.</div><div class="ttdef"><b>Definition:</b> ref_irq_ctrl.txt:84</div></div>
172 <div class="ttc" id="agroup__irq__ctrl__gr_html_gga7e1129cd8a196f4284d41db3e82ad5c8ab335b8b84021cd5714807d6cd2404c3b"><div class="ttname"><a href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8ab335b8b84021cd5714807d6cd2404c3b">SGI1_IRQn</a></div><div class="ttdeci">@ SGI1_IRQn</div><div class="ttdoc">Software Generated Interrupt 1.</div><div class="ttdef"><b>Definition:</b> ref_irq_ctrl.txt:83</div></div>
173 <div class="ttc" id="agroup__irq__ctrl__gr_html_gga7e1129cd8a196f4284d41db3e82ad5c8ac6958eebc9d41a42c739de555cad2321"><div class="ttname"><a href="group__irq__ctrl__gr.html#gga7e1129cd8a196f4284d41db3e82ad5c8ac6958eebc9d41a42c739de555cad2321">SGI15_IRQn</a></div><div class="ttdeci">@ SGI15_IRQn</div><div class="ttdoc">Software Generated Interrupt 15.</div><div class="ttdef"><b>Definition:</b> ref_irq_ctrl.txt:97</div></div>
174 </div><!-- fragment --><h1><a class="anchor" id="core_config_sect"></a>
175 Configuration of the Processor and Core Peripherals</h1>
176 <p>The <a class="el" href="device_h_pg.html">Device Header File <Device.h></a> configures the Cortex-A processor and the core peripherals with <em>#defines</em> that are set prior to including the file <b>core_<cpu>.h</b>.</p>
177 <p>The following tables list the <em>#defines</em> along with the possible values for each processor core. If these <em>#defines</em> are missing default values are used.</p>
178 <table class="cmtable">
180 <th>#define </th><th>Value Range </th><th>Default </th><th>Description </th></tr>
182 <td>__CM0_REV </td><td>0x0000 </td><td>0x0000 </td><td>Core revision number ([15:8] revision number, [7:0] patch number) </td></tr>
184 <td>__CORTEX_A </td><td>5, 7, 9 </td><td>(n/a) </td><td>Core type number </td></tr>
186 <td>__FPU_PRESENT </td><td>0 .. 1 </td><td>0 </td><td>Defines if an FPU is present or not </td></tr>
188 <td>__GIC_PRESENT </td><td>0 ..1 </td><td>Defines if an GIC is present or not </td><td>Core revision number ([15:8] revision number, [7:0] patch number) </td></tr>
190 <td>__TIM_PRESENT </td><td>0 .. 1 </td><td>0 </td><td>Defines if a private timer is present or not </td></tr>
192 <td>__L2C_PRESENT </td><td>0 .. 1 </td><td>0 </td><td>Defines if a level 2 cache controller is present or not </td></tr>
194 <p><b>Example</b></p>
195 <p>The following code exemplifies the configuration of the Cortex-A9 Processor and Core Peripherals.</p>
196 <div class="fragment"><div class="line"><span class="preprocessor">#define __CA_REV 0x0000U </span></div>
197 <div class="line"><span class="preprocessor">#define __CORTEX_A 9U </span></div>
198 <div class="line"><span class="preprocessor">#define __FPU_PRESENT 1U </span></div>
199 <div class="line"><span class="preprocessor">#define __GIC_PRESENT 1U </span></div>
200 <div class="line"><span class="preprocessor">#define __TIM_PRESENT 0U </span></div>
201 <div class="line"><span class="preprocessor">#define __L2C_PRESENT 0U </span></div>
202 <div class="line">:</div>
203 <div class="line">:</div>
204 <div class="line"><span class="preprocessor">#include "<a class="code" href="core__ca_8h.html">core_ca.h</a>"</span> <span class="comment">/* Cortex-A processor and core peripherals */</span></div>
205 <div class="ttc" id="acore__ca_8h_html"><div class="ttname"><a href="core__ca_8h.html">core_ca.h</a></div></div>
206 </div><!-- fragment --><h1><a class="anchor" id="core_version_sect"></a>
207 CMSIS Version and Processor Information</h1>
208 <p>Defines in the core_<em>cpu</em>.h file identify the version of the CMSIS-Core-A and the processor used. The following shows the defines in the various core_<em>cpu</em>.h files that may be used in the <a class="el" href="device_h_pg.html">Device Header File <Device.h></a> to verify a minimum version or ensure that the right processor core is used.</p>
209 <div class="fragment"><div class="line"><span class="preprocessor">#define __CA_CMSIS_VERSION_MAIN (5U) </span><span class="comment">/* [31:16] CMSIS Core main version */</span><span class="preprocessor"></span></div>
210 <div class="line"><span class="preprocessor">#define __CA_CMSIS_VERSION_SUB (0U) </span><span class="comment">/* [15:0] CMSIS Core sub version */</span><span class="preprocessor"></span></div>
211 <div class="line"><span class="preprocessor">#define __CA_CMSIS_VERSION ((__CA_CMSIS_VERSION_MAIN << 16U) | \</span></div>
212 <div class="line"><span class="preprocessor"> __CA_CMSIS_VERSION_SUB ) </span><span class="comment">/* CMSIS Core version number */</span><span class="preprocessor"></span></div>
213 </div><!-- fragment --><h1><a class="anchor" id="device_access"></a>
214 Device Peripheral Access Layer</h1>
215 <p>The <a class="el" href="device_h_pg.html">Device Header File <Device.h></a> contains for each peripheral:</p><ul>
216 <li>Register Layout Typedef</li>
217 <li>Base Address</li>
218 <li>Access Definitions</li>
220 <p>The section <a class="el" href="group__peripheral__gr.html">Peripheral Access</a> shows examples for peripheral definitions.</p>
221 <h1><a class="anchor" id="device_h_sec"></a>
222 Device.h Template File</h1>
223 <p>The silicon vendor needs to extend the Device.h template file with the CMSIS features described above. In addition the <a class="el" href="device_h_pg.html">Device Header File <Device.h></a> may contain functions to access device-specific peripherals. The <a class="el" href="system_c_pg.html#system_Device_h_sec">system_Device.h Template File</a> which is provided as part of the CMSIS specification is shown below.</p>
224 <pre class="fragment">/**************************************************************************//**
225 * @file <Device>.h
226 * @brief CMSIS-Core(A) Device Header File for Device <Device>
229 * @date 18. July 2023
230 ******************************************************************************/
232 * Copyright (c) 2009-2023 Arm Limited. All rights reserved.
234 * SPDX-License-Identifier: Apache-2.0
236 * Licensed under the Apache License, Version 2.0 (the License); you may
237 * not use this file except in compliance with the License.
238 * You may obtain a copy of the License at
240 * www.apache.org/licenses/LICENSE-2.0
242 * Unless required by applicable law or agreed to in writing, software
243 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
244 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
245 * See the License for the specific language governing permissions and
246 * limitations under the License.
249 #ifndef <Device>_H /* ToDo: replace '<Device>' with your device name */
250 #define <Device>_H
257 /* ========================================================================= */
258 /* ============ Interrupt Number Definition ============ */
259 /* ========================================================================= */
263 /* ================ Cortex-A Specific Interrupt Numbers =============== */
265 /* Software Generated Interrupts */
266 SGI0_IRQn = 0, /* Software Generated Interrupt 0 */
267 SGI1_IRQn = 1, /* Software Generated Interrupt 1 */
268 SGI2_IRQn = 2, /* Software Generated Interrupt 2 */
269 SGI3_IRQn = 3, /* Software Generated Interrupt 3 */
270 SGI4_IRQn = 4, /* Software Generated Interrupt 4 */
271 SGI5_IRQn = 5, /* Software Generated Interrupt 5 */
272 SGI6_IRQn = 6, /* Software Generated Interrupt 6 */
273 SGI7_IRQn = 7, /* Software Generated Interrupt 7 */
274 SGI8_IRQn = 8, /* Software Generated Interrupt 8 */
275 SGI9_IRQn = 9, /* Software Generated Interrupt 9 */
276 SGI10_IRQn = 10, /* Software Generated Interrupt 10 */
277 SGI11_IRQn = 11, /* Software Generated Interrupt 11 */
278 SGI12_IRQn = 12, /* Software Generated Interrupt 12 */
279 SGI13_IRQn = 13, /* Software Generated Interrupt 13 */
280 SGI14_IRQn = 14, /* Software Generated Interrupt 14 */
281 SGI15_IRQn = 15, /* Software Generated Interrupt 15 */
283 /* Private Peripheral Interrupts */
284 VirtualMaintenanceInterrupt_IRQn = 25, /* Virtual Maintenance Interrupt */
285 HypervisorTimer_IRQn = 26, /* Hypervisor Timer Interrupt */
286 VirtualTimer_IRQn = 27, /* Virtual Timer Interrupt */
287 Legacy_nFIQ_IRQn = 28, /* Legacy nFIQ Interrupt */
288 SecurePhyTimer_IRQn = 29, /* Secure Physical Timer Interrupt */
289 NonSecurePhyTimer_IRQn = 30, /* Non-Secure Physical Timer Interrupt */
290 Legacy_nIRQ_IRQn = 31, /* Legacy nIRQ Interrupt */
292 /* Shared Peripheral Interrupts */
293 /* ToDo: add here your device specific external interrupt numbers */
294 <DeviceInterrupt>_IRQn = 0, /* Device Interrupt */
298 /* ========================================================================= */
299 /* ============ Processor and Core Peripheral Section ============ */
300 /* ========================================================================= */
302 /* ================ Start of section using anonymous unions ================ */
303 #if defined (__CC_ARM)
306 #elif defined (__ICCARM__)
307 #pragma language=extended
308 #elif defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
309 #pragma clang diagnostic push
310 #pragma clang diagnostic ignored "-Wc11-extensions"
311 #pragma clang diagnostic ignored "-Wreserved-id-macro"
312 #elif defined (__GNUC__)
313 /* anonymous unions are enabled by default */
314 #elif defined (__TMS470__)
315 /* anonymous unions are enabled by default */
316 #elif defined (__TASKING__)
318 #elif defined (__CSMC__)
319 /* anonymous unions are enabled by default */
321 #warning Not supported compiler type
325 /* -------- Configuration of Core Peripherals ----------------------------------- */
326 /* ToDo: set the defines according your Device */
327 /* ToDo: define the correct core revision
328 5U if your device is a CORTEX-A5 device
329 7U if your device is a CORTEX-A7 device
330 9U if your device is a CORTEX-A9 device */
331 #define __CORTEX_A #U /* Cortex-A# Core */
332 #define __CA_REV 0x0000U /* Core revision r0p0 */
333 /* ToDo: define the correct core features for the <Device> */
334 #define __FPU_PRESENT 1U /* Set to 1 if FPU is present */
335 #define __GIC_PRESENT 1U /* Set to 1 if GIC is present */
336 #define __TIM_PRESENT 1U /* Set to 1 if TIM is present */
337 #define __L2C_PRESENT 1U /* Set to 1 if L2C is present */
339 /* ToDo: include the correct core_ca#.h file
340 core_ca5.h if your device is a CORTEX-A5 device
341 core_ca7.h if your device is a CORTEX-A7 device
342 core_ca9.h if your device is a CORTEX-A9 device */
343 #include <core_ca#.h> /* Processor and core peripherals */
344 /* ToDo: include your system_<Device>.h file
345 replace '<Device>' with your device name */
346 #include "system_<Device>.h" /* System Header */
350 /* ========================================================================= */
351 /* ============ Device Specific Peripheral Section ============ */
352 /* ========================================================================= */
355 /* ToDo: add here your device specific peripheral access structure typedefs
356 following is an example for a timer */
358 /* ========================================================================= */
359 /* ============ TMR ============ */
360 /* ========================================================================= */
364 __IOM uint32_t TimerLoad; /* Offset: 0x004 (R/W) Load Register */
365 __IM uint32_t TimerValue; /* Offset: 0x008 (R/ ) Counter Current Value Register */
366 __IOM uint32_t TimerControl; /* Offset: 0x00C (R/W) Control Register */
367 __OM uint32_t TimerIntClr; /* Offset: 0x010 ( /W) Interrupt Clear Register */
368 __IM uint32_t TimerRIS; /* Offset: 0x014 (R/ ) Raw Interrupt Status Register */
369 __IM uint32_t TimerMIS; /* Offset: 0x018 (R/ ) Masked Interrupt Status Register */
370 __IM uint32_t RESERVED[1];
371 __IOM uint32_t TimerBGLoad; /* Offset: 0x020 (R/W) Background Load Register */
372 } <DeviceAbbreviation>_TMR_TypeDef;
376 /* -------- End of section using anonymous unions and disabling warnings -------- */
377 #if defined (__CC_ARM)
379 #elif defined (__ICCARM__)
380 /* leave anonymous unions enabled */
381 #elif (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
382 #pragma clang diagnostic pop
383 #elif defined (__GNUC__)
384 /* anonymous unions are enabled by default */
385 #elif defined (__TMS470__)
386 /* anonymous unions are enabled by default */
387 #elif defined (__TASKING__)
388 #pragma warning restore
389 #elif defined (__CSMC__)
390 /* anonymous unions are enabled by default */
392 #warning Not supported compiler type
396 /* ========================================================================= */
397 /* ============ Device Specific Peripheral Address Map ============ */
398 /* ========================================================================= */
401 /* ToDo: add here your device peripherals base addresses
402 following is an example for timer */
404 /* Peripheral and SRAM base address */
405 #define <DeviceAbbreviation>_FLASH_BASE (0x00000000UL) /* (FLASH ) Base Address */
406 #define <DeviceAbbreviation>_SRAM_BASE (0x20000000UL) /* (SRAM ) Base Address */
407 #define <DeviceAbbreviation>_PERIPH_BASE (0x40000000UL) /* (Peripheral) Base Address */
409 /* Peripheral memory map */
410 #define <DeviceAbbreviation>TIM0_BASE (<DeviceAbbreviation>_PERIPH_BASE) /* (Timer0 ) Base Address */
411 #define <DeviceAbbreviation>TIM1_BASE (<DeviceAbbreviation>_PERIPH_BASE + 0x0800) /* (Timer1 ) Base Address */
412 #define <DeviceAbbreviation>TIM2_BASE (<DeviceAbbreviation>_PERIPH_BASE + 0x1000) /* (Timer2 ) Base Address */
415 /* ========================================================================= */
416 /* ============ Peripheral declaration ============ */
417 /* ========================================================================= */
420 /* ToDo: Add here your device peripherals pointer definitions
421 following is an example for timer */
423 #define <DeviceAbbreviation>_TIM0 ((<DeviceAbbreviation>_TMR_TypeDef *) <DeviceAbbreviation>TIM0_BASE)
424 #define <DeviceAbbreviation>_TIM1 ((<DeviceAbbreviation>_TMR_TypeDef *) <DeviceAbbreviation>TIM0_BASE)
425 #define <DeviceAbbreviation>_TIM2 ((<DeviceAbbreviation>_TMR_TypeDef *) <DeviceAbbreviation>TIM0_BASE)
431 #endif /* <Device>_H */
432 </pre> </div></div><!-- contents -->
433 </div><!-- PageDoc -->
434 </div><!-- doc-content -->
435 <!-- start footer part -->
436 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
439 <script type="text/javascript">
441 writeFooter.call(this);