Project

General

Profile

Statistics
| Revision:

root / proj / project / include / interrupts_func.h @ 364

History | View | Annotate | Download (1.34 KB)

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