mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-01 03:47:23 +03:00
Now appending main() to the user's sketch in preparation for making the Arduino core a library (.a) file.
This commit is contained in:
12
targets/arduino/main.cxx
Executable file
12
targets/arduino/main.cxx
Executable file
@ -0,0 +1,12 @@
|
||||
int main(void)
|
||||
{
|
||||
init();
|
||||
|
||||
setup();
|
||||
|
||||
for (;;)
|
||||
loop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -549,7 +549,7 @@ void shiftOut(int dataPin, int clockPin, int bitOrder, byte val) {
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
void init()
|
||||
{
|
||||
// this needs to be called before setup() or some functions won't
|
||||
// work there
|
||||
@ -626,11 +626,4 @@ int main(void)
|
||||
#else
|
||||
UCSRB = 0;
|
||||
#endif
|
||||
|
||||
setup();
|
||||
|
||||
for (;;)
|
||||
loop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
@ -66,6 +66,8 @@ extern "C"{
|
||||
typedef uint8_t boolean;
|
||||
typedef uint8_t byte;
|
||||
|
||||
void init(void);
|
||||
|
||||
void pinMode(int, int);
|
||||
void digitalWrite(int, int);
|
||||
int digitalRead(int);
|
||||
@ -74,9 +76,9 @@ void analogWrite(int, int);
|
||||
|
||||
void beginSerial(long);
|
||||
void serialWrite(unsigned char);
|
||||
int serialAvailable();
|
||||
int serialRead();
|
||||
void serialFlush();
|
||||
int serialAvailable(void);
|
||||
int serialRead(void);
|
||||
void serialFlush(void);
|
||||
void printMode(int);
|
||||
void printByte(unsigned char c);
|
||||
void printNewline();
|
||||
|
Reference in New Issue
Block a user