21 lines
382 B
C++
21 lines
382 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
namespace intc {
|
|
|
|
using Isr = void (*)(void);
|
|
|
|
/// Returns: true if the IRQ was previously enabled
|
|
bool SetIrqEnabled(uint8_t irqn, bool enabled);
|
|
|
|
void SetIsr(uint8_t irqn, Isr isr);
|
|
|
|
// Call this once to enable all HW interrupts
|
|
void EnableInterrupts();
|
|
|
|
// Feed this to the CPU's interrupt handler
|
|
void InterruptHandler();
|
|
|
|
} // namespace intc
|