xref: /nrf52832-nimble/rt-thread/documentation/doxygen/hardware.h (revision 167494296f0543431a51b6b1b83e957045294e05)
1 /*
2  * This file is only used for doxygen document generation.
3  */
4 
5 /**
6  * @defgroup bsp Hardware Related Package
7  *
8  * @brief Hardware Related Package includes board support package(BSP) and CSP(Chip
9  * Support Package).
10  *
11  * Board Support Package(BSP) is the hardware related wrapper, for example, peripherals
12  * in board, the pinmux setting etc. In RT-Thread RTOS, the bsp is placed under bsp
13  * directory.
14  *
15  * Chip Support Package (CSP) is a software set that contains chip specific software.
16  * A CSP usually includes operating system porting and peripheral device drivers inside
17  * chip. In RT-Thread RTOS, the csp is placed under libcpu directory.
18  */
19 
20 /**
21  * @addtogroup bsp
22  */
23 /*@{*/
24 
25 /**
26  * This function will return current system interrupt status and disable system
27  * interrupt.
28  *
29  * @return the current system interrupt status
30  */
31 rt_base_t rt_hw_interrupt_disable(void);
32 
33 /**
34  * This function will set the specified interrupt status, which shall saved by
35  * rt_hw_intterrupt_disable function. If the saved interrupt status is interrupt
36  * opened, this function will open system interrupt status.
37  */
38 void rt_hw_interrupt_enable(rt_base_t level);
39 
40 /**
41  * This function initializes interrupt.
42  */
43 void rt_hw_interrupt_init(void);
44 
45 /**
46  * This function masks the specified interrupt.
47  *
48  * @param vector the interrupt number to be masked.
49  *
50  * @note not all of platform provide this function.
51  */
52 void rt_hw_interrupt_mask(int vector);
53 
54 /**
55  * This function umasks the specified interrupt.
56  *
57  * @param vector the interrupt number to be unmasked.
58  *
59  * @note not all of platform provide this function.
60  */
61 void rt_hw_interrupt_umask(int vector);
62 
63 /**
64  * This function will install specified interrupt handler.
65  *
66  * @param vector the interrupt number to be installed.
67  * @param new_handler the new interrupt handler.
68  * @param old_handler the old interrupt handler. This parameter can be RT_NULL.
69  *
70  * @note not all of platform provide this function.
71  */
72 void rt_hw_interrupt_install(int vector, rt_isr_handler_t new_handler,
73 		rt_isr_handler_t *old_handler);
74 
75 /**
76  * This function will reset whole platform.
77  */
78 void rt_hw_cpu_reset(void);
79 
80 /**
81  * This function will halt whole platform.
82  */
83 void rt_hw_cpu_shutdown(void);
84 
85 /*@}*/
86