CMSIS2000  0.0.7
 Указатель Структуры данных Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Макросы Группы Страницы
iArch.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  *\addtogroup xgc_portPOSIX
34  * @{
35  *
36  * \file
37  *\if russian_lng
38  * Файл определяющий общие макросы под POSIX
39  *\else
40  * This file is used define macroses for POSIX
41  *\endif
42  */
43 
44 #ifndef _iPORT_ARCH_H_
45 #define _iPORT_ARCH_H_ 1
46 
47 /*----------------------------------------------------------------------------*/
48 #ifndef i_ARCH
49  #define i_ARCH POSIX_GENERIC
50 #endif
51 
52 /**
53  *\if russian_lng
54  * \brief Тип данных соотвестующий архитектуре ЦП.
55  *
56  * Самый быстрый тип данных. Вообще то это аналогия int. Но
57  в 8 битных ЦП это char.
58  *\else
59  * \brief iRTOS Architecture type.
60  *
61  * The fastest type. The type of main CPU ALU registers.
62  * On 8 bit MCU is char.
63  * On 16 bit and 32 bit MCU is int.
64  The analog of int type in C.
65  *\endif
66  */
67 #define iarch int
68 /**
69  *\if russian_lng
70  * \brief Размер основного типа даннных.
71  *
72  *\else
73  * \brief The size of main architecture type.
74  *
75  *\endif
76  */
77 #define sizeof_iarch 4
78 /** \if russian_lng
79  * \brief Стековый тип для данной архитектуры.
80  *
81  Для POSIX архитектуры стек не используеться
82  *\else
83  * \brief Architecture stack type.
84  *
85  * POSIX arch does not use Stack_t let it be pthread_t
86  *\endif
87  */
88 #define iStack_t pthread_t
89 
90 
91 #if (iSCHEDULER_TYPE != iCOOPERATIVE_SCHEDULER)
92 #error IN POSIX ARCH WE COULD BE ONLY IN COOPERATIVE MODE :-(
93 #endif
94 /**
95  * there is no way to stop thread even change it priority
96  * that is why this should be always 0.
97  * To see more
98  * look at void timer_imitation_function (void) in glib/os_port.c
99  */
100 /** @} end of group xgc_portPOSIX */
101 #endif /* _iPORT_ARCH_H_ */