00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _ISR_H_
00024 #define _ISR_H_
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 #define SV_INT_0 0x03
00049 #define SV_TIMER_0 0x0b
00050 #define SV_INT_1 0x13
00051 #define SV_TIMER_1 0x1b
00052 #define SV_SERIAL_0 0x23
00053 #define SV_TIMER_2 0x2b
00054 #define SV_RESUME 0x33
00055 #define SV_SERIAL_1 0x3b
00056 #define SV_INT_2 0x43 // (INT_2) points at USB autovector
00057 #define SV_I2C 0x4b
00058 #define SV_INT_4 0x53 // (INT_4) points at FIFO/GPIF autovector
00059 #define SV_INT_5 0x5b
00060 #define SV_INT_6 0x63
00061
00062 #define SV_MIN SV_INT_0
00063 #define SV_MAX SV_INT_6
00064
00065
00066
00067
00068
00069 #define UV_SUDAV 0x00
00070 #define UV_SOF 0x04
00071 #define UV_SUTOK 0x08
00072 #define UV_SUSPEND 0x0c
00073 #define UV_USBRESET 0x10
00074 #define UV_HIGHSPEED 0x14
00075 #define UV_EP0ACK 0x18
00076 #define UV_SPARE_1C 0x1c
00077 #define UV_EP0IN 0x20
00078 #define UV_EP0OUT 0x24
00079 #define UV_EP1IN 0x28
00080 #define UV_EP1OUT 0x2c
00081 #define UV_EP2 0x30
00082 #define UV_EP4 0x34
00083 #define UV_EP6 0x38
00084 #define UV_EP8 0x3c
00085 #define UV_IBN 0x40
00086 #define UV_SPARE_44 0x44
00087 #define UV_EP0PINGNAK 0x48
00088 #define UV_EP1PINGNAK 0x4c
00089 #define UV_EP2PINGNAK 0x50
00090 #define UV_EP4PINGNAK 0x54
00091 #define UV_EP6PINGNAK 0x58
00092 #define UV_EP8PINGNAK 0x5c
00093 #define UV_ERRLIMIT 0x60
00094 #define UV_SPARE_64 0x64
00095 #define UV_SPARE_68 0x68
00096 #define UV_SPARE_6C 0x6c
00097 #define UV_EP2ISOERR 0x70
00098 #define UV_EP4ISOERR 0x74
00099 #define UV_EP6ISOERR 0x78
00100 #define UV_EP8ISOERR 0x7c
00101
00102 #define UV_MIN UV_SUDAV
00103 #define UV_MAX UV_EP8ISOERR
00104
00105
00106
00107
00108
00109 #define FGV_EP2PF 0x80
00110 #define FGV_EP4PF 0x84
00111 #define FGV_EP6PF 0x88
00112 #define FGV_EP8PF 0x8c
00113 #define FGV_EP2EF 0x90
00114 #define FGV_EP4EF 0x94
00115 #define FGV_EP6EF 0x98
00116 #define FGV_EP8EF 0x9c
00117 #define FGV_EP2FF 0xa0
00118 #define FGV_EP4FF 0xa4
00119 #define FGV_EP6FF 0xa8
00120 #define FGV_EP8FF 0xac
00121 #define FGV_GPIFDONE 0xb0
00122 #define FGV_GPIFWF 0xb4
00123
00124 #define FGV_MIN FGV_EP2PF
00125 #define FGV_MAX FGV_GPIFWF
00126
00127
00128
00129
00130
00131
00132
00133
00134 void hook_sv (unsigned char vector_number, unsigned short addr);
00135
00136
00137
00138
00139
00140
00141
00142 void hook_uv (unsigned char vector_number, unsigned short addr);
00143
00144
00145
00146
00147
00148
00149
00150 void hook_fgv (unsigned char vector_number, unsigned short addr);
00151
00152
00153
00154
00155 void setup_autovectors (void);
00156
00157
00158
00159
00160
00161 #define clear_usb_irq() \
00162 EXIF &= ~bmEXIF_USBINT; \
00163 INT2CLR = 0
00164
00165
00166
00167
00168 #define clear_fifo_gpif_irq() \
00169 EXIF &= ~bmEXIF_IE4; \
00170 INT4CLR = 0
00171
00172 #endif