void hcs12_gpioirqdisable(int irq) { uint16_t regaddr; uint8_t pin; if (hcs12_mapirq(irq, ®addr, &pin) == OK) { irqstate_t flags = enter_critical_section(); uint8_t regval = getreg8(regaddr); regval &= ~(1 << pin); putreg8(regval, regaddr); leave_critical_section(flags); } }
void hcs12_gpioirqdisable(int irq) { uint16_t regaddr; uint8_t pin; if (hcs12_mapirq(irq, ®addr, &pin) == OK) { irqstate_t flags = irqsave(); uint8_t regval = getreg8(regaddr); regval &= ~(1 << pin); putreg8(regval, regaddr); irqrestore(flags); } }