Skip to content

Commit

Permalink
Add interrupt handler routine for user button
Browse files Browse the repository at this point in the history
  • Loading branch information
masonticehurst committed Feb 14, 2024
1 parent 95a77c9 commit 7769149
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions eRINA_STM32F7/src/rina/board.adb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
with Debug;

package body Board is
protected body Button_Handler is
procedure Pressed is
begin
STM32.Board.All_LEDs_On;
Debug.Print(Debug.Info, "Button pressed!");
end Pressed;
end Button_Handler;
end Board;
9 changes: 9 additions & 0 deletions eRINA_STM32F7/src/rina/board.ads
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
with STM32;
with STM32.Board;

package Board is
protected type Button_Handler is
procedure Pressed;
pragma Attach_Handler (Pressed, STM32.Board.User_Button_Interrupt);
end Button_Handler;
end Board;

0 comments on commit 7769149

Please sign in to comment.