mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
Add typedef for putc1, fn_putc1_t. (#6550)
* Add typedef for putc1, fn_putc1_t. Replaced relevant usage of `(void *)` with `fn_putc1_t`. Correct usage of `ets_putc()`, returning 0, in libc_replacement.cpp This PR assumes PR https://github.com/esp8266/Arduino/pull/6489#issue-315018841 has merged and removes `uart_buff_switch` from `umm_performance.cpp` Updated method of defining `_rom_putc1` to be more acceptable (I hope) to the new compiler. * Use PROVIDE to expose ROM function entry point, ets_uart_putc1. Added comments to ets_putc() and ets_uart_putc1() to explain their differences. Change prototype of ets_putc() to conform with fp_putc_t. Updated _isr_safe_printf_P to use new definition, ets_uart_putc1.
This commit is contained in:
committed by
Earle F. Philhower, III
parent
ff1e8e92d1
commit
831d6431bc
@ -899,8 +899,8 @@ void
|
||||
uart_set_debug(int uart_nr)
|
||||
{
|
||||
s_uart_debug_nr = uart_nr;
|
||||
void (*func)(char) = NULL;
|
||||
switch(s_uart_debug_nr)
|
||||
fp_putc_t func = NULL;
|
||||
switch(s_uart_debug_nr)
|
||||
{
|
||||
case UART0:
|
||||
func = &uart0_write_char;
|
||||
@ -929,7 +929,7 @@ uart_set_debug(int uart_nr)
|
||||
} else {
|
||||
system_set_os_print(0);
|
||||
}
|
||||
ets_install_putc1((void *) func);
|
||||
ets_install_putc1(func);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user