Main Page
Classes
Files
File List
File Members
arduino_firmware
arduino_daq
ArduinoCore
src
core
ArduinoCore/src/core/main.cpp
Go to the documentation of this file.
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.
23
int
atexit
(
void
(*
/*func*/
)()) {
return
0; }
24
25
// Weak empty variant initialization function.
26
// May be redefined by variant files.
27
void
initVariant
()
__attribute__
((weak));
28
void
initVariant
() { }
29
30
void
setupUSB
() __attribute__((weak));
31
void
setupUSB
() { }
32
33
int
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
Arduino.h
setupUSB
void setupUSB() __attribute__((weak))
Definition:
ArduinoCore/src/core/main.cpp:31
initVariant
void initVariant() __attribute__((weak))
Definition:
ArduinoCore/src/core/main.cpp:28
atexit
int atexit(void(*)())
Definition:
ArduinoCore/src/core/main.cpp:23
setup
void setup()
Definition:
arduino_daq/main.cpp:48
__attribute__
rp::arch::net::raw_serial __attribute__
init
void init(void)
Definition:
wiring.c:241
serialEventRun
void serialEventRun(void) __attribute__((weak))
loop
void loop()
Definition:
arduino_daq/main.cpp:53
main
int main(void)
Definition:
ArduinoCore/src/core/main.cpp:33
arduino_daq
Author(s):
autogenerated on Mon Jun 10 2019 12:46:03