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 dba88d1 commit 73586d1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 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
7 changes: 2 additions & 5 deletions examples/stm32f3_discovery/rotation/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class ReaderThread : public modm::pt::Protothread
{
public:
bool
update()
run()
{
PT_BEGIN();

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

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

return 0;
}
1 change: 1 addition & 0 deletions examples/stm32f3_discovery/rotation/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/rotation</option>
<option name="modm:processing:protothread:use_fiber">yes</option>
</options>
<modules>
<module>modm:math:filter</module>
Expand Down

0 comments on commit 73586d1

Please sign in to comment.