mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-26 23:11:19 +01:00
cpu/atmega_common: Fix return value of irq_enable
Citing the doc of irq_enable():
@return Previous value of status register. [...]
On atmega however the new value of the status register is returned, not the one
prior to enabling interrupts.
This commit is contained in:
parent
215d5cdc1c
commit
48fabca38d
@ -70,8 +70,9 @@ unsigned int irq_disable(void)
|
||||
*/
|
||||
unsigned int irq_enable(void)
|
||||
{
|
||||
uint8_t mask = __get_interrupt_state();
|
||||
sei();
|
||||
return __get_interrupt_state();
|
||||
return mask;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user