aboutsummaryrefslogtreecommitdiffstats
path: root/examples/blinky.cpp
blob: 751475efb126434e24966fc14a4826839e3938c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Blinks the built-in LED

#include <wirish/wirish.h>

void setup() {
    pinMode(BOARD_LED_PIN, OUTPUT);
}

void loop() {
    togglePin(BOARD_LED_PIN);
    delay(100);
}

__attribute__((constructor)) void premain() {
    init();
}

int main(void) {
    setup();

    while (true) {
        loop();
    }
    return 0;
}