Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
with
114 additions
and 61 deletions.
- +1 −1 conf/conf_tc_irq.h
- +1 −1 conf/teletype/conf_board.h
- +1 −1 conf/trilogy/conf_board.h
- +4 −0 src/adc.c
- +6 −6 src/arp.c
- +5 −1 src/dac.c
- +12 −14 src/events.c
- +4 −0 src/init_ansible.c
- +2 −0 src/init_ansible.h
- +4 −0 src/init_teletype.c
- +2 −0 src/init_teletype.h
- +4 −0 src/init_trilogy.c
- +2 −0 src/init_trilogy.h
- +33 −0 src/interrupts.c
- +9 −0 src/interrupts.h
- +10 −0 src/screen.c
- +14 −33 src/timers.c
- +0 −4 src/timers.h
| @@ -0,0 +1,33 @@ | ||
| #include "interrupt.h" | ||
| #include "conf_tc_irq.h" | ||
| #include "interrupts.h" | ||
| #include "types.h" | ||
|
|
||
| u8 irqs_pause( void ) { | ||
| u8 irq_flags = 0; | ||
| if (cpu_irq_level_is_enabled(SYS_IRQ_PRIORITY)) { | ||
| irq_flags |= 1 << SYS_IRQ_PRIORITY; | ||
| cpu_irq_disable_level(SYS_IRQ_PRIORITY); | ||
| } | ||
| if (cpu_irq_level_is_enabled(UI_IRQ_PRIORITY)) { | ||
| irq_flags |= 1 << UI_IRQ_PRIORITY; | ||
| cpu_irq_disable_level(UI_IRQ_PRIORITY); | ||
| } | ||
| if (cpu_irq_level_is_enabled(APP_TC_IRQ_PRIORITY)) { | ||
| irq_flags |= 1 << APP_TC_IRQ_PRIORITY; | ||
| cpu_irq_disable_level(APP_TC_IRQ_PRIORITY); | ||
| } | ||
| return irq_flags; | ||
| } | ||
|
|
||
| void irqs_resume( u8 irq_flags ) { | ||
| if (irq_flags & (1 << APP_TC_IRQ_PRIORITY)) { | ||
| cpu_irq_enable_level(APP_TC_IRQ_PRIORITY); | ||
| } | ||
| if (irq_flags & (1 << UI_IRQ_PRIORITY)) { | ||
| cpu_irq_enable_level(UI_IRQ_PRIORITY); | ||
| } | ||
| if (irq_flags & (1 << SYS_IRQ_PRIORITY)) { | ||
| cpu_irq_enable_level(SYS_IRQ_PRIORITY); | ||
| } | ||
| } |
| @@ -0,0 +1,9 @@ | ||
| #ifndef _INTERRUPTS_H_ | ||
| #define _INTERRUPTS_H_ | ||
|
|
||
| #include "types.h" | ||
|
|
||
| u8 irqs_pause(void); | ||
| void irqs_resume(u8 irq_flags); | ||
|
|
||
| #endif |
Oops, something went wrong.