aboutsummaryrefslogtreecommitdiffstats
path: root/src/avr/serial.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-06-08 21:13:53 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-06-13 23:18:59 -0400
commitfa85094cbb139c734150802b02e22913abcfccb3 (patch)
tree980eccc8282acfb602a96523488f033bb368fcd4 /src/avr/serial.c
parent9dd101c26fff95e596039d6168d4ad25e080071c (diff)
downloadkutter-fa85094cbb139c734150802b02e22913abcfccb3.tar.gz
kutter-fa85094cbb139c734150802b02e22913abcfccb3.tar.xz
kutter-fa85094cbb139c734150802b02e22913abcfccb3.zip
irq: Allow boards to define the return type of irq_save()
The AVR wants a uint8_t return type for irq_save(), but other architectures will generally prefer int. Allow the board to configure the size of the flag by introducing an irqstatus_t typedef. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/avr/serial.c')
-rw-r--r--src/avr/serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/avr/serial.c b/src/avr/serial.c
index 33b42fc6..0a7a9508 100644
--- a/src/avr/serial.c
+++ b/src/avr/serial.c
@@ -89,7 +89,7 @@ console_pop_input(uint8_t len)
, needcopy - copied);
copied = needcopy;
}
- uint8_t flag = irq_save();
+ irqstatus_t flag = irq_save();
if (rpos != readb(&receive_pos)) {
// Raced with irq handler - retry
irq_restore(flag);