mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-17 22:23:10 +03:00
Optimized Print::print(String&) (part 2)
This commit is contained in:
@ -11,6 +11,7 @@ ARDUINO 1.5.6 BETA
|
|||||||
[core]
|
[core]
|
||||||
* sam: Fixed wrap-around bug in delay() (Mark Tillotson)
|
* sam: Fixed wrap-around bug in delay() (Mark Tillotson)
|
||||||
* sam: Fixed regression in analogRead() (fails to read multiple channels) (Mark Tillotson)
|
* sam: Fixed regression in analogRead() (fails to read multiple channels) (Mark Tillotson)
|
||||||
|
* Optimized Print::print(String&) method, now uses internal string buffer to perform block write
|
||||||
|
|
||||||
ARDUINO 1.5.5 BETA 2013.11.28
|
ARDUINO 1.5.5 BETA 2013.11.28
|
||||||
|
|
||||||
|
@ -46,11 +46,7 @@ size_t Print::print(const __FlashStringHelper *ifsh)
|
|||||||
|
|
||||||
size_t Print::print(const String &s)
|
size_t Print::print(const String &s)
|
||||||
{
|
{
|
||||||
size_t n = 0;
|
return write(reinterpret_cast<const uint8_t*>(s.c_str()), s.length());
|
||||||
for (uint16_t i = 0; i < s.length(); i++) {
|
|
||||||
n += write(s[i]);
|
|
||||||
}
|
|
||||||
return n;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t Print::print(const char str[])
|
size_t Print::print(const char str[])
|
||||||
|
Reference in New Issue
Block a user