Commit a26969b3 authored by Marcel Stör's avatar Marcel Stör Committed by GitHub
Browse files

Add generic function to print deprecation notes (#1538)

parent f577c2c0
......@@ -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 );
}
......@@ -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 ) )\
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment