blob: d09353a4f6f8073f4dc335fdc6640ab1dd9338ec (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 | /**
 *	Tiny Interrupt Manager
 *
 *	@author James Walmsley <james@fullfat-fs.co.uk>
 *	This code is licensed under the GNU GPLv3 license.
 **/
#ifndef _INTERRUPTS_H_
#define _INTERRUPTS_H_
typedef void (*FN_INTERRUPT_HANDLER)(int nIRQ, void *pParam);
typedef struct {
	FN_INTERRUPT_HANDLER 	pfnHandler;			///< Function that handles this IRQn
	void 				   *pParam;				///< A special parameter that the use can pass to the IRQ.
} INTERRUPT_VECTOR;
int InitInterruptController	();
int RegisterInterrupt		(int nIRQ, FN_INTERRUPT_HANDLER pfnHandler, void *pParam);
int EnableInterrupt			(int nIRQ);
int DisableInterrupt		(int nIRQ);
int EnableInterrupts		();
int DisableInterrupts		();
#endif
 |