Add generic function to print deprecation notes (#1538)
This commit is contained in:
parent
f577c2c080
commit
a26969b388
|
@ -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 ) )\
|
||||
|
|
Loading…
Reference in New Issue