1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Allow Print::println() to work with PROGMEM strings (#6450)

Adjust the ::write implementation in Print and its overridden copy in
UART to allow it to silentely accept PROGMEM strings (since there is no
write_P macro).

Fixes #6383
This commit is contained in:
Earle F. Philhower, III
2019-08-28 07:59:19 -07:00
committed by GitHub
parent 37bb628019
commit 7436f3802a
3 changed files with 3 additions and 3 deletions

View File

@ -495,7 +495,7 @@ uart_write(uart_t* uart, const char* buf, size_t size)
size_t ret = size;
const int uart_nr = uart->uart_nr;
while (size--)
uart_do_write_char(uart_nr, *buf++);
uart_do_write_char(uart_nr, pgm_read_byte(buf++));
return ret;
}