forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement SD.h write methods exactly in File (esp8266#5861)
* Reimplement SD.h write methods exactly in File Replace the individual override with the existing SD.h File's implementation for all methods of File::write. Fixes esp8266#5846 * Add add'l tests * Fix Print and File incompatible writes w/casts Print and File have ambiguous resolutions for single-argument write(0)s. Fix by adding explicit methods. A write of any integer will not be a const char* write (i.e. won't write a string) but will instead just write the integer truncated to 8 bits (as makes sense). * Use 256byte chunks in ::write template Reduce stack requirements for templated writes to 256bytes, matching the size uses in WiFiClient/etc. (from 512bytes). Reduces the chance of stack overflow. * Move write(int) methods up to Print.h Remove some technical debt by moving the ::write(int/short/long) methods out of FS and HardwareSerial and up into Print.h.
- Loading branch information
1 parent
192aaa4
commit 02f54e8
Showing
4 changed files
with
58 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters