CMSIS2000  0.0.7
 Указатель Структуры данных Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Макросы Группы Страницы
iArch_nums.h
См. документацию.
1 /*
2  * CMSIS2000
3  * CMSIS-like sources for LPC2xxx series MCUs
4  *
5  * (C) Copyright 2011-2012, Dmitriy Cherepanov, All Rights Reserved
6  *
7  * Version: 0.0.7
8  * Date of the Last Update: 2013-03-04
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a copy
11  * of this software and associated documentation files (the "Software"), to
12  * deal in the Software without restriction, including without limitation the
13  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14  * sell copies of the Software, and to permit persons to whom the Software is
15  * furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included in
18  * all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26  * IN THE SOFTWARE.
27  *
28  * Do not be lasy! For the latest version see http://irtos.sourceforge.net .
29  *
30  *
31 #*/
32 
33 /** \file
34  *\if russian_lng
35  * Файл определяющий номера архитектур и семейств процессоров
36  *
37  * Содержит и макрос для фильтрации исходного кода под выбранную архитектуру и семейство
38  *\else
39  * This file defines numbers of architectures and MCU families
40  *
41 * File is used define macroses for filtering sources for selected arch and family
42  *\endif
43  */
44 #ifndef _iARCH_NUMS_H_
45 #define _iARCH_NUMS_H_ 1
46 /*----------------------------------------------------------------------------*/
47 #define GLIB_ARCH_NUM (-1)
48 #define AVR_MEGA_ARCH_NUM (1)
49 //#define __AVR_MEGA___ARCH_NUM (__AVR_MEGA__)
50 #define POSIX_GENERIC_ARCH_NUM 2
51 #define WIN_NT_ARCH_NUM 3
52 
53 #define ARM7_ARCH_NUM 0x40 // ARMv4T
54 #define CM0_ARCH_NUM 0x42 // ARMv5 Cortex M0
55 #define CM1_ARCH_NUM 0x41 // ARMv5 Cortex M1
56 #define CM3_ARCH_NUM 0x43 // ARMv5 Cortex M3
57 #define ARM9_ARCH_NUM 0x50 // ARMv5
58 #define ARM_CORTEX_ARCH_NUM 0x60 // ARMv6
59 /*----------------------------------------------------------------------------*/
60 #define CONCAT_iarch(A, B) A##B
61 
62 #define i_ARCH_CHECK2(current_arch,test_arch) \
63  ((CONCAT_iarch(current_arch,_ARCH_NUM)) == (CONCAT_iarch(test_arch,_ARCH_NUM)))
64 
65 /**\def i_MCU_FAMILY_CHECK()
66  *\if russian_lng
67  Используется для определения семейства микроконтроллеров
68 
69  Например:
70  *\else
71  Used for determine MCU family
72 
73  For example:
74 *\endif
75 \code
76 #if i_MCU_FAMILY_CHECK(i_MCU_FAMILY,LPC2xxx)
77  #include "clock_LPC2000.h"
78 #endif
79 \endcode
80 \see \ref config_files_auto_mcu_id
81 */
82 
83 #define i_ARCH_CHECK(test_arch) i_ARCH_CHECK2(i_ARCH,test_arch)
84 
85 
86 
87 #endif /* _iARCH_NUMS_H_ */