File tree Expand file tree Collapse file tree 2 files changed +60
-0
lines changed
examples/nucleo_l552ze-q/freertos_blink Expand file tree Collapse file tree 2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2020, Mike Wolfram
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
+
12
+ #include < modm/board.hpp>
13
+ #include < modm/processing/rtos.hpp>
14
+
15
+ using namespace Board ;
16
+
17
+ class BlinkTask : modm::rtos::Thread
18
+ {
19
+ public:
20
+ BlinkTask ()
21
+ : Thread(4 , 2048 , " blink" )
22
+ {}
23
+
24
+ void
25
+ run ()
26
+ {
27
+ Leds::setOutput ();
28
+ while (true )
29
+ {
30
+ vTaskDelay (500 * (configTICK_RATE_HZ / 1000.0 ));
31
+ Leds::toggle ();
32
+ }
33
+ }
34
+ };
35
+
36
+ BlinkTask blinkTask;
37
+
38
+ int
39
+ main ()
40
+ {
41
+ Board::initialize ();
42
+
43
+ MODM_LOG_INFO << " \n\n Reboot: FreeRTOS blink example" << modm::endl;
44
+
45
+ modm::rtos::Scheduler::schedule ();
46
+
47
+ // we should never get here
48
+ return 0 ;
49
+ }
Original file line number Diff line number Diff line change
1
+ <library >
2
+ <extends >modm:nucleo-l552ze-q</extends >
3
+ <options >
4
+ <option name =" modm:build:build.path" >../../../build/nucleo_l552ze-q/freertos_blink</option >
5
+ </options >
6
+ <modules >
7
+ <module >modm:build:scons</module >
8
+ <module >modm:freertos</module >
9
+ <module >modm:processing:rtos</module >
10
+ </modules >
11
+ </library >
You can’t perform that action at this time.
0 commit comments