mbed library sources. Supersedes mbed-src.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: platform/mbed_interface.h
- Revision:
- 189:f392fc9709a3
- Parent:
- 187:0387e8f68319
--- a/platform/mbed_interface.h Thu Nov 08 11:46:34 2018 +0000 +++ b/platform/mbed_interface.h Wed Feb 20 22:31:08 2019 +0000 @@ -8,6 +8,7 @@ /* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited + * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +27,7 @@ #include <stdarg.h> +#include "mbed_toolchain.h" #include "device.h" /* Mbed interface mac address @@ -120,12 +122,15 @@ /** Cause the mbed to flash the BLOD (Blue LEDs Of Death) sequence */ -void mbed_die(void); +MBED_NORETURN void mbed_die(void); /** Print out an error message. This is typically called when * handling a crash. * * @note Synchronization level: Interrupt safe + * @note This uses an internal 128-byte buffer to format the string, + * so the output may be truncated. If you need to write a potentially + * long string, use mbed_error_puts. * * @param format C string that contains data stream to be printed. * Code snippets below show valid format. @@ -135,7 +140,7 @@ * @endcode * */ -void mbed_error_printf(const char *format, ...); +void mbed_error_printf(const char *format, ...) MBED_PRINTF(1, 2); /** Print out an error message. Similar to mbed_error_printf * but uses a va_list. @@ -146,9 +151,29 @@ * @param arg Variable arguments list * */ -void mbed_error_vfprintf(const char *format, va_list arg); +void mbed_error_vprintf(const char *format, va_list arg) MBED_PRINTF(1, 0); + +/** Print out an error message. This is typically called when + * handling a crash. + * + * Unlike mbed_error_printf, there is no limit to the maximum output + * length. Unlike standard puts, but like standard fputs, this does not + * append a '\n' character. + * + * @note Synchronization level: Interrupt safe + * + * @param str C string that contains data stream to be printed. + * + */ +void mbed_error_puts(const char *str); + +/** @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) MBED_PRINTF(1, 0); /** @}*/ + #ifdef __cplusplus } #endif