Ada Interrupt Handlers

When using Ada interrupt handlers, I still highlighted some specific things that should be in the code for them to work.

Using Ada.Interrupts:

protected Int_Handler is --a protected object to handle interrupts
    procedure Handler_1; --A procedure which handles interrupts from your first device (with a body, of course)
    pragma Interrupt_Handler (Handler_1); --To tell the compiler this is an interrupt handler
    --Later in the program:
begin
    Attach_Handler (Int_Handler.Handler_1'access, Serial_1);

Assuming this is all correct, and I turned on interrupts in the registers, is there any other code related to the interrupt that I need to add? In particular, do I need to interact directly with the registers in order to somehow “link” my handler code, or can I just customize the representation of the entries in the register, display the necessary settings directly on them and enable rip?

Thank!

+3
source share
1 answer
+5

All Articles