* Add progress callback to Updater class.
This is a backport of the same functionality in the ESP32 core.
* Add progress callback to Updater class.
* Add typedef for callback function.
* Fixed initializing order.
* Added missing include (functional).
This patch splits ARDUINO_LIBS into two variables. The second variable is called OPT_ARDUINO_LIBS and can be overridden by the caller as it uses the ?= assignment operator. Additionally it unifies and simplifies collecting the files in common/ by using the addprefix macro. All changes should be 100% backwards compatible.
Fixes#4643
This is especially important when compiling for host mode, because ArduinoOTA is pulled in unconditionally by the Makefile in tests/host. Thus it breaks the build as soon as NO_GLOBAL_INSTANCES or NO_GLOBAL_MDNS is defined.
Reduce String memory overhead from 24 bytes to 16 bytes by limiting the
maximum string length to <64Kbytes (which is larger than heap so no
effective problem).
Add Small String Optimization, SSO, which instead of allocating pointers
to small strings on the heap will store the string in place of the
pointer in the class. This should reduce memory fragmentation as
Save up to 12 chars (11 + \0) in String itself by using the terminating
\0 in the inline string as a flag to identify if this is a SSO or a heap
string.
Add a host test that verifies that no memory is allocated until a
full 11 characters are assigned to a string, as well as checking all
intermediate values.
No user code changes should be required to work with this optimization.
Per 'udp_set_multicast_netif_addr()' signature and comments in lwIP sources:
An IPv4 address designating a specific interface must be used.
When an IPv6 address is given, the matching IPv4 in the same interface must be selected.
fix e3bc3c226b (r32235572)
Adding the Arduino repo as a git submodule can be very useful for version control. However, `git submodule update` is not enough, as the tools need to be downloaded through `get.py`. Wrapping the main code in that script into its own function allows an external Python script to import the module and execute its functionality without relying on the unsafe `execfile` (or `Popen`). The main advantage would be easy flow control in case of error (eg: issue #4464).
Android refuses to show page with missing Content-Length header.
Prepare page data to String and send it with server.send
Moved respose strings to PROGMEM
* Wire Examples based on AVR ones of the same name
* Overload for begin(), change in callback arg from int to size_t
* Update master_reader.ino
Astyle
* Update master_writer.ino
Astyle
* Update slave_receiver.ino
Remove warning
* Update slave_receiver.ino
Astyle
* added new boards
* corrected block size error
* added board to last commit working well
* override of readString for File class
Stream::readString requires a timeout of 1 seconds + multiple memory resize
* correct indent
return if size 0 before reserve
* correct indent
* good indent
* stricter test for end of string
* same implementation than Stream by replacing timeRead by read
* reading file by block of 256
* make sure there is an end of string
* fixed bug for file size multiple of 256
string::concate(char*) needs a string terminator to work
* Allow unaligned input/output to SPI::transferBytes
Fixes#4967
Support any alignment of input and output pointers and transfer lengths
in SPI::transferBytes. Use 32-bit transfers and FIFO as much as
possible.
* Refactor misaligned transfer, avoid RMW to FIFO
The SPI FIFO can't properly do RMW (i.e. bytewise updates) because when
you read the FIFO you are actually reading the SPI read data, not what
was written into the write FIFO.
Refactor the transferBytes to take account of this. For aligned input
and outputs, perform as before (but handle non-x4 sizes properly). For
misaligned inputs, if it's unidirectional then do bytewise until the
direction data pointer is aligned and then do 32b accesses. Fod
bidirectional and misaligned inputs, copy the output data to an aligned
buffer, do the transfer, then copy the read back data from temp aligned
buffer to the real input buffer.
* Fix comments, clean condition checks, save stack
Add more comments and adjust naming to be more informative in
transferBytes_ and *aligned_. Save 64bytes of stack in double
misaligned case.
* Optimize misaligned transfers, reduce code size
On any misaligned input or output, always use a temp buffer. No need
for special casing and bytewise ::transfer(). This should be faster as
bytewise ::transfer involves a significant number of IO register
accesses and setup. Thanks to @devyte for the suggestion.
Because the constructors of the BSSL client and server add a reference
count to the stack_thunk, if there is no copy constructor defined then
the stack thunk reference count can get out of sync causing the stack
thunk memory to be freed while still in use. That could cause random
crashes or hangs.
Add a very basic copy constructor to the WiFiClientSecure and
WiFiServerSecure objects, using the default operator= to duplicate
simple types and shared_ptr classes.
The _cipher_list element (used only w/custom ciphers) could be freed
while still in use if copies of the WiFiClientSecure object were made.
Use a shared_ptr which will only free when the last reference is
deleted.
The axTLS compatibility mode calls allocate and store elements needed
for SSL connections (unlike normal BearSSL calls). These elements could
be freed mistakenly while still in use if copies of the WiFiClientSecure
were made by the app.
Convert to a separately managed shared_ptr to ensure they live as long
as any referencing objects before deletion.
Same done for the axTLS compatability for WiFiServerSecure.
Fixes#5701 WDTs and other issues with BearSSL::WiFiServerSecure
The BSSL server was creating the client it returns on a connection in a
way that caused the counter for the stack_thunk to get out of sync and
cause it to be freed improperly by having the destructor be called one
more time than the constructor. Looks like RVO.
Rewrite the ::available() function in order to avoid this issue with
help from @devyte.
* dynamic WiFi.hostname("newname")
* WiFi.hostname() back to String return type
* no silent hostname fix but proceed with debug message and returning false