File tree Expand file tree Collapse file tree 5 files changed +127
-0
lines changed Expand file tree Collapse file tree 5 files changed +127
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021, Tomasz Wasilczyk
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+ int
15+ main ()
16+ {
17+ using namespace Board ;
18+
19+ initialize ();
20+
21+ while (true )
22+ {
23+ LedDebug::toggle ();
24+ modm::delay (1s);
25+ }
26+ }
Original file line number Diff line number Diff line change 1+ <library >
2+ <extends >modm:srxe</extends >
3+ <options >
4+ <option name =" modm:build:build.path" >../../../build/srxe/blink</option >
5+ </options >
6+ <modules >
7+ <module >modm:build:scons</module >
8+ </modules >
9+ </library >
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2021, Tomasz Wasilczyk
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+ #pragma once
13+
14+ #include < modm/platform.hpp>
15+
16+ // / @ingroup modm_board_srxe
17+ namespace Board {
18+
19+ using namespace modm ::literals;
20+
21+ using SystemClock = modm::platform::SystemClock;
22+
23+ using LedDebug = modm::platform::GpioB0;
24+ using Leds = modm::platform::SoftwareGpioPort<LedDebug>;
25+
26+ namespace Display {
27+
28+ using DC = modm::platform::GpioD6;
29+ using CS = modm::platform::GpioE7;
30+ using RST = modm::platform::GpioG2;
31+
32+ } // namespace Display
33+
34+ inline void
35+ initialize () {
36+ SystemClock::enable ();
37+
38+ LedDebug::setOutput ();
39+
40+ modm::platform::enableInterrupts ();
41+ }
42+
43+ } // namespace Board
Original file line number Diff line number Diff line change 1+ <library >
2+ <repositories >
3+ <repository >
4+ <path >../../../../repo.lb</path >
5+ </repository >
6+ </repositories >
7+
8+ <options >
9+ <option name =" modm:target" >atmega128rfa1-zu</option >
10+ <option name =" modm:platform:core:f_cpu" >16000000</option >
11+ </options >
12+ <modules >
13+ <module >modm:board:srxe</module >
14+ </modules >
15+ </library >
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ # -*- coding: utf-8 -*-
3+ #
4+ # Copyright (c) 2021, Tomasz Wasilczyk
5+ #
6+ # This file is part of the modm project.
7+ #
8+ # This Source Code Form is subject to the terms of the Mozilla Public
9+ # License, v. 2.0. If a copy of the MPL was not distributed with this
10+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
11+ # -----------------------------------------------------------------------------
12+
13+ def init (module ):
14+ module .name = ":board:srxe"
15+ module .description = "Smart Response XE"
16+
17+ def prepare (module , options ):
18+ if not options [":target" ].partname .startswith ("atmega128rfa1" ):
19+ return False
20+
21+ module .depends (
22+ ":architecture:clock" ,
23+ ":architecture:interrupt" ,
24+ ":debug" ,
25+ ":platform:clock" ,
26+ ":platform:core" ,
27+ ":platform:gpio" ,
28+ ":platform:uart:0" )
29+ return True
30+
31+ def build (env ):
32+ env .outbasepath = "modm/src/modm/board"
33+ env .copy ('.' )
34+ env .collect (":build:default.avrdude.programmer" , "usbasp" );
You can’t perform that action at this time.
0 commit comments