aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.cpp
blob: 9c988ecdf32a3f7afebf94c9c54d7aa6e16da112 (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
26
27
28
29
30
31
32
33
34
35
36
37
#include "wiring.h"
#include "HardwareSerial.h"
#include "wiring_math.h"
#include "HardwareUsb.h"
#include "usb.h"

int ledPin = 13;
HardwareUsb Usb;

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

int toggle = 1;
void loop() {
    digitalWrite(ledPin, toggle);
    toggle ^= 1;
    delay(1000);
}

int main(void) {
    init();
    setup();

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

/* Required for C++ hackery */
/* TODO: This really shouldn't go here... move it later
 * */
extern "C" void __cxa_pure_virtual(void) {
    while(1)
        ;
}