Project

General

Profile

Statistics
| Revision:

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

History | View | Annotate | Download (1.34 KB)

1
#ifndef INTERRUPTS_FUNC_H_INCLUDED
2
#define INTERRUPTS_FUNC_H_INCLUDED
3

    
4
/**
5
 * @defgroup interrupts_func interrupts_func
6
 * @ingroup proj
7
 * @brief Interrupts functions.
8
 *
9
 * @{
10
 */
11

    
12
#include "libs.h"
13

    
14
/**
15
 * @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
/**
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
int get_interrupts_vector(uint64_t *p);
44

    
45
/**
46
 * @}
47
 */
48

    
49
#endif /* end of include guard: INTERRUPTS_FUNC_H_INCLUDED */