Project

General

Profile

Statistics
| Revision:

root / proj / include / interrupts_func.h @ 354

History | View | Annotate | Download (1.33 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
 * @brief Interrupts functions.
7
 *
8
 * @{
9
 */
10
11 351 up20180642
#include "libs.h"
12 345 up20180642
13 340 up20180642
/**
14 154 up20180655
 * @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 345 up20180642
/**
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 323 up20180642
int get_interrupts_vector(uint64_t *p);
43 304 up20180642
44 340 up20180642
/**
45
 * @}
46
 */
47
48 154 up20180655
#endif /* end of include guard: INTERRUPTS_FUNC_H_INCLUDED */