Skip to content

Commit 80ed738

Browse files
chris-durandsalkinium
authored andcommitted
[example] Add NUCLEO-H723ZG blink example
1 parent c84e72e commit 80ed738

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
- name: Examples STM32H7 Series
128128
if: always()
129129
run: |
130-
(cd examples && ../tools/scripts/examples_compile.py nucleo_h743zi)
130+
(cd examples && ../tools/scripts/examples_compile.py nucleo_h743zi nucleo_h723zg)
131131
132132
stm32f4-examples-1:
133133
runs-on: ubuntu-20.04

examples/nucleo_h723zg/blink/main.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2016-2017, 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+
12+
#include <modm/board.hpp>
13+
14+
using namespace Board;
15+
16+
int
17+
main()
18+
{
19+
Board::initialize();
20+
Leds::setOutput();
21+
22+
// Use the logging streams to print some messages.
23+
// Change MODM_LOG_LEVEL above to enable or disable these messages
24+
MODM_LOG_DEBUG << "debug" << modm::endl;
25+
MODM_LOG_INFO << "info" << modm::endl;
26+
MODM_LOG_WARNING << "warning" << modm::endl;
27+
MODM_LOG_ERROR << "error" << modm::endl;
28+
29+
uint32_t counter(0);
30+
31+
while (true)
32+
{
33+
Leds::write(1 << (counter % (Leds::width+1) ));
34+
modm::delay(Button::read() ? 100ms : 500ms);
35+
36+
MODM_LOG_INFO << "loop: " << counter++ << modm::endl;
37+
}
38+
39+
return 0;
40+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<library>
2+
<extends>modm:nucleo-h723zg</extends>
3+
<options>
4+
<option name="modm:build:build.path">../../../build/nucleo_h723zg/blink</option>
5+
</options>
6+
<modules>
7+
<module>modm:build:scons</module>
8+
</modules>
9+
</library>

0 commit comments

Comments
 (0)