This repository has been archived by the owner on Jan 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[examples] Add NUCLEO-F411RE blinky example.
- Loading branch information
Showing
4 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# path to the xpcc root directory | ||
xpccpath = '../../..' | ||
# execute the common SConstruct file | ||
execfile(xpccpath + '/scons/SConstruct') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#include <xpcc/architecture/platform.hpp> | ||
|
||
using namespace Board; | ||
|
||
int | ||
main() | ||
{ | ||
Board::initialize(); | ||
LedD13::setOutput(); | ||
|
||
// Use the logging streams to print some messages. | ||
// Change XPCC_LOG_LEVEL above to enable or disable these messages | ||
XPCC_LOG_DEBUG << "debug" << xpcc::endl; | ||
XPCC_LOG_INFO << "info" << xpcc::endl; | ||
XPCC_LOG_WARNING << "warning" << xpcc::endl; | ||
XPCC_LOG_ERROR << "error" << xpcc::endl; | ||
|
||
uint32_t counter(0); | ||
|
||
while (1) | ||
{ | ||
LedD13::toggle(); | ||
xpcc::delayMilliseconds(Button::read() ? 100 : 500); | ||
|
||
XPCC_LOG_INFO << "loop: " << counter++ << xpcc::endl; | ||
} | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[build] | ||
board = nucleo_f411re | ||
buildpath = ${xpccpath}/build/nucleo_f411re/${name} |