Project

General

Profile

Statistics
| Revision:

root / proj / include / interrupts_func.h @ 347

History | View | Annotate | Download (1.39 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 "timer.h"
12
#include "kbc.h"
13
#include "keyboard.h"
14
#include "mouse.h"
15

    
16
/**
17
 * @brief Subscribes all drivers used (timer->keyboard->mouse)
18
 * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
19
 * @see {_ERRORS_H_::errors}
20
 */
21
int (subscribe_all)(void);
22

    
23
/**
24
 * @brief Unsubscribes all subscribed interrupts
25
 * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
26
 * @see {_ERRORS_H_::errors}
27
 */
28
int (unsubscribe_all)(void);
29

    
30
/**
31
 * @brief Calls interrupt handler corresponding to the bit specified by the argument.
32
 * @param handler Interrupt handler to call
33
 */
34
void interrupt_handler(uint8_t handler);
35

    
36
/**
37
 * @brief Blocking function that waits for an interrupt to occur.
38
 *
39
 * Rewrites the provided argument with the interrupt vector it gets.
40
 *
41
 * This function decisively reduces the complexity of an interrupt cycle, allowing
42
 * for each menu to have its own, simplified interrupt cycle.
43
 * @param   p   Pointer where interrupt vector will be saved
44
 */
45
int get_interrupts_vector(uint64_t *p);
46

    
47
/**
48
 * @}
49
 */
50

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