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
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef _ISR_H__
#define _ISR_H__
#include <stdbool.h>
#include <stdlib.h>
#include "common.h"
#define ISR_SUCC 0
#define ISR_ERR 1
#define TOTAL_IRQ_NUM 96
typedef void(*isr_handler_t)(void);
/** @defgroup device_isr_handler_t
* @{
*/
#pragma pack(1)
typedef struct
{
bool IRQ_Flag;
isr_handler_t isrHandler;
}device_isr_handler_t;
#pragma pack()
int ISR_Register(IRQn_Type irqnum, isr_handler_t cb);
int ISR_DeRegister(IRQn_Type irqnum);
#endif