File tree Expand file tree Collapse file tree 5 files changed +67
-0
lines changed
Expand file tree Collapse file tree 5 files changed +67
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ Blink
3+ Turns an LED on for one second, then off for one second, repeatedly.
4+ Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
5+ it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
6+ the correct LED pin independent of which board is used.
7+ If you want to know what pin the on-board LED is connected to on your Arduino
8+ model, check the Technical Specs of your board at:
9+ https://www.arduino.cc/en/Main/Products
10+ modified 8 May 2014
11+ by Scott Fitzgerald
12+ modified 2 Sep 2016
13+ by Arturo Guadalupi
14+ modified 8 Sep 2016
15+ by Colby Newman
16+ This example code is in the public domain.
17+ https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
18+ */
19+
20+ #include < MCUboot.h>
21+
22+ // the setup function runs once when you press reset or power the board
23+ void setup () {
24+ // initialize digital pin LED_BUILTIN as an output.
25+ pinMode (LED_BUILTIN, OUTPUT);
26+ // set confirmed flag to avoid MCUBoot reverts to previous application at next reset
27+ MCUboot::confirmSketch ();
28+ }
29+
30+ // the loop function runs over and over again forever
31+ void loop () {
32+ digitalWrite (LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
33+ delay (1000 ); // wait for a second
34+ digitalWrite (LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
35+ delay (1000 ); // wait for a second
36+ }
Original file line number Diff line number Diff line change 1+ name =MCUboot
2+ version =0.0.1
3+ author =Arduino
4+ maintainer =Arduino <info@arduino.cc>
5+ sentence =Wrapper library for MCUboot
6+ paragraph =
7+ category =Other
8+ url =
9+ architectures =mbed,mbed_portenta
10+ precompiled =true
11+ ldflags =-lbootutil
Original file line number Diff line number Diff line change 1+ #include " MCUboot.h"
2+
3+ extern " C" int boot_set_confirmed (void );
4+
5+ void MCUboot::confirmSketch ()
6+ {
7+ boot_set_confirmed ();
8+ }
Original file line number Diff line number Diff line change 1+ #ifndef MCUboot_h_
2+ #define MCUboot_h_
3+
4+ class MCUboot
5+ {
6+
7+ public:
8+ static void confirmSketch (void );
9+
10+ };
11+
12+ #endif // MCUboot_h_
You can’t perform that action at this time.
0 commit comments