Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: espressif/arduino-esp32
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: wanming2008/arduino-esp32
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 17 commits
  • 36 files changed
  • 2 contributors

Commits on Oct 19, 2016

  1. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    a01d01b View commit details
  2. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    24eb28e View commit details
  3. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    fb01625 View commit details
  4. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    5684d79 View commit details
  5. Unverified

    This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
    Copy the full SHA
    27315db View commit details

Commits on Nov 12, 2016

  1. Merge remote-tracking branch 'upstream/master'

    Conflicts:
    	libraries/WiFi/src/WiFiScan.cpp
    ladyada committed Nov 12, 2016
    Copy the full SHA
    9c53d73 View commit details
  2. SD library

    ladyada committed Nov 12, 2016
    Copy the full SHA
    15bace7 View commit details
  3. shiftin/shiftout

    ladyada committed Nov 12, 2016
    Copy the full SHA
    5decd2c View commit details
  4. 'fixed' shiftin/shiftout but getting compiler complaints about two ra…

    …ndom() prototypes so commented one out
    ladyada committed Nov 12, 2016
    Copy the full SHA
    871f28e View commit details

Commits on Nov 13, 2016

  1. Copy the full SHA
    1bf6318 View commit details
  2. Copy the full SHA
    3b56ee9 View commit details
  3. Copy the full SHA
    7de8975 View commit details
  4. simpler fix

    ladyada committed Nov 13, 2016
    Copy the full SHA
    ce54087 View commit details

Commits on Nov 22, 2016

  1. Copy the full SHA
    f5e6cad View commit details
  2. make variant SPI pins work

    ladyada committed Nov 22, 2016
    Copy the full SHA
    d602169 View commit details
  3. Merge remote-tracking branch 'upstream/master'

    Conflicts:
    	boards.txt
    	cores/esp32/Arduino.h
    	cores/esp32/wiring_private.h
    	cores/esp32/wiring_shift.c
    ladyada committed Nov 22, 2016
    Copy the full SHA
    a07e1ae View commit details

Commits on Feb 3, 2017

  1. Merge remote-tracking branch 'upstream/master'

    Conflicts:
    	tools/esptool.py
    ladyada committed Feb 3, 2017
    Copy the full SHA
    11ff1ef View commit details
Showing with 6,026 additions and 33 deletions.
  1. +40 −0 boards.txt
  2. +9 −0 cores/esp32/Arduino.h
  3. +0 −4 cores/esp32/Print.cpp
  4. +2 −2 cores/esp32/Print.h
  5. +0 −10 cores/esp32/WString.cpp
  6. +12 −10 cores/esp32/WString.h
  7. +0 −4 cores/esp32/pgmspace.h
  8. +3 −0 cores/esp32/wiring_private.h
  9. +1 −1 cores/esp32/wiring_shift.c
  10. +24 −0 libraries/SD/README.adoc
  11. +112 −0 libraries/SD/examples/CardInfo/CardInfo.ino
  12. +86 −0 libraries/SD/examples/Datalogger/Datalogger.ino
  13. +67 −0 libraries/SD/examples/DumpFile/DumpFile.ino
  14. +80 −0 libraries/SD/examples/Files/Files.ino
  15. +81 −0 libraries/SD/examples/ReadWrite/ReadWrite.ino
  16. +82 −0 libraries/SD/examples/listfiles/listfiles.ino
  17. +30 −0 libraries/SD/keywords.txt
  18. +9 −0 libraries/SD/library.properties
  19. +146 −0 libraries/SD/src/File.cpp
  20. +13 −0 libraries/SD/src/README.txt
  21. +614 −0 libraries/SD/src/SD.cpp
  22. +137 −0 libraries/SD/src/SD.h
  23. +418 −0 libraries/SD/src/utility/FatStructs.h
  24. +765 −0 libraries/SD/src/utility/Sd2Card.cpp
  25. +259 −0 libraries/SD/src/utility/Sd2Card.h
  26. +385 −0 libraries/SD/src/utility/Sd2PinMap.h
  27. +551 −0 libraries/SD/src/utility/SdFat.h
  28. +75 −0 libraries/SD/src/utility/SdFatUtil.h
  29. +202 −0 libraries/SD/src/utility/SdFatmainpage.h
  30. +1,264 −0 libraries/SD/src/utility/SdFile.cpp
  31. +232 −0 libraries/SD/src/utility/SdInfo.h
  32. +295 −0 libraries/SD/src/utility/SdVolume.cpp
  33. +2 −1 libraries/SPI/src/SPI.h
  34. +1 −0 libraries/Wire/src/Wire.cpp
  35. +9 −1 tools/esptool.py
  36. +20 −0 variants/feather_esp32/pins_arduino.h
40 changes: 40 additions & 0 deletions boards.txt
Original file line number Diff line number Diff line change
@@ -201,6 +201,46 @@ espea32.menu.UploadSpeed.460800.upload.speed=460800
espea32.menu.UploadSpeed.512000.windows=512000
espea32.menu.UploadSpeed.512000.upload.speed=512000

##############################################################
featheresp32.name=Feather ESP32

featheresp32.upload.tool=esptool
featheresp32.upload.maximum_size=1044464
featheresp32.upload.maximum_data_size=294912
featheresp32.upload.wait_for_upload_port=true

featheresp32.serial.disableDTR=true
featheresp32.serial.disableRTS=true

featheresp32.build.mcu=esp32
featheresp32.build.core=esp32
featheresp32.build.variant=feather_esp32
featheresp32.build.board=FeatherESP32

featheresp32.build.f_cpu=160000000L
featheresp32.build.flash_mode=dio
featheresp32.build.flash_size=4MB

featheresp32.menu.FlashFreq.80=80MHz
featheresp32.menu.FlashFreq.80.build.flash_freq=80m
featheresp32.menu.FlashFreq.40=40MHz
featheresp32.menu.FlashFreq.40.build.flash_freq=40m

featheresp32.menu.UploadSpeed.921600=921600
featheresp32.menu.UploadSpeed.921600.upload.speed=921600
featheresp32.menu.UploadSpeed.115200=115200
featheresp32.menu.UploadSpeed.115200.upload.speed=115200
featheresp32.menu.UploadSpeed.256000.windows=256000
featheresp32.menu.UploadSpeed.256000.upload.speed=256000
featheresp32.menu.UploadSpeed.230400.windows.upload.speed=256000
featheresp32.menu.UploadSpeed.230400=230400
featheresp32.menu.UploadSpeed.230400.upload.speed=230400
featheresp32.menu.UploadSpeed.460800.linux=460800
featheresp32.menu.UploadSpeed.460800.macosx=460800
featheresp32.menu.UploadSpeed.460800.upload.speed=460800
featheresp32.menu.UploadSpeed.512000.windows=512000
featheresp32.menu.UploadSpeed.512000.upload.speed=512000

##############################################################
quantum.name=Noduino Quantum

9 changes: 9 additions & 0 deletions cores/esp32/Arduino.h
Original file line number Diff line number Diff line change
@@ -32,6 +32,8 @@ extern "C" {
#include <stdlib.h>
#include <string.h>
#include <inttypes.h>
#include <math.h>
#include "stdlib_noniso.h"

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@@ -142,6 +144,13 @@ void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val);
#ifdef __cplusplus
}


#ifndef _GLIBCXX_VECTOR
// arduino is not compatible with std::vector
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#endif

#include "WCharacter.h"
#include "WString.h"
#include "Stream.h"
4 changes: 0 additions & 4 deletions cores/esp32/Print.cpp
Original file line number Diff line number Diff line change
@@ -68,7 +68,6 @@ size_t Print::printf(const char *format, ...)
}
return len;
}
/*
size_t Print::print(const __FlashStringHelper *ifsh) {
PGM_P p = reinterpret_cast<PGM_P>(ifsh);

@@ -80,7 +79,6 @@ size_t Print::print(const __FlashStringHelper *ifsh) {
}
return n;
}
*/
size_t Print::print(const String &s)
{
return write(s.c_str(), s.length());
@@ -140,14 +138,12 @@ size_t Print::print(double n, int digits)
{
return printFloat(n, digits);
}
/*
size_t Print::println(const __FlashStringHelper *ifsh)
{
size_t n = print(ifsh);
n += println();
return n;
}
*/
size_t Print::print(const Printable& x)
{
return x.printTo(*this);
4 changes: 2 additions & 2 deletions cores/esp32/Print.h
Original file line number Diff line number Diff line change
@@ -72,7 +72,7 @@ class Print
}

size_t printf(const char * format, ...) __attribute__ ((format (printf, 2, 3)));
//size_t print(const __FlashStringHelper *);
size_t print(const __FlashStringHelper *);
size_t print(const String &);
size_t print(const char[]);
size_t print(char);
@@ -85,7 +85,7 @@ class Print
size_t print(const Printable&);
size_t print(struct tm * timeinfo, const char * format = NULL);

//size_t println(const __FlashStringHelper *);
size_t println(const __FlashStringHelper *);
size_t println(const String &s);
size_t println(const char[]);
size_t println(char);
10 changes: 0 additions & 10 deletions cores/esp32/WString.cpp
Original file line number Diff line number Diff line change
@@ -44,12 +44,10 @@ String::String(const String &value)
init();
*this = value;
}
/*
String::String(const __FlashStringHelper *pstr) {
init();
*this = pstr; // see operator =
}
*/
#ifdef __GXX_EXPERIMENTAL_CXX0X__
String::String(String &&rval)
{
@@ -200,7 +198,6 @@ String & String::copy(const char *cstr, unsigned int length)
strcpy(buffer, cstr);
return *this;
}
/*
String & String::copy(const __FlashStringHelper *pstr, unsigned int length) {
if (!reserve(length)) {
invalidate();
@@ -210,7 +207,6 @@ String & String::copy(const __FlashStringHelper *pstr, unsigned int length) {
strcpy_P(buffer, (PGM_P)pstr);
return *this;
}
*/
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void String::move(String &rhs)
{
@@ -276,15 +272,13 @@ String & String::operator =(const char *cstr)

return *this;
}
/*
String & String::operator = (const __FlashStringHelper *pstr)
{
if (pstr) copy(pstr, strlen_P((PGM_P)pstr));
else invalidate();

return *this;
}
*/
// /*********************************************/
// /* concat */
// /*********************************************/
@@ -375,7 +369,6 @@ unsigned char String::concat(double num)
char* string = dtostrf(num, 4, 2, buf);
return concat(string, strlen(string));
}
/*
unsigned char String::concat(const __FlashStringHelper * str) {
if (!str) return 0;
int length = strlen_P((PGM_P)str);
@@ -386,7 +379,6 @@ unsigned char String::concat(const __FlashStringHelper * str) {
len = newlen;
return 1;
}
*/
/*********************************************/
/* Concatenate */
/*********************************************/
@@ -480,14 +472,12 @@ StringSumHelper & operator +(const StringSumHelper &lhs, double num)
}
return a;
}
/*
StringSumHelper & operator + (const StringSumHelper &lhs, const __FlashStringHelper *rhs)
{
StringSumHelper &a = const_cast<StringSumHelper&>(lhs);
if (!a.concat(rhs)) a.invalidate();
return a;
}
*/
// /*********************************************/
// /* Comparison */
// /*********************************************/
22 changes: 12 additions & 10 deletions cores/esp32/WString.h
Original file line number Diff line number Diff line change
@@ -34,7 +34,9 @@ class StringSumHelper;

// an abstract class used as a means to proide a unique pointer type
// but really has no body
//class __FlashStringHelper;
class __FlashStringHelper;
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper *>(pstr_pointer))
#define F(string_literal) (FPSTR(PSTR(string_literal)))

// The string class
class String
@@ -55,7 +57,7 @@ class String
// be false).
String(const char *cstr = "");
String(const String &str);
//String(const __FlashStringHelper *str);
String(const __FlashStringHelper *str);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
String(String &&rval);
String(StringSumHelper &&rval);
@@ -89,7 +91,7 @@ class String
// marked as invalid ("if (s)" will be false).
String & operator =(const String &rhs);
String & operator =(const char *cstr);
//String & operator = (const __FlashStringHelper *str);
String & operator = (const __FlashStringHelper *str);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
String & operator =(String &&rval);
String & operator =(StringSumHelper &&rval);
@@ -110,7 +112,7 @@ class String
unsigned char concat(unsigned long num);
unsigned char concat(float num);
unsigned char concat(double num);
//unsigned char concat(const __FlashStringHelper * str);
unsigned char concat(const __FlashStringHelper * str);

// if there's not enough memory for the concatenated value, the string
// will be left unchanged (but this isn't signalled in any way)
@@ -164,10 +166,10 @@ class String
concat(num);
return (*this);
}
//String & operator += (const __FlashStringHelper *str){
// concat(str);
// return (*this);
//}
String & operator += (const __FlashStringHelper *str){
concat(str);
return (*this);
}

friend StringSumHelper & operator +(const StringSumHelper &lhs, const String &rhs);
friend StringSumHelper & operator +(const StringSumHelper &lhs, const char *cstr);
@@ -179,7 +181,7 @@ class String
friend StringSumHelper & operator +(const StringSumHelper &lhs, unsigned long num);
friend StringSumHelper & operator +(const StringSumHelper &lhs, float num);
friend StringSumHelper & operator +(const StringSumHelper &lhs, double num);
//friend StringSumHelper & operator +(const StringSumHelper &lhs, const __FlashStringHelper *rhs);
friend StringSumHelper & operator +(const StringSumHelper &lhs, const __FlashStringHelper *rhs);

// comparison (only works w/ Strings and "strings")
operator StringIfHelperType() const
@@ -270,7 +272,7 @@ class String

// copy and move
String & copy(const char *cstr, unsigned int length);
//String & copy(const __FlashStringHelper *pstr, unsigned int length);
String & copy(const __FlashStringHelper *pstr, unsigned int length);
#ifdef __GXX_EXPERIMENTAL_CXX0X__
void move(String &rhs);
#endif
4 changes: 0 additions & 4 deletions cores/esp32/pgmspace.h
Original file line number Diff line number Diff line change
@@ -29,16 +29,12 @@ typedef unsigned short prog_uint16_t;
typedef long prog_int32_t;
typedef unsigned long prog_uint32_t;

typedef char __FlashStringHelper;

#define SIZE_IRRELEVANT 0x7fffffff

#define PROGMEM
#define PGM_P const char *
#define PGM_VOID_P const void *
#define FPSTR(p) ((const char *)(p))
#define PSTR(s) (s)
#define F(s) (s)
#define _SFR_BYTE(n) (n)

#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
3 changes: 3 additions & 0 deletions cores/esp32/wiring_private.h
Original file line number Diff line number Diff line change
@@ -27,11 +27,14 @@

#include <stdio.h>
#include <stdarg.h>
#include <inttypes.h>
#include "esp32-hal.h"

#include "Arduino.h"

#ifdef __cplusplus
extern "C" {

#endif

typedef void (*voidFuncPtr)(void);
2 changes: 1 addition & 1 deletion cores/esp32/wiring_shift.c
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
Boston, MA 02111-1307 USA
$Id: wiring.c 248 2007-02-03 15:36:30Z mellis $
*/

#include "esp32-hal.h"
#include "wiring_private.h"

24 changes: 24 additions & 0 deletions libraries/SD/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
= SD Library for Arduino =

The SD library allows for reading from and writing to SD cards.

For more information about this library please visit us at
http://www.arduino.cc/en/Reference/SD

== License ==

Copyright (C) 2009 by William Greiman
Copyright (c) 2010 SparkFun Electronics

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Loading