diff --git a/drivers/UARTSerial.cpp b/drivers/UARTSerial.cpp index 5026c9eb3b..085257dd81 100644 --- a/drivers/UARTSerial.cpp +++ b/drivers/UARTSerial.cpp @@ -135,7 +135,7 @@ void UARTSerial::sigio(Callback func) } /* Special synchronous write designed to work from critical section, such - * as in mbed_error_vfprintf. + * as in mbed_error_vprintf. */ ssize_t UARTSerial::write_unbuffered(const char *buf_ptr, size_t length) { diff --git a/platform/mbed_board.c b/platform/mbed_board.c index 03b7c4c59f..0db7f930ed 100644 --- a/platform/mbed_board.c +++ b/platform/mbed_board.c @@ -50,11 +50,11 @@ void mbed_error_printf(const char *format, ...) { va_list arg; va_start(arg, format); - mbed_error_vfprintf(format, arg); + mbed_error_vprintf(format, arg); va_end(arg); } -void mbed_error_vfprintf(const char *format, va_list arg) +void mbed_error_vprintf(const char *format, va_list arg) { #define ERROR_BUF_SIZE (128) core_util_critical_section_enter(); @@ -77,3 +77,8 @@ void mbed_error_vfprintf(const char *format, va_list arg) } core_util_critical_section_exit(); } + +void mbed_error_vfprintf(const char *format, va_list arg) +{ + mbed_error_vprintf(format, arg); +} diff --git a/platform/mbed_error.c b/platform/mbed_error.c index 20e0efba1c..d833189d98 100644 --- a/platform/mbed_error.c +++ b/platform/mbed_error.c @@ -89,7 +89,7 @@ WEAK void error(const char *format, ...) #ifndef NDEBUG va_list arg; va_start(arg, format); - mbed_error_vfprintf(format, arg); + mbed_error_vprintf(format, arg); va_end(arg); #endif exit(1); diff --git a/platform/mbed_error.h b/platform/mbed_error.h index 1286b119ed..14adf03735 100644 --- a/platform/mbed_error.h +++ b/platform/mbed_error.h @@ -42,7 +42,7 @@ extern "C" { #else //MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN #if MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN > 64 //We have to limit this to 64 bytes since we use mbed_error_printf for error reporting -//and mbed_error_vfprintf uses 128bytes internal buffer which may not be sufficient for anything +//and mbed_error_vprintf uses 128bytes internal buffer which may not be sufficient for anything //longer that 64 bytes with the current implementation. #error "Unsupported error filename buffer length detected, max supported length is 64 chars. Please change MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN or max-error-filename-len in configuration." #endif diff --git a/platform/mbed_interface.h b/platform/mbed_interface.h index 48594916e8..0bb009a3fa 100644 --- a/platform/mbed_interface.h +++ b/platform/mbed_interface.h @@ -26,6 +26,7 @@ #include +#include "mbed_toolchain.h" #include "device.h" /* Mbed interface mac address @@ -146,9 +147,15 @@ void mbed_error_printf(const char *format, ...); * @param arg Variable arguments list * */ +void mbed_error_vprintf(const char *format, va_list arg); + +/** @deprecated Renamed to mbed_error_vprintf to match functionality */ +MBED_DEPRECATED_SINCE("mbed-os-5.11", + "Renamed to mbed_error_vprintf to match functionality.") void mbed_error_vfprintf(const char *format, va_list arg); /** @}*/ + #ifdef __cplusplus } #endif