/** * Disable interrupts, return old state. * * @return * state of interrupts before they were disabled */ irqmask disable( void ) { irqmask im_pre = vic_get_irqmask(); vic_disable_interrupts(); return im_pre; }
void vic_set_irqmask( irqmask im ) { if( irqmask_interrupts_enabled( im ) ) vic_enable_interrupts(); else vic_disable_interrupts(); im &= 0xffff; lpc_vic->int_enable = im; lpc_vic->int_en_clear = ~im; }