-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathrp_interrupts.ads
More file actions
31 lines (26 loc) · 871 Bytes
/
Copy pathrp_interrupts.ads
File metadata and controls
31 lines (26 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--
-- Copyright (C) 2022 Jeremy Grosser <jeremy@synack.me>
--
-- SPDX-License-Identifier: BSD-3-Clause
--
with Cortex_M.NVIC;
with System;
package RP_Interrupts
with Preelaborate
is
-- This is a minimal version of the System.BB.Interrupts interface
-- available in Ravenscar. Close enough that these packages can be used
-- interchangably for the purposes of the RP drivers.
subtype Interrupt_ID is Cortex_M.NVIC.Interrupt_ID;
subtype Interrupt_Priority is System.Interrupt_Priority;
type Interrupt_Handler is access procedure;
procedure Attach_Handler
(Handler : not null Interrupt_Handler;
Id : Interrupt_ID;
Prio : Interrupt_Priority)
with Inline;
procedure Interrupt_Request_Handler
with Export,
Convention => Asm,
External_Name => "__gnat_irq_trap";
end RP_Interrupts;