1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00
M Hightower f3ca09006d Update UART selection for Boot ROM ets_putc, when debug port is selected. (#6489)
* Add code to select the UART for Boot ROM ets_putc which is used by
::printf, ets_printf_P in core_esp_postmortem.cpp and others.

ets_putc is a wrapper for uart_tx_one_char. uart_tx_one_char uses
the element buff_uart_no in UartDev (A structure in data area of the
Boot ROM) to select UART0 or UART1. uart_buff_switch is used to set
that entry.

The structure for UartDev can be found in uart.h from the
ESP8266_NONOS_SDK. As best I can tell the Boot ROM always
defaults to UART0.

* Fixes debug UART selection for ets_putc

This addresses an issue of UART selection for ROM function ets_putc,
which is used by ::printf, ets_printf_P in core_esp_postmortem.cpp
and others. Currently ets_putc stays on UART0 after
Serial1.setDebugOutput(true) is called.

ets_putc() is not affected by calls to ets_install_putc1.
Its UART selection is controlled by the ROM function uart_buff_switch.

Updated uart_set_debug() to call uart_buff_switch whenever debug is
enabled on an UART. For the case of disabling, a call to select UART0
is made, because there is no disable option for this print method.

* Removed fp_putc_t typedef, save for a later PR
2019-09-23 14:05:27 -07:00
..
2019-08-19 18:42:44 -04:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-03-14 11:19:21 +01:00
2019-07-26 22:57:27 -07:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2019-05-14 00:09:54 +02:00
2014-12-01 00:34:28 +03:00
2019-05-14 00:09:54 +02:00