• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* ----------------------------------------------------------------------------
2  * Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved.
3  * Description : LiteOS interrupt module implemention.
4  * Redistribution and use in source and binary forms, with or without modification,
5  * are permitted provided that the following conditions are met:
6  * 1. Redistributions of source code must retain the above copyright notice, this list of
7  * conditions and the following disclaimer.
8  * 2. Redistributions in binary form must reproduce the above copyright notice, this list
9  * of conditions and the following disclaimer in the documentation and/or other materials
10  * provided with the distribution.
11  * 3. Neither the name of the copyright holder nor the names of its contributors may be used
12  * to endorse or promote products derived from this software without specific prior written
13  * permission.
14  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  * ---------------------------------------------------------------------------- */
26 
27 /**
28  * @defgroup los_hwi Hardware interrupt
29  * @ingroup kernel
30  */
31 
32 #ifndef _LOS_HWI_H
33 #define _LOS_HWI_H
34 
35 #include "los_typedef.h"
36 
37 #ifdef __cplusplus
38 #if __cplusplus
39 extern "C" {
40 #endif /* __cplusplus */
41 #endif /* __cplusplus */
42 /**
43  * @ingroup los_config
44  * Configuration item for interrupt with argument
45  */
46 #ifndef OS_HWI_WITH_ARG
47 #define OS_HWI_WITH_ARG             YES
48 #endif
49 /**
50  * @ingroup los_hwi
51  * Define the type of a hardware interrupt number.
52  */
53 typedef UINT32                                              HWI_HANDLE_T;
54 
55 /**
56  * @ingroup los_hwi
57  * Define the type of a hardware interrupt priority.
58  */
59 typedef UINT16                                              HWI_PRIOR_T;
60 
61 /**
62  * @ingroup los_hwi
63  * Define the type of hardware interrupt mode configurations.
64  */
65 typedef UINT16                                              HWI_MODE_T;
66 
67 /**
68  * @ingroup los_hwi
69  * Define the type of the parameter used for the hardware interrupt creation function.
70  * The function of this parameter varies among platforms.
71  */
72 typedef UINT32                                              HWI_ARG_T;
73 
74 /**
75  * @ingroup  los_hwi
76  * Define the type of a hardware interrupt handling function.
77  */
78 #if (OS_HWI_WITH_ARG == YES)
79 
80 typedef VOID (* HWI_PROC_FUNC)(VOID *arg);
81 typedef struct {
82     HWI_PROC_FUNC pfnHandler;
83     VOID*         pParm;
84 } HWI_SLAVE_FUNC;
85 
86 #else
87 
88 typedef VOID (* HWI_PROC_FUNC)(VOID);
89 
90 #endif
91 
92 /**
93  * @ingroup  los_hwi
94  * Define the type of a hardware interrupt hook function.
95  */
96 typedef VOID (*HWI_HOOK_FUNC)(UINT32 hwiNum);
97 
98 /**
99  * @ingroup  los_hwi
100  * Define the type of a hardware interrupt vector table function.
101  */
102 typedef VOID (**HWI_VECTOR_FUNC)(VOID);
103 
104 /**
105  * @ingroup los_hwi
106  * Count of interrupts.
107  */
108 extern UINT32  g_vuwIntCount;
109 
110 /**
111  * @ingroup los_hwi
112  * An interrupt is active.
113  */
114 #define OS_INT_ACTIVE               (g_vuwIntCount > 0)
115 
116 /**
117  * @ingroup los_hwi
118  * An interrupt is inactive.
119  */
120 #define OS_INT_INACTIVE             (!(OS_INT_ACTIVE))
121 
122 /**
123  * @ingroup los_hwi
124  * Count of HimiDeer system interrupt vector.
125  */
126 #define OS_HIMIDEER_SYS_VECTOR_CNT               26
127 
128 /**
129  * @ingroup los_hwi
130  * Count of HimiDeer local interrupt vector 0 - 5, enabled by CSR mie 26 -31 bit.
131  */
132 #define OS_HIMIDEER_MIE_IRQ_VECTOR_CNT            6
133 
134 /**
135  * @ingroup los_hwi
136  * Count of HimiDeer IRQ controlled by CSR mie
137  */
138 #define OS_HIMIDEER_MIE_TOTAL_CNT        (OS_HIMIDEER_SYS_VECTOR_CNT + OS_HIMIDEER_MIE_IRQ_VECTOR_CNT)
139 
140 /**
141  * @ingroup los_hwi
142  * Count of HimiDeer local interrupt vector 6 - 34, enabled by custom CSR locie0 0 - 22 bit.
143  */
144 #ifndef LOSCFG_RAM_MONITOR
145 #define OS_HIMIDEER_CUSTOM_IRQ_VECTOR_CNT        29
146 #else
147 #define OS_HIMIDEER_CUSTOM_IRQ_VECTOR_CNT        (29 + 1)  // add ram monitor interrupt
148 #endif
149 /**
150  * @ingroup los_hwi
151  * Count of HimiDeer local IRQ interrupt vector.
152  */
153 #define OS_HIMIDEER_LOCAL_IRQ_VECTOR_CNT        (OS_HIMIDEER_MIE_IRQ_VECTOR_CNT + OS_HIMIDEER_CUSTOM_IRQ_VECTOR_CNT)
154 
155 /**
156  * @ingroup los_hwi
157  * Count of himideer interrupt vector.
158  */
159 #define OS_HIMIDEER_VECTOR_CNT      (OS_HIMIDEER_SYS_VECTOR_CNT + OS_HIMIDEER_LOCAL_IRQ_VECTOR_CNT)
160 
161 #define OS_VECTOR_CNT               OS_HIMIDEER_VECTOR_CNT
162 
163 #define OS_HWI_MAX_NUM              OS_HIMIDEER_VECTOR_CNT
164 
165 /**
166  * @ingroup los_hwi
167  * Minimum interrupt number.
168  */
169 #define OS_HWI_MIN                  0
170 
171 /**
172  * @ingroup los_hwi
173  * Maximum interrupt number.
174  */
175 #define OS_HWI_MAX                  ((OS_HWI_MAX_NUM) - 1)
176 
177 /**
178  * @ingroup los_hwi
179  * Highest priority of a hardware interrupt.
180  */
181 #ifndef OS_HWI_PRIO_HIGHEST
182 #define OS_HWI_PRIO_HIGHEST        7
183 #endif
184 /**
185  * @ingroup los_hwi
186  * Lowest priority of a hardware interrupt.
187  */
188 #ifndef OS_HWI_PRIO_LOWEST
189 #define OS_HWI_PRIO_LOWEST         1
190 #endif
191 
192 /**
193  * @ingroup los_hwi
194  * Hardware interrupt error code: Invalid interrupt number.
195  *
196  * Value: 0x02000900
197  *
198  * Solution: Ensure that the interrupt number is valid. The value range of the interrupt number applicable
199  * for a Cortex-M4 platform is [0,240].
200  */
201 #define OS_ERRNO_HWI_NUM_INVALID                 LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x00)
202 
203 /**
204  * @ingroup los_hwi
205  * Hardware interrupt error code: Null hardware interrupt handling function.
206  *
207  * Value: 0x02000901
208  *
209  * Solution: Pass in a valid non-null hardware interrupt handling function.
210  */
211 #define OS_ERRNO_HWI_PROC_FUNC_NULL              LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x01)
212 
213 /**
214  * @ingroup los_hwi
215  * Hardware interrupt error code: Insufficient interrupt resources for hardware interrupt creation.
216  *
217  * Value: 0x02000902
218  *
219  * Solution: Increase the configured maximum number of supported hardware interrupts.
220  */
221 #define OS_ERRNO_HWI_CB_UNAVAILABLE              LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x02)
222 
223 /**
224  * @ingroup los_hwi
225  * Hardware interrupt error code: Insufficient memory for hardware interrupt initialization.
226  *
227  * Value: 0x02000903
228  *
229  * Solution: Expand the configured memory.
230  */
231 #define OS_ERRNO_HWI_NO_MEMORY                   LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x03)
232 
233 /**
234  * @ingroup los_hwi
235  * Hardware interrupt error code: The interrupt has already been created.
236  *
237  * Value: 0x02000904
238  *
239  * Solution: Check whether the interrupt specified by the passed-in interrupt number has already been created.
240  */
241 #define OS_ERRNO_HWI_ALREADY_CREATED             LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x04)
242 
243 /**
244  * @ingroup los_hwi
245  * Hardware interrupt error code: Invalid interrupt priority.
246  *
247  * Value: 0x02000905
248  *
249  * Solution: Ensure that the interrupt priority is valid. The value range of the interrupt priority applicable
250  * for a Cortex-M4 platform is [OS_HWI_PRIO_HIGHEST,OS_HWI_PRIO_LOWEST].
251  */
252 #define OS_ERRNO_HWI_PRIO_INVALID                LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x05)
253 
254 /**
255  * @ingroup los_hwi
256  * Hardware interrupt error code: Incorrect interrupt creation mode.
257  *
258  * Value: 0x02000906
259  *
260  * Solution: The interrupt creation mode can be only set to OS_HWI_MODE_COMM or OS_HWI_MODE_FAST of which the
261  * value can be 0 or 1.
262  */
263 #define OS_ERRNO_HWI_MODE_INVALID                LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x06)
264 
265 /**
266  * @ingroup los_hwi
267  * Hardware interrupt error code: The interrupt has already been created as a fast interrupt.
268  *
269  * Value: 0x02000907
270  *
271  * Solution: Check whether the interrupt specified by the passed-in interrupt number has already been created.
272  */
273 #define OS_ERRNO_HWI_FASTMODE_ALREADY_CREATED    LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x07)
274 
275 /**
276  * @ingroup los_hwi
277  * Hardware interrupt error code: The interrupt is not created when enable this interrupt.
278  *
279  * Value: 0x02000908
280  *
281  * Solution: Check whether the interrupt is already been created before enable.
282  */
283 #define OS_ERRNO_HWI_NOT_CREATED    LOS_ERRNO_OS_ERROR(LOS_MOD_HWI, 0x08)
284 
285 #if (OS_HWI_WITH_ARG == YES)
286 /**
287  * @ingroup los_hwi
288  * hardware interrupt Slave form mapping handling function array.
289  */
290 extern HWI_SLAVE_FUNC g_hwiSlaveForm[OS_HIMIDEER_VECTOR_CNT];
291 
292 /**
293  * @ingroup los_hwi
294  * Set interrupt vector table.
295  */
296 extern HWI_PROC_FUNC g_intEntry;
297 #define OS_SET_VECTOR(num, vector, arg) do {    \
298     g_hwiSlaveForm[num].pfnHandler = (vector);   \
299     g_hwiSlaveForm[num].pParm = (VOID*)(UINTPTR)(arg);   \
300 } while (0)
301 #else
302 /**
303  * @ingroup los_hwi
304  * hardware interrupt Slave form mapping handling function array.
305  */
306 extern HWI_PROC_FUNC g_hwiSlaveForm[OS_HIMIDEER_VECTOR_CNT];
307 
308 /**
309  * @ingroup los_hwi
310  * Set interrupt vector table.
311  */
312 #define OS_SET_VECTOR(num, vector) do { \
313     g_hwiSlaveForm[num] = (vector);     \
314 } while (0)
315 #endif
316 
317 /**
318  * @ingroup  los_hwi
319  * @brief Create a hardware interrupt.
320  *
321  * @par Description:
322  * This API is used to configure a hardware interrupt and register a hardware interrupt handling function.
323  *
324  * @attention
325  * <ul>
326  * <li>The hardware interrupt module is usable only when the configuration item for hardware interrupt tailoring
327  * is enabled.</li>
328  * <li>Hardware interrupt number value range: [OS_HWI_MIN,OS_HWI_MAX]. The value range applicable for a Cortex-M4
329  * platform is [0,240].</li>
330  * <li>OS_HWI_MAX_NUM specifies the maximum number of interrupts that can be created.</li>
331  * <li>Before executing an interrupt on a platform, refer to the chip manual of the platform.</li>
332  * </ul>
333  *
334  * @param  hwiNum     [IN] Type#HWI_HANDLE_T: hardware interrupt number. The value range applicable for a Cortex-M4
335  * platform is [0,240].
336  * @param  hwiPrio    [IN] Type#HWI_PRIOR_T: hardware interrupt priority. Ignore this parameter temporarily.
337  * @param  mode       [IN] Type#HWI_MODE_T: hardware interrupt mode. Ignore this parameter temporarily.
338  * @param  funHandler [IN] Type#HWI_PROC_FUNC: interrupt handler used when a hardware interrupt is triggered.
339  * @param  arg        [IN] Type#HWI_ARG_T: input parameter of the interrupt handler used when a hardware interrupt
340  *                         is triggered.
341  *
342  * @retval #OS_ERRNO_HWI_PROC_FUNC_NULL     0x02000901: Null hardware interrupt handling function.
343  * @retval #OS_ERRNO_HWI_NUM_INVALID        0x02000900: Invalid interrupt number.
344  * @retval #OS_ERRNO_HWI_NO_MEMORY          0x02000903: Insufficient memory for hardware interrupt creation.
345  * @retval #OS_ERRNO_HWI_ALREADY_CREATED    0x02000904: The interrupt handler being created has already been created.
346  * @retval #LOS_OK                          0,               : The interrupt is successfully created.
347  * @par Dependency:
348  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
349  * @see None.
350  */
351 extern UINT32 LOS_HwiCreate(HWI_HANDLE_T  hwiNum,
352                             HWI_PRIOR_T   hwiPrio,
353                             HWI_MODE_T    mode,
354                             HWI_PROC_FUNC funHandler,
355                             HWI_ARG_T     arg);
356 
357 /**
358  * @ingroup  los_hwi
359  * @brief: Hardware interrupt entry function.
360  *
361  * @par Description:
362  * This API is used as all hardware interrupt handling function entry.
363  *
364  * @attention:
365  * <ul><li>None.</li></ul>
366  *
367  * @param: None.
368  *
369  * @retval:None.
370  * @par Dependency:
371  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
372  * @see None.
373  */
374 extern VOID  OsInterrupt(VOID);
375 
376 /**
377  * @ingroup  los_hwi
378  * @brief: Get a interrupt number.
379  *
380  * @par Description:
381  * This API is used to get the current interrupt number.
382  *
383  * @attention:
384  * <ul><li>None.</li></ul>
385  *
386  * @param: None.
387  *
388  * @retval: Interrupt Indexes number.
389  * @par Dependency:
390  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
391  * @see None.
392  */
393 extern UINT32 OsIntNumGet(VOID);
394 
395 /**
396  * @ingroup  los_hwi
397  * @brief: Default vector handling function.
398  *
399  * @par Description:
400  * This API is used to configure interrupt for null function.
401  *
402  * @attention:
403  * <ul><li>None.</li></ul>
404  *
405  * @param: None.
406  *
407  * @retval:None.
408  * @par Dependency:
409  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
410  * @see None.
411  */
412 extern VOID  OsHwiDefaultHandler(VOID);
413 
414 /**
415  * @ingroup  los_config
416  * @brief: hardware interrupt init function.
417  *
418  * @par Description:
419  * This API is used to initialize hardware interrupt module.
420  *
421  * @attention:
422  * <ul><li>None.</li></ul>
423  *
424  * @param: None.
425  *
426  * @retval #LOS_OK                      0:Hardware interrupt initialization success.
427  *
428  * @par Dependency:
429  * <ul><li>los_config.h: the header file that contains the API declaration.</li></ul>
430  * @see None.
431  */
432 extern VOID OsHwiInit(VOID);
433 
434  /**
435  * @ingroup los_hwi
436  * @brief Enable all interrupts.
437  *
438  * @par Description:
439  * <ul>
440  * <li>This API is used to enable all IRQ and FIQ interrupts in the CPSR.</li>
441  * </ul>
442  * @attention
443  * <ul>
444  * <li>None.</li>
445  * </ul>
446  *
447  * @param None.
448  *
449  * @retval CPSR value obtained after all interrupts are enabled.
450  * @par Dependency:
451  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
452  * @see LOS_IntRestore
453  */
454 extern UINTPTR LOS_IntUnLock(VOID);
455 
456  /**
457  * @ingroup los_hwi
458  * @brief Disable all interrupts.
459  *
460  * @par Description:
461  * <ul>
462  * <li>This API is used to disable all IRQ and FIQ interrupts in the CPSR.</li>
463  * </ul>
464  * @attention
465  * <ul>
466  * <li>None.</li>
467  * </ul>
468  *
469  * @param None.
470  *
471  * @retval CPSR value obtained before all interrupts are disabled.
472  * @par Dependency:
473  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
474  * @see LOS_IntRestore
475  */
476 extern UINTPTR LOS_IntLock(VOID);
477 
478  /**
479  * @ingroup los_hwi
480  * @brief Restore interrupts.
481  *
482  * @par Description:
483  * <ul>
484  * <li>This API is used to restore the CPSR value obtained before all interrupts are disabled.</li>
485  * </ul>
486  * @attention
487  * <ul>
488  * <li>This API can be called only after all interrupts are disabled, and the input parameter value
489  * should be the value returned by calling the all interrupt disabling API.</li>
490  * </ul>
491  *
492  * @param intSave [IN] CPSR value obtained before all interrupts are disabled.
493  *
494  * @retval None.
495  * @par Dependency:
496  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
497  * @see LOS_IntLock
498  */
499 extern VOID LOS_IntRestore(UINTPTR intSave);
500 
501 /**
502  * @ingroup  los_hwi
503  * @brief Delete hardware interrupt.
504  *
505  * @par Description:
506  * This API is used to delete hardware interrupt.
507  *
508  * @attention
509  * <ul>
510  * <li>The hardware interrupt module is usable only when the configuration item for hardware interrupt
511  * tailoring is enabled.</li>
512  * <li>Hardware interrupt number value range: [OS_HWI_MIN,OS_HWI_MAX]. The value range applicable for
513  * a Cortex-M4 platform is [0,240].</li>
514  * <li>OS_HWI_MAX_NUM specifies the maximum number of interrupts that can be created.</li>
515  * <li>Before executing an interrupt on a platform, refer to the chip manual of the platform.</li>
516  * </ul>
517  *
518  * @param  hwiNum [IN] Type#HWI_HANDLE_T: hardware interrupt number. The value range applicable for
519  * a Cortex-M4 platform is [0,240].
520  *
521  * @retval #OS_ERRNO_HWI_NUM_INVALID              0x02000900: Invalid interrupt number.
522  * @retval #LOS_OK                                0: The interrupt is successfully delete.
523  * @par Dependency:
524  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
525  * @see None.
526  */
527 extern UINT32 LOS_HwiDelete(HWI_HANDLE_T hwiNum);
528 
529 /**
530  * @ingroup los_hwi
531  * @brief Rigister interrupt hook functions.
532  *
533  * @par Description:
534  * <ul>
535  * <li>This API is used to register functions which is reserved in rom code .</li>
536  * </ul>
537  * @attention
538  * <ul>
539  * <li>None .</li>
540  * </ul>
541  *
542  * @param  prepareFunc [IN] Type#HWI_HOOK_FUNC: function that called before irq.
543  * @param  resumeFunc [IN] Type#HWI_HOOK_FUNC: function that called after irq.
544  *
545  * @retval VOID.
546  * @par Dependency:
547  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
548  * @see None
549  */
550 extern VOID LOS_HwiRigister(HWI_HOOK_FUNC prepareFunc, HWI_HOOK_FUNC resumeFunc);
551 
552 /**
553  * @ingroup los_hwi
554  * @brief Get interrupt number.
555  *
556  * @par Description:
557  * <ul>
558  * <li>This API is used to get irq number .</li>
559  * </ul>
560  * @attention
561  * <ul>
562  * <li>This API can be called only when an irq come up .</li>
563  * </ul>
564  *
565  * @param None.
566  *
567  * @retval UINT32 irq number.
568  * @par Dependency:
569  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
570  * @see None
571  */
572 extern UINT32 LOS_IntNumGet(VOID);
573 
574 /**
575  * @ingroup los_hwi
576  * @brief Enable interrupt and set the priority.
577  *
578  * @par Description:
579  * <ul>
580  * <li>This API is used to set irq priority and enable it.</li>
581  * </ul>
582  * @attention
583  * <ul>
584  * <li>This API can be called only when an irq is created by LOS_HwiCreate .</li>
585  * </ul>
586  *
587  * @param irqnum [IN] The Irq num,it should in [OS_HIMIDEER_SYS_VECTOR_CNT,
588  * OS_HIMIDEER_LOCAL_IRQ_VECTOR_CNT]
589  * @param prior  [IN] The Irq priority, it should in [OS_HWI_PRIO_LOWEST, OS_HWI_PRIO_HIGHEST].
590  * @retval OS_ERRNO_HWI_NUM_INVALID: the input irqnum is incorrect
591  * @retval OS_ERRNO_HWI_NOT_CREATED: the irq is not created by LOS_HwiCreate
592  * @retval OS_ERRNO_HWI_PRIO_INVALID: the input the input irqnum is incorrect is incorrect
593  * @retval LOS_OK: success
594  * @par Dependency:
595  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
596  * @see None
597  */
598 extern UINT32 LOS_AdapIrqEnable(UINT32 irqNum, UINT16 prior);
599 
600 /**
601  * @ingroup los_hwi
602  * @brief Disable the interrupt.
603  *
604  * @par Description:
605  * <ul>
606  * <li>This API is used to disable irq.</li>
607  * </ul>
608  * @attention
609  * <ul>
610  * <li>None .</li>
611  * </ul>
612  *
613  * @param irqnum [IN] The Irq num,it should in [OS_HIMIDEER_SYS_VECTOR_CNT,
614  * OS_HIMIDEER_LOCAL_IRQ_VECTOR_CNT]
615  * @par Dependency:
616  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
617  * @see None
618  */
619 extern VOID LOS_AdapIrqDisable(UINT32 irqNum);
620 
621 /**
622  * @ingroup los_hwi
623  * @brief diable interrupts.
624  *
625  * @par Description:
626  * <ul>
627  * <li>This API is used to disable interrupts .</li>
628  * </ul>
629  * @attention
630  * <ul>
631  * <li>This API can be called only in OsTaskExit() .</li>
632  * </ul>
633  *
634  * @param None.
635  *
636  * @retval None.
637  * @par Dependency:
638  * <ul><li>los_hwi.h: the header file that contains the API declaration.</li></ul>
639  * @see None
640  */
641 extern VOID OsDisableIRQ(VOID);
642 
643 #ifdef __cplusplus
644 #if __cplusplus
645 }
646 #endif /* __cplusplus */
647 #endif /* __cplusplus */
648 #endif /* _LOS_HWI_H */
649