Synopsis
int libarm_set_irq(int enable);
Description

enable — If non-zero IRQ interrupts will be enabled, otherwise they will be disabled.

libarm_set_irq returns — The IRQ enable state prior to enabling the IRQ interrupt.

This function enables or disables IRQ interrupts. It modifies the CPSR register's control field and therefore will only work when the CPU is executing in a privileged operating mode.

Example
// Disable IRQ interrupts if enabled
int en = libarm_set_irq(0); // Restore IRQ interrupts
libarm_set_irq(en);