1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Renamed WProgram.h to Arduino.h.

This commit is contained in:
David A. Mellis 2011-03-01 19:52:13 -05:00
parent 97abbd7a31
commit d05e4021d0
27 changed files with 24 additions and 30 deletions

View File

@ -46,7 +46,7 @@ public class PdePreprocessor {
public int prototypeCount = 0;
// stores number of included library headers written
// we always write one header: WProgram.h
// we always write one header: Arduino.h
public int headerCount = 1;
// the prototypes that are generated by the preprocessor
@ -199,7 +199,7 @@ public class PdePreprocessor {
int prototypeInsertionPoint = firstStatement(program);
out.print(program.substring(0, prototypeInsertionPoint));
out.print("#include \"WProgram.h\"\n");
out.print("#include \"Arduino.h\"\n");
// print user defined prototypes
for (int i = 0; i < prototypes.size(); i++) {

View File

@ -1,5 +1,5 @@
#ifndef WProgram_h
#define WProgram_h
#ifndef Arduino_h
#define Arduino_h
#include <stdlib.h>
#include <string.h>

View File

@ -18,7 +18,7 @@
*/
#include <stdlib.h>
#include "WProgram.h"
#include "Arduino.h"
#include "WString.h"

View File

@ -20,7 +20,7 @@
#ifndef String_h
#define String_h
//#include "WProgram.h"
//#include "Arduino.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>

View File

@ -1,4 +1,4 @@
#include <WProgram.h>
#include <Arduino.h>
int main(void)
{

View File

@ -26,7 +26,7 @@
#include "ArduinoTestSuite.h"
#include "WProgram.h"
#include "Arduino.h"
#include "HardwareSerial.h"
#include "pins_arduino.h"

View File

@ -7,8 +7,8 @@
#include <avr/io.h>
#endif
#ifndef WProgram_h
#include "WProgram.h"
#ifndef Arduino_h
#include "Arduino.h"
#endif
#ifndef HardwareSerial_h
#include "HardwareSerial.h"

View File

@ -7,7 +7,6 @@
//* Oct 16, 2010 <ROA> Test of Arduino Constants
//************************************************************************
#include "WProgram.h"
#include "HardwareSerial.h"
#include <ArduinoTestSuite.h>

View File

@ -1 +1 @@
//************************************************************************ //* Arduino Test Suite //* ATS_ToneTest //* //* Copyright (c) 2010 Mark Sproul All right reserved. //* //* This library is free software; you can redistribute it and/or //* modify it under the terms of the GNU Lesser General Public //* License as published by the Free Software Foundation; either //* version 2.1 of the License, or (at your option) any later version. //* //* This library is distributed in the hope that it will be useful, //* but WITHOUT ANY WARRANTY; without even the implied warranty of //* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //* Lesser General Public License for more details. //* //* You should have received a copy of the GNU Lesser General Public //* License along with this library; if not, write to the Free Software //* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA //************************************************************************ //* Aug 31, 2010 <MLS> Started on TestArduino //* Oct 28, 2010 <MLS> Started on Delay //************************************************************************ #include "WProgram.h" #include "HardwareSerial.h" #include <ArduinoTestSuite.h> //************************************************************************ void setup() { short ii; short testNum; int startMemoryUsage; unsigned long startMillis; unsigned long endMillis; unsigned long deltaMillis; unsigned long errMillis; boolean passed; char testNameString[80]; startMemoryUsage = ATS_GetFreeMemory(); ATS_begin("Arduino", "DelayTest"); testNum = 1; //* we start at 2 because 0/1 are RXD/TXD for (ii=0; ii<1000; ii+= 15) { startMillis = millis(); delay(ii); endMillis = millis(); deltaMillis = endMillis - startMillis; if (deltaMillis >= ii) { errMillis = deltaMillis - ii; } else { errMillis = ii - deltaMillis; } if (errMillis <= 1) { passed = true; } else { passed = false; } sprintf(testNameString, "DelayTest.%02d (delay= %4d actual delay=%ld err=%ld)", testNum, ii, deltaMillis, errMillis); ATS_PrintTestStatus(testNameString, passed); testNum++; } ATS_ReportMemoryUsage(startMemoryUsage); ATS_end(); } //************************************************************************ void loop() { }
//************************************************************************ //* Arduino Test Suite //* ATS_ToneTest //* //* Copyright (c) 2010 Mark Sproul All right reserved. //* //* This library is free software; you can redistribute it and/or //* modify it under the terms of the GNU Lesser General Public //* License as published by the Free Software Foundation; either //* version 2.1 of the License, or (at your option) any later version. //* //* This library is distributed in the hope that it will be useful, //* but WITHOUT ANY WARRANTY; without even the implied warranty of //* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //* Lesser General Public License for more details. //* //* You should have received a copy of the GNU Lesser General Public //* License along with this library; if not, write to the Free Software //* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA //************************************************************************ //* Aug 31, 2010 <MLS> Started on TestArduino //* Oct 28, 2010 <MLS> Started on Delay //************************************************************************ #include "HardwareSerial.h" #include <ArduinoTestSuite.h> //************************************************************************ void setup() { short ii; short testNum; int startMemoryUsage; unsigned long startMillis; unsigned long endMillis; unsigned long deltaMillis; unsigned long errMillis; boolean passed; char testNameString[80]; startMemoryUsage = ATS_GetFreeMemory(); ATS_begin("Arduino", "DelayTest"); testNum = 1; //* we start at 2 because 0/1 are RXD/TXD for (ii=0; ii<1000; ii+= 15) { startMillis = millis(); delay(ii); endMillis = millis(); deltaMillis = endMillis - startMillis; if (deltaMillis >= ii) { errMillis = deltaMillis - ii; } else { errMillis = ii - deltaMillis; } if (errMillis <= 1) { passed = true; } else { passed = false; } sprintf(testNameString, "DelayTest.%02d (delay= %4d actual delay=%ld err=%ld)", testNum, ii, deltaMillis, errMillis); ATS_PrintTestStatus(testNameString, passed); testNum++; } ATS_ReportMemoryUsage(startMemoryUsage); ATS_end(); } //************************************************************************ void loop() { }

View File

@ -8,7 +8,6 @@
//* Oct 18, 2010 <MLS> Added memory testing
//************************************************************************
#include "WProgram.h"
#include "HardwareSerial.h"
#include "pins_arduino.h"
#include <ArduinoTestSuite.h>

View File

@ -7,7 +7,6 @@
//* Oct 16, 2010 <ROA> Started on String Test
//************************************************************************
#include "WProgram.h"
#include "HardwareSerial.h"
#include <ArduinoTestSuite.h>

View File

@ -7,7 +7,6 @@
//* Oct 16, 2010 <ROA> Started on String Test
//************************************************************************
#include "WProgram.h"
#include "HardwareSerial.h"
#include <ArduinoTestSuite.h>

View File

@ -7,7 +7,6 @@
//* Oct 16, 2010 <ROA> Started on String Test
//************************************************************************
#include "WProgram.h"
#include "HardwareSerial.h"
#include <ArduinoTestSuite.h>

View File

@ -26,7 +26,6 @@
#include "WProgram.h"
#include "HardwareSerial.h"
#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328P__)

View File

@ -5,7 +5,7 @@ extern "C" {
#include "string.h"
}
#include "WProgram.h"
#include "Arduino.h"
#include "Ethernet.h"
#include "Client.h"

View File

@ -1,6 +1,6 @@
#ifndef client_h
#define client_h
#include "WProgram.h"
#include "Arduino.h"
#include "Print.h"
class Client : public Stream {

View File

@ -3,7 +3,7 @@
#ifndef Firmata_Boards_h
#define Firmata_Boards_h
#include <WProgram.h> // for digitalRead, digitalWrite, etc
#include <Arduino.h> // for digitalRead, digitalWrite, etc
// Normally Servo.h must be included before Firmata.h (which then includes
// this file). If Servo.h wasn't included, this allows the code to still

View File

@ -14,7 +14,7 @@
//* Includes
//******************************************************************************
#include "WProgram.h"
#include "Arduino.h"
#include "HardwareSerial.h"
#include "Firmata.h"

View File

@ -13,7 +13,7 @@
#ifndef Firmata_h
#define Firmata_h
#include <WProgram.h>
#include <Arduino.h>
#include <inttypes.h>

View File

@ -3,7 +3,7 @@
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
#include "WProgram.h"
#include "Arduino.h"
// When the display powers up, it is configured as follows:
//

View File

@ -15,7 +15,7 @@
#ifndef __SD_H__
#define __SD_H__
#include <WProgram.h>
#include <Arduino.h>
#include <utility/SdFat.h>
#include <utility/SdFatUtil.h>

View File

@ -17,7 +17,7 @@
* along with the Arduino Sd2Card Library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include <WProgram.h>
#include <Arduino.h>
#include "Sd2Card.h"
//------------------------------------------------------------------------------
#ifndef SOFTWARE_SPI

View File

@ -23,7 +23,7 @@
* \file
* Useful utility functions.
*/
#include <WProgram.h>
#include <Arduino.h>
#include <avr/pgmspace.h>
/** Store and print a string in flash memory.*/
#define PgmPrint(x) SerialPrint_P(PSTR(x))

View File

@ -19,7 +19,7 @@
*/
#include <SdFat.h>
#include <avr/pgmspace.h>
#include <WProgram.h>
#include <Arduino.h>
//------------------------------------------------------------------------------
// callback function for date/time
void (*SdFile::dateTime_)(uint16_t* date, uint16_t* time) = NULL;

View File

@ -12,7 +12,7 @@
#define _SPI_H_INCLUDED
#include <stdio.h>
#include <WProgram.h>
#include <Arduino.h>
#include <avr/pgmspace.h>
#define SPI_CLOCK_DIV4 0x00

View File

@ -43,7 +43,7 @@
*/
#include <avr/interrupt.h>
#include <WProgram.h>
#include <Arduino.h>
#include "Servo.h"

View File

@ -45,7 +45,7 @@ http://www.arduino.cc/en/Tutorial/Stepper
*/
#include "WProgram.h"
#include "Arduino.h"
#include "Stepper.h"
/*