OSDN Git Service

1.change core file extension to .c from .cpp
[mimic/MiMicSDK.git] / lib / src / os / NyLPC_cIsr.h
1 /*********************************************************************************\r
2  * PROJECT: MiMic\r
3  * --------------------------------------------------------------------------------\r
4  *\r
5  * This file is part of MiMic\r
6  * Copyright (C)2011 Ryo Iizuka\r
7  *\r
8  * MiMic is free software: you can redistribute it and/or modify\r
9  * it under the terms of the GNU Lesser General Public License as published\r
10  * by the Free Software Foundation, either version 3 of the License, or\r
11  * (at your option) any later version.\r
12  *\r
13  * This program is distributed in the hope that it will be useful,\r
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
16  * GNU General Public License for more details.\r
17  *\r
18  * You should have received a copy of the GNU Lesser General Public License\r
19  * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
20  *\r
21  * For further information please contact.\r
22  *  http://nyatla.jp/\r
23  *  <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>\r
24  *\r
25  *********************************************************************************/\r
26 #ifndef NYLPC_CISR_H_\r
27 #define NYLPC_CISR_H_\r
28 ////////////////////////////////////////////////////////////////////////////////\r
29 // Include\r
30 ////////////////////////////////////////////////////////////////////////////////\r
31 #include "NyLPC_stdlib.h"\r
32 #if NyLPC_ARCH==NyLPC_ARCH_FREERTOS\r
33 #include "FreeRTOS.h"\r
34 #include "queue.h"\r
35 #include "semphr.h"\r
36 #elif NyLPC_ARCH==NyLPC_ARCH_MBEDRTOS\r
37 \r
38 #else\r
39 #error Bad NyLPC_ARCH!\r
40 #endif\r
41 /**********************************************************************\r
42  *\r
43  * NyLPC_cIsr class\r
44  *\r
45  **********************************************************************/\r
46 \r
47 #ifdef __cplusplus\r
48 extern "C" {\r
49 #endif /* __cplusplus */\r
50 \r
51 typedef void (*NyLPC_cIsr_EventHandler)(unsigned long i_status);\r
52 \r
53 /**\r
54  * 全ての割込みとタスクスイッチを停止します。\r
55  */\r
56 void NyLPC_cIsr_enterCritical(void);\r
57 /**\r
58  * 全ての割込みとタスクスイッチを再開します。\r
59  */\r
60 void NyLPC_cIsr_exitCritical(void);\r
61 /**\r
62  * イベントハンドラを登録します。\r
63  * @param i_handler\r
64  * LPC17xxでは、イベントはISRからコールされます。\r
65  */\r
66 void NyLPC_cIsr_setEnetISR(NyLPC_cIsr_EventHandler i_handler);\r
67 \r
68 \r
69 #ifdef __cplusplus\r
70 }\r
71 #endif /* __cplusplus */\r
72 \r
73 #endif /* NYLPC_CISR_H_ */\r
74 \r