OSDN Git Service

Added the target and the host directory.
[kozos-expbrd/kozos_expbrd.git] / firm / sample / simple_mp3_player / target / os / interrupt.h
1 #ifndef _INTERRUPT_H_INCLUDED_
2 #define _INTERRUPT_H_INCLUDED_
3
4 /* °Ê²¼¤Ï¥ê¥ó¥«¡¦¥¹¥¯¥ê¥×¥È¤ÇÄêµÁ¤·¤Æ¤¢¤ë¥·¥ó¥Ü¥ë */
5 extern char softvec;
6 #define SOFTVEC_ADDR (&softvec)
7
8 typedef short softvec_type_t;
9
10 typedef void (*softvec_handler_t)(softvec_type_t type, unsigned long sp);
11
12 #define SOFTVECS ((softvec_handler_t *)SOFTVEC_ADDR)
13
14 #define INTR_ENABLE  asm volatile ("andc.b #0x3f,ccr")
15 #define INTR_DISABLE asm volatile ("orc.b #0xc0,ccr")
16
17 /* ¥½¥Õ¥È¥¦¥¨¥¢¡¦³ä¹þ¤ß¥Ù¥¯¥¿¤Î½é´ü²½ */
18 int softvec_init(void);
19
20 /* ¥½¥Õ¥È¥¦¥¨¥¢¡¦³ä¹þ¤ß¥Ù¥¯¥¿¤ÎÀßÄê */
21 int softvec_setintr(softvec_type_t type, softvec_handler_t handler);
22
23 /* ¶¦Ä̳ä¹þ¤ß¥Ï¥ó¥É¥é */
24 void interrupt(softvec_type_t type, unsigned long sp);
25
26 #endif