-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add interrupt handler routine for user button
- Loading branch information
1 parent
95a77c9
commit 7769149
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |