Index

auto-plow / 8fadd41

A wheelchair motor-propelled battery-powered ESP32-driven remote control snow plow.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
630 Nov 2018 18:364a63c8cInclude Arduino core filesJoshua1520N

Blob @ auto-plow / include / arduino / main.cpp

text/plain1372 bytesdownload raw
1/*
2 main.cpp - Main loop for Arduino sketches
3 Copyright (c) 2005-2013 Arduino Team. All right reserved.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
20#include <Arduino.h>
21
22// Declared weak in Arduino.h to allow user redefinitions.
23int atexit(void (* /*func*/ )()) { return 0; }
24
25// Weak empty variant initialization function.
26// May be redefined by variant files.
27void initVariant() __attribute__((weak));
28void initVariant() { }
29
30void setupUSB() __attribute__((weak));
31void setupUSB() { }
32
33int main(void)
34{
35 init();
36
37 initVariant();
38
39#if defined(USBCON)
40 USBDevice.attach();
41#endif
42
43 setup();
44
45 for (;;) {
46 loop();
47 if (serialEventRun) serialEventRun();
48 }
49
50 return 0;
51}
52
53