Restore the pre-3.0.0 behaviour when we could assign numeric values to
the string object. After introducing operator =(char), everything was
converted to char instead of the expected 'stringification' of the
number (built-in int, long, unsigned int, unsigned long, long long,
unsigned long long, float and double)
Add toString() that handles conversions, re-use it through out the class
Fix#8430
Isolate NULL/panic test of _context to dev debug assert macro.
Use abort instead of panic for case of caller providing non-heap address pointer.
Added debug print.
Improved get_unpoisoned_check_neighbors to print file/line when available.
GitHub PR rebase-merge of #8464 introduced a new commit, instead of using
the one from the PR tree. Point to that new one in the `master` branch.
(fixing 24c41524dc56c683d8926671bdd639d7411f2815 changes)
Ignore mass-reformatting commits
Include the clang-format, and the previous astyle
Based on the idea from black
https://black.readthedocs.io/en/stable/guides/introducing_black_to_your_project.html#avoiding-ruining-git-blame
To be used with git CLI when exploring some specific file history
```
$ git blame --ignore-revs-file .git-blame-ignore-revs -- file.cpp
```
Or, by modifying the config to apply globally
```
$ git config blame.ignoreRevsFile .git-blame-ignore-revs
```
(note that the by default config will apply only for the current repository)
* Error even w/warnings disabled for no-return fcns
A function whose prototype says it will return a value but doesn't
is undefined behaviour in C++. GCC 10 will generate code that crashes
in this case.
In warnings==None mode, insterad of turning off all warnings with
`-w`, explicitly list all G++ possible warnings except for the
`no-return` warning which catches this programming error.
* Use different lists for GCC vs G++
G++ and GCC have different warning options, so use different lists.
* Make separate file for each level, add readme
The readme now includes the exact commands required to regenerate the
none-XXX files, no manual editing needed.
* Address review comments, only adjusts G++/None
per #8421 and #8475
after checking HW, suggest to check SW as well by at least by enabling some or all compiler warnings
(and also note of the IDE weirdest defaults causing issues we expected to stay solved)
* emulation on host: minor fixes
merge MockDigital.cpp and HostWiring.cpp
* emulation: share mockverbose between CI-on-host and emulation
* mock: add missing recently overridden method
* remove extern variable, use weak function
* Heap init code improvements and updates
Moved secondary heap init code to flash.
External -24 IRAM, +32 IROM
IRAM -76 IRAM, +64 IROM
General updates to umm_init call path and DEFINES to better align with
upstream. Name changes: UMM_INIT_HEAP with UMM_CHECK_INITIALIZED,
umm_init_stage_2 with _umm_init_heap, and umm_init_common with umm_init_heap.
Add file umm_cfgport.h to hold port-specific values. Stay focused
on heap initialization only move-related defines.
Improved comments.
Created a wrapper function for running pre-SDK code from flash.
Updated hwdt_app_entry to use it.
Update umm_init with option to run from ICACHE.
Added build define UMM_INIT_USE_ICACHE to move umm_init call path to flash.
When used frees up 160 bytes of IRAM at a cost of 208 bytes of IROM
Defaults to no change, umm_init call path will be in IRAM.
* Changed default to use IROM for umm_init() and option to revert back to UMM_INIT_USE_IRAM.
This avoids the null termination requirement of both String::substring and String::lastIndexOf by using APIs that don't require it. So we can stop writing to the buffer inside of const functions.
I also changed wbuffer to make it non const.
The existing ESP8266SdFat points to a working branch of the tree.
That branch is now merged to master, so move library to it.
There are no code changes,
* Fix VM Address mask
Adjust VM Address mask to allow up to 8M Byte parts.
Allow for free heap size values over 64K
ESP.getHeapStats(, uint32_t,)
uint32_t getMaxFreeBlockSize();
* Fix example
* Update MockEsp.cpp for uint32_t on EspClass::getMaxFreeBlockSize()
* Added comment about heap size limitation and static_assert to verify.
Updated boards.txt to show correct External memory size and Heap size.
PWMRANGE was defined up until v2.7.4:
```
$ cd ~/Library/Arduino15/packages/esp8266/hardware/esp8266
$ grep -R "PWMRANGE" 2.7.4
2.7.4/keywords.txt:PWMRANGE LITERAL1
2.7.4/tests/host/common/Arduino.h:#define PWMRANGE 1023
2.7.4/cores/esp8266/core_esp8266_wiring_pwm.cpp:static int32_t analogScale = PWMRANGE;
2.7.4/cores/esp8266/Arduino.h:#define PWMRANGE 1023
```
The define was removed in favour of the Arduino standard value of 255
but the keyword coloring was left behind:
```
$ cd ~/Library/Arduino15/packages/esp8266/hardware/esp8266
$ grep -R "PWMRANGE" 3.0.2
3.0.2/keywords.txt:PWMRANGE LITERAL1
```
In the Arduino IDE, the coloring makes it look like PWMRANGE still
exists, when it doesn't, which is confusing.
Signed-off-by: Phill Kelley <pmk.57t49@lgosys.com>
Upstream umm_malloc at git hash id 4dac43c3be7a7470dd669323021ba238081da18e
processed all project files with the style program uncrustify.
This PR updates our ported version of umm_malloc processed with "uncrustify".
This should make subsequent merges of upstream into this port easier.
This also makes the style more consistant through umm_malloc.
* WiFiServer - 'rename' available() to accept()
* use server.accept() instead of available()
* WiFiServer.accept() and ArduinoWiFiServer class doc update
* StreamConstPtr: prevent from passing a temporary String instance
* unconditionally allow progmem chars
* missing virtual destructor in Stream
(warning: deleting object of abstract class type 'Stream' which has non-virtual destructor will cause undefined behavior [-Wdelete-non-virtual-dtor])
Extracted fix from upstream for umm_blocks() - On allocations that were too
large, umm_blocks() could return an incorrectly truncated value when the result
is cast to uint16_t.
* Enable I2C_BUFFER_LENGTH definition for Wire lib
Based on
375a89ed58
We should have been very careful when #defining things to not use a name
that could conflict with the user's own code, so this marks that old
define as deprecated.
If you opt-into the new behavior, you do not get the old BUFFER_LENGTH
constant.
As a bonus, changing these uint8_ts to size_t both reduces the code
size & improves performance.
* Increase buffer indexing variable size
I looked over the users of these variables and they should be fine with
no additional changes. The existing methods already have an option to
use size_t rather than uint8_t.
There's a few methods which return int instead of size_t, which isn't
great from a portability perspective but will be fine since this only is
designed to run on the ESP8266.
* A clock phase correction in write_start(void)
Some devices require the data wire SDA to be held down at the moment while the clock wire is pulled down too to execute the start condition (e.g. devices using "TinyWires.h" library). This change follows a behaviour of Arduino Wire.h library, where the SCL signal is pulled down in half of period of start condition.
* Formatting of modification restyled
* Removing mathematical operations from delay
* Comments added