From fa85094cbb139c734150802b02e22913abcfccb3 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 8 Jun 2016 21:13:53 -0400 Subject: 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 --- src/avr/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/avr/serial.c') 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); -- cgit v1.2.3-70-g09d2