|
|
| version 1.1, 2003/12/08 00:55:31 | version 1.5, 2011/12/29 13:32:12 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ */ | |
| /* | /* |
| * Copyright (c) 2003 NONAKA Kimihiro | * Copyright (c) 2003 NONAKA Kimihiro |
| * All rights reserved. | * All rights reserved. |
| Line 12 | Line 10 |
| * 2. Redistributions in binary form must reproduce the above copyright | * 2. Redistributions in binary form must reproduce the above copyright |
| * notice, this list of conditions and the following disclaimer in the | * notice, this list of conditions and the following disclaimer in the |
| * documentation and/or other materials provided with the distribution. | * documentation and/or other materials provided with the distribution. |
| * 3. The name of the author may not be used to endorse or promote products | |
| * derived from this software without specific prior written permission. | |
| * | * |
| * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
| * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
| Line 58 enum { | Line 54 enum { |
| EXCEPTION_NUM | EXCEPTION_NUM |
| }; | }; |
| enum { | |
| INTR_TYPE_SOFTINTR = -1, /* software interrupt (INTn) */ | |
| INTR_TYPE_EXTINTR = 0, /* external interrupt */ | |
| INTR_TYPE_EXCEPTION = 1, /* exception */ | |
| }; | |
| #define EXCEPTION(num, vec) \ | #define EXCEPTION(num, vec) \ |
| exception(num, vec); | exception(num, vec); |
| #define INTERRUPT(num, softintp, errorp, error_code) \ | #define INTERRUPT(num, softintp) \ |
| interrupt(num, softintp, errorp, error_code) | interrupt(num, softintp, 0, 0) |
| void exception(int num, int vec); | void CPUCALL exception(int num, int vec); |
| void interrupt(int num, int softintp, int errorp, int error_code); | void CPUCALL interrupt(int num, int intrtype, int errorp, int error_code); |
| #ifdef __cplusplus | #ifdef __cplusplus |
| } | } |