|
|
@@ -6,18 +6,11 @@ void setup() {
|
|
6
|
6
|
pinMode(BOARD_LED_PIN, OUTPUT);
|
|
7
|
7
|
}
|
|
8
|
8
|
|
|
9
|
|
-int toggle = 1;
|
|
10
|
|
-
|
|
11
|
9
|
void loop() {
|
|
12
|
|
- // You could just use toggleLED() instead, but this illustrates
|
|
13
|
|
- // the use of digitalWrite():
|
|
14
|
|
- digitalWrite(BOARD_LED_PIN, toggle);
|
|
15
|
|
- toggle ^= 1;
|
|
|
10
|
+ togglePin(BOARD_LED_PIN);
|
|
16
|
11
|
delay(100);
|
|
17
|
12
|
}
|
|
18
|
13
|
|
|
19
|
|
-// Force init to be called *first*, i.e. before static object allocation.
|
|
20
|
|
-// Otherwise, statically allocated objects that need libmaple may fail.
|
|
21
|
14
|
__attribute__((constructor)) void premain() {
|
|
22
|
15
|
init();
|
|
23
|
16
|
}
|