Skip to content

Commit

Permalink
[exti] Add several EXTI examples
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Sep 17, 2021
1 parent cceeec0 commit 7e39919
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions examples/stm32f469_discovery/blink/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ main()
uint32_t ms_counter{0};
uint32_t us_counter{0};

Exti::connect<Board::Button>(Exti::Trigger::FallingEdge, [count = uint32_t(0)]() mutable
{
count++;
MODM_LOG_INFO << "Button called " << count << " times." << modm::endl;
});

while (true)
{
{
Expand Down
2 changes: 1 addition & 1 deletion examples/stm32f469_discovery/blink/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<option name="modm:build:build.path">../../../build/stm32f469_discovery/blink</option>
</options>
<modules>
<module>modm:platform:gpio</module>
<module>modm:platform:exti</module>
<module>modm:processing:timer</module>
<module>modm:build:scons</module>
</modules>
Expand Down

0 comments on commit 7e39919

Please sign in to comment.