irq.h

IRQ driver interface.

unsigned irq_disable(void)

This function sets the IRQ disable bit in the status register.

Return values

  • Previous value of status register. The return value should not interpreted as a boolean value. The actual value is only significant for irq.h::irq_restore().
unsigned irq_enable(void)

This function clears the IRQ disable bit in the status register.

Return values

  • Previous value of status register. The return value should not interpreted as a boolean value. The actual value is only significant for irq.h::irq_restore().
void irq_restore(unsigned state)

This function restores the IRQ disable bit in the status register to the value contained within passed state.

Parameters

state:state to restore

int irq_is_in(void)

Check whether called from interrupt service routine.

Return values

  • true, if in interrupt service routine, false if not