Skip to content

Commit

Permalink
[examples] Enable all protothread as fibers
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Apr 16, 2023
1 parent e914b66 commit 6ca9dfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/stm32f3_discovery/accelerometer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ReaderThread : public modm::pt::Protothread
{
public:
bool
update()
run()
{
PT_BEGIN();

Expand Down Expand Up @@ -83,10 +83,7 @@ main()
Board::initialize();
Board::initializeLsm3();

while (true)
{
reader.update();
}
modm::fiber::Scheduler::run();

return 0;
}
1 change: 1 addition & 0 deletions examples/stm32f3_discovery/accelerometer/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<extends>modm:disco-f303vc</extends>
<options>
<option name="modm:build:build.path">../../../build/stm32f3_discovery/accelerometer</option>
<option name="modm:processing:protothread:use_fiber">yes</option>
</options>
<modules>
<module>modm:math:filter</module>
Expand Down

0 comments on commit 6ca9dfb

Please sign in to comment.