Skip to content

Commit 20ed1cb

Browse files
Merge branch 'master' into webserver-template
2 parents 3a8e1d4 + c5efb92 commit 20ed1cb

File tree

12 files changed

+117
-36
lines changed

12 files changed

+117
-36
lines changed

cores/esp8266/FunctionalInterrupt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ typedef void (*voidFuncPtrArg)(void*);
1111
extern "C" void ICACHE_RAM_ATTR __attachInterruptArg(uint8_t pin, voidFuncPtr userFunc, void*fp , int mode);
1212

1313

14-
void interruptFunctional(void* arg)
14+
void ICACHE_RAM_ATTR interruptFunctional(void* arg)
1515
{
1616
ArgStructure* localArg = (ArgStructure*)arg;
1717
if (localArg->functionInfo->reqScheduledFunction)

cores/esp8266/PolledTimeout.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ class timeoutTemplate
142142
{
143143
public:
144144
using timeType = typename TimePolicyT::timeType;
145+
static_assert(std::is_unsigned<timeType>::value == true, "timeType must be unsigned");
145146

146147
static constexpr timeType alwaysExpired = 0;
147148
static constexpr timeType neverExpires = std::numeric_limits<timeType>::max();

cores/esp8266/WString.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,17 +829,24 @@ void String::trim(void) {
829829
// /*********************************************/
830830

831831
long String::toInt(void) const {
832-
if(buffer())
832+
if (buffer())
833833
return atol(buffer());
834834
return 0;
835835
}
836836

837837
float String::toFloat(void) const {
838-
if(buffer())
838+
if (buffer())
839839
return atof(buffer());
840840
return 0;
841841
}
842842

843+
double String::toDouble(void) const
844+
{
845+
if (buffer())
846+
return atof(buffer());
847+
return 0.0;
848+
}
849+
843850
// global empty string to allow returning const String& with nothing
844851

845852
const String emptyString;

cores/esp8266/WString.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ class String {
241241
// parsing/conversion
242242
long toInt(void) const;
243243
float toFloat(void) const;
244+
double toDouble(void) const;
244245

245246
protected:
246247
// Contains the string info when we're not in SSO mode

cores/esp8266/core_esp8266_wiring_digital.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,16 @@ void ICACHE_RAM_ATTR interrupt_handler(void *arg) {
171171
extern void cleanupFunctional(void* arg);
172172

173173
extern void ICACHE_RAM_ATTR __attachInterruptArg(uint8_t pin, voidFuncPtr userFunc, void *arg, int mode) {
174+
175+
// #5780
176+
// https://github.com/esp8266/esp8266-wiki/wiki/Memory-Map
177+
if ((uint32_t)userFunc >= 0x40200000)
178+
{
179+
// ISR not in IRAM
180+
::printf((PGM_P)F("ISR not in IRAM!\r\n"));
181+
abort();
182+
}
183+
174184
if(pin < 16) {
175185
ETS_GPIO_INTR_DISABLE();
176186
interrupt_handler_t *handler = &interrupt_handlers[pin];

doc/esp8266wifi/station-class.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ Function returns value of the ``String`` type.
535535
BSSID
536536
^^^^^
537537

538-
Return the mac address the access point where ESP module is connected to. This address is formally called `Basic Service Set Identification (BSSID) <http://www.juniper.net/techpubs/en_US/network-director1.1/topics/concept/wireless-ssid-bssid-essid.html#jd0e47>`__.
538+
Return the mac address of the access point to which the ESP module was directed to connect to. This address is formally called `Basic Service Set Identification (BSSID) <http://www.juniper.net/techpubs/en_US/network-director1.1/topics/concept/wireless-ssid-bssid-essid.html#jd0e47>`__. The returned pointer is what the user configured when calling begin() with a bssid argument. It does _not_ necessarily reflect the mac address of the access point to which the ESP module's station interface is currently connected to.
539539

540540
.. code:: cpp
541541

doc/installing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Instructions - Windows 10
105105
106106
.. code:: bash
107107
108-
cd %USERPROFILE%\Documents\hardware\esp8266com\esp8266
108+
cd %USERPROFILE%\Documents\Arduino\hardware\esp8266com\esp8266
109109
git submodule update --init
110110
111111
If error messages about missing files related to ``SoftwareSerial`` are encountered during the build process, it should be because this step was missed and is required.
@@ -125,7 +125,7 @@ Instructions - Windows 10
125125
126126
.. code:: bash
127127
128-
cd %USERPROFILE%\Documents\hardware\esp8266com\esp8266
128+
cd %USERPROFILE%\Documents\Arduino\hardware\esp8266com\esp8266
129129
git status
130130
git pull
131131

tests/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ If you want to add emulation of a certain feature, add it into tests/host/common
1919

2020
### Running test cases
2121

22+
**NOTE!** The test-on-host environment is dependent on some submodules. Make sure to run `git submodule update --init` before running any test.
23+
2224
To run test cases, go to tests/host/ directory and run `make`. This will compile and run the tests.
2325

2426
If all tests pass, you will see "All tests passed" message and the exit code will be 0.

tests/host/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ FLAGS += -DLWIP_IPV6=0
145145
FLAGS += -DHOST_MOCK=1
146146
FLAGS += -DNONOSDK221=1
147147
FLAGS += $(MKFLAGS)
148-
CXXFLAGS += -std=c++11 $(FLAGS)
148+
CXXFLAGS += -std=c++11 -fno-rtti $(FLAGS)
149149
CFLAGS += -std=c99 $(FLAGS)
150150
LDFLAGS += -coverage $(OPTZ) -g $(M32)
151151
VALGRINDFLAGS += --leak-check=full --track-origins=yes --error-limit=no --show-leak-kinds=all --error-exitcode=999

0 commit comments

Comments
 (0)