File tree Expand file tree Collapse file tree 2 files changed +8
-37
lines changed
hardware/zpuino/zpu/cores/zpuino Expand file tree Collapse file tree 2 files changed +8
-37
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,17 @@ __executable_start:
2020 poppc
2121
2222.balign 4 ,0
23- .globl _Z14_zpu_interruptj
23+ .globl _Z14_zpu_interruptv
2424
2525.type ___zpu_interrupt_vector,@function
2626.globl ___zpu_interrupt_vector
2727___zpu_interrupt_vector:
28- loadsp 4
29- im _Z14_zpu_interruptj
28+ im _memreg+0
29+ load
30+ im _Z14_zpu_interruptv
3031 call
31- storesp 0
32+ im _memreg+0
33+ store
3234 poppc
3335.size ___zpu_interrupt_vector, . - ___zpu_interrupt_vector
3436
@@ -46,12 +48,11 @@ _cpu_config:
4648 .weak _initIO
4749_initIO:
4850 poppc
49- /*
51+
5052 .globl _Z14_zpu_interruptv
5153 .weak _Z14_zpu_interruptv
5254_Z14_zpu_interruptv:
5355 poppc
54- */
5556 .weak _initIO
5657.section ".vectors"
5758
Original file line number Diff line number Diff line change 11#include " zpuino.h"
2- # include " zpuino-types.h "
2+
33#include " HardwareSerial.h"
44/* Most stuff is in zpuino-accel.S */
55
6- #define ZPUINO_MAX_INTERRUPTS 16
7-
8- typedef void (*interrupt_type_t )(void );
9-
10- static interrupt_type_t itable[ZPUINO_MAX_INTERRUPTS]={0 };
11-
12- void attachInterrupt (unsigned int line, void (*function)(void ), int mode)
13- {
14- if (line>=ZPUINO_MAX_INTERRUPTS)
15- return ;
16- // cli();
17- itable[line] = function;
18- // sei();
19- }
20- void detachInterrupt (unsigned int line)
21- {
22- // cli();
23- if (line>=ZPUINO_MAX_INTERRUPTS)
24- return ;
25- itable[line] = 0 ;
26- // sei();
27- }
28-
29- void _zpu_interrupt (unsigned int line)
30- {
31- if (line>=ZPUINO_MAX_INTERRUPTS)
32- return ;
33- if (itable[line])
34- itable[line]();
35- }
You can’t perform that action at this time.
0 commit comments