From a26969b38857d6699bfa3103190e5a51df43c588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20St=C3=B6r?= Date: Wed, 1 Mar 2017 12:42:20 +0100 Subject: [PATCH] Add generic function to print deprecation notes (#1538) --- app/platform/platform.c | 5 +++++ app/platform/platform.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/app/platform/platform.c b/app/platform/platform.c index 74605654..8327e8b7 100755 --- a/app/platform/platform.c +++ b/app/platform/platform.c @@ -916,3 +916,8 @@ uint32_t platform_flash_mapped2phys (uint32_t mapped_addr) uint32_t meg = (b1 << 1) | b0; return mapped_addr - INTERNAL_FLASH_MAPPED_ADDRESS + meg * 0x100000; } + +void* platform_print_deprecation_note( const char *msg, const char *time_frame) +{ + c_printf( "Warning, deprecated API! %s. It will be removed %s. See documentation for details.\n", msg, time_frame ); +} diff --git a/app/platform/platform.h b/app/platform/platform.h index 8861f99a..a1ab812b 100644 --- a/app/platform/platform.h +++ b/app/platform/platform.h @@ -302,6 +302,9 @@ int platform_gpio_exists( unsigned id ); int platform_tmr_exists( unsigned id ); // ***************************************************************************** + +void* platform_print_deprecation_note( const char *msg, const char *time_frame); + // Helper macros #define MOD_CHECK_ID( mod, id )\ if( !platform_ ## mod ## _exists( id ) )\