Skip to content

Commit

Permalink
[examples] Add Feather-M0 example
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Apr 26, 2020
1 parent 6886b91 commit 50c6e68
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ jobs:
name: Generic Examples
command: |
(cd examples && ../tools/scripts/examples_compile.py generic)
- run:
name: Examples SAMD21 Series
command: |
(cd examples && ../tools/scripts/examples_compile.py feather_m0)
- run:
name: Execute Python Scripts
command: |
Expand Down
34 changes: 34 additions & 0 deletions examples/feather_m0/blink/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2019, Ethan Slattery
*
* This file is part of the modm project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

#include <modm/board.hpp>

using namespace Board;
using namespace std::chrono_literals;

int
main()
{
Board::initialize();
// LedD13::setOutput();

while (1)
{
// LedD13::toggle();
modm::delay(500ms);

#ifdef MODM_BOARD_HAS_LOGGER
static uint32_t counter(0);
MODM_LOG_INFO << "Loop counter: " << (counter++) << modm::endl;
#endif
}

return 0;
}
9 changes: 9 additions & 0 deletions examples/feather_m0/blink/project.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<library>
<extends>modm:feather-m0</extends>
<options>
<option name="modm:build:build.path">../../../build/feather_m0/blink</option>
</options>
<modules>
<module>modm:build:scons</module>
</modules>
</library>

0 comments on commit 50c6e68

Please sign in to comment.