Ada 割り込みハンドラーを使用する場合、これまでのところ、それらが機能するためにコードに含める必要がある特定のものをいくつか分離しました。
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);
これがすべて正しく、レジスタで割り込みを有効にしていると仮定すると、これに追加する必要がある他の割り込み関連のコードはありますか? 特に、何らかの方法でハンドラー コードを「リンク」するために、レジスターと直接やり取りする必要がありますか?それとも、レジスターのレコード表現をセットアップし、必要な設定を直接それらに出力して、リッピングさせることができますか?
ありがとう!