root / proj / include / interrupts_func.h @ 353
History | View | Annotate | Download (1.33 KB)
1 |
#ifndef INTERRUPTS_FUNC_H_INCLUDED
|
---|---|
2 |
#define INTERRUPTS_FUNC_H_INCLUDED
|
3 |
|
4 |
/**
|
5 |
* @defgroup interrupts_func interrupts_func
|
6 |
* @brief Interrupts functions.
|
7 |
*
|
8 |
* @{
|
9 |
*/
|
10 |
|
11 |
#include "libs.h" |
12 |
|
13 |
/**
|
14 |
* @brief Subscribes all drivers used (timer->keyboard->mouse)
|
15 |
* @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
|
16 |
* @see {_ERRORS_H_::errors}
|
17 |
*/
|
18 |
int (subscribe_all)(void); |
19 |
|
20 |
/**
|
21 |
* @brief Unsubscribes all subscribed interrupts
|
22 |
* @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
|
23 |
* @see {_ERRORS_H_::errors}
|
24 |
*/
|
25 |
int (unsubscribe_all)(void); |
26 |
|
27 |
/**
|
28 |
* @brief Calls interrupt handler corresponding to the bit specified by the argument.
|
29 |
* @param handler Interrupt handler to call
|
30 |
*/
|
31 |
void interrupt_handler(uint8_t handler);
|
32 |
|
33 |
/**
|
34 |
* @brief Blocking function that waits for an interrupt to occur.
|
35 |
*
|
36 |
* Rewrites the provided argument with the interrupt vector it gets.
|
37 |
*
|
38 |
* This function decisively reduces the complexity of an interrupt cycle, allowing
|
39 |
* for each menu to have its own, simplified interrupt cycle.
|
40 |
* @param p Pointer where interrupt vector will be saved
|
41 |
*/
|
42 |
int get_interrupts_vector(uint64_t *p);
|
43 |
|
44 |
/**
|
45 |
* @}
|
46 |
*/
|
47 |
|
48 |
#endif /* end of include guard: INTERRUPTS_FUNC_H_INCLUDED */ |