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 May 6, 2019
1 parent 80354c7 commit a2cf191
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,17 @@ jobs:
command: |
(cd examples && ../tools/scripts/examples_compile.py avr arduino_uno)
sam-examples:
docker:
- image: modm/modm-build:latest
steps:
- checkout
- run: (git submodule sync && git submodule update --init --jobs 8) & pip3 install -U lbuild & wait
- run:
name: Examples SAMD21 Series
command: |
(cd examples && ../tools/scripts/examples_compile.py feather_m0)
avr-compile-all:
docker:
- image: modm/modm-build:latest
Expand Down Expand Up @@ -303,6 +314,7 @@ workflows:
- unittests-linux-generic
- avr-examples
- stm32-examples
- sam-examples

- avr-compile-all:
requires:
Expand Down
33 changes: 33 additions & 0 deletions examples/feather_m0/blink/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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;

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

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

#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 a2cf191

Please sign in to comment.