File tree Expand file tree Collapse file tree 3 files changed +56
-1
lines changed
examples/nucleo_g070rb/blink Expand file tree Collapse file tree 3 files changed +56
-1
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ jobs:
153153 - name : Examples STM32G0 Series
154154 if : always()
155155 run : |
156- (cd examples && ../tools/scripts/examples_compile.py nucleo_g071rb)
156+ (cd examples && ../tools/scripts/examples_compile.py nucleo_g070rb nucleo_g071rb)
157157 - name : Examples STM32L0 Series
158158 if : always()
159159 run : |
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2019, Niklas Hauser
3+ *
4+ * This file is part of the modm project.
5+ *
6+ * This Source Code Form is subject to the terms of the Mozilla Public
7+ * License, v. 2.0. If a copy of the MPL was not distributed with this
8+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9+ */
10+
11+ #include < modm/board.hpp>
12+ #include < modm/processing/timer.hpp>
13+
14+ using namespace Board ;
15+
16+ // ----------------------------------------------------------------------------
17+ int
18+ main ()
19+ {
20+ Board::initialize ();
21+ LedD13::setOutput (modm::Gpio::Low);
22+
23+ // Use the logging streams to print some messages.
24+ // Change MODM_LOG_LEVEL above to enable or disable these messages
25+ MODM_LOG_DEBUG << " debug" << modm::endl;
26+ MODM_LOG_INFO << " info" << modm::endl;
27+ MODM_LOG_WARNING << " warning" << modm::endl;
28+ MODM_LOG_ERROR << " error" << modm::endl;
29+
30+ uint32_t counter{0 };
31+ modm::PeriodicTimer timer{500ms};
32+
33+ while (true )
34+ {
35+ if (timer.execute ())
36+ {
37+ LedD13::toggle ();
38+
39+ MODM_LOG_INFO << " loop: " << counter++ << modm::endl;
40+ }
41+ }
42+
43+ return 0 ;
44+ }
Original file line number Diff line number Diff line change 1+ <library >
2+ <extends >modm:nucleo-g070rb</extends >
3+ <options >
4+ <option name =" modm:build:build.path" >../../../build/nucleo_g070rb/blink</option >
5+ </options >
6+ <modules >
7+ <module >modm:platform:gpio</module >
8+ <module >modm:processing:timer</module >
9+ <module >modm:build:scons</module >
10+ </modules >
11+ </library >
You can’t perform that action at this time.
0 commit comments