aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/midi/bytequeue
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol/midi/bytequeue')
-rwxr-xr-xtmk_core/protocol/midi/bytequeue/interrupt_setting.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/tmk_core/protocol/midi/bytequeue/interrupt_setting.c b/tmk_core/protocol/midi/bytequeue/interrupt_setting.c
index eafef527c..0ab8b5462 100755
--- a/tmk_core/protocol/midi/bytequeue/interrupt_setting.c
+++ b/tmk_core/protocol/midi/bytequeue/interrupt_setting.c
@@ -1,5 +1,5 @@
1//Copyright 20010 Alex Norman 1//Copyright 20010 Alex Norman
2//writen by Alex Norman 2//writen by Alex Norman
3// 3//
4//This file is part of avr-bytequeue. 4//This file is part of avr-bytequeue.
5// 5//
@@ -22,6 +22,7 @@
22//implementations of the typedef and these functions 22//implementations of the typedef and these functions
23 23
24#include "interrupt_setting.h" 24#include "interrupt_setting.h"
25#if defined(__AVR__)
25#include <avr/interrupt.h> 26#include <avr/interrupt.h>
26 27
27interrupt_setting_t store_and_clear_interrupt(void) { 28interrupt_setting_t store_and_clear_interrupt(void) {
@@ -33,4 +34,16 @@ interrupt_setting_t store_and_clear_interrupt(void) {
33void restore_interrupt_setting(interrupt_setting_t setting) { 34void restore_interrupt_setting(interrupt_setting_t setting) {
34 SREG = setting; 35 SREG = setting;
35} 36}
37#elif defined(__arm__)
38#include "ch.h"
39
40interrupt_setting_t store_and_clear_interrupt(void) {
41 chSysLock();
42 return 0;
43}
44
45void restore_interrupt_setting(interrupt_setting_t setting) {
46 chSysUnlock();
47}
48#endif
36 49