void LogError ( const char *fmt, ///< printf style format specifier ... ///< variable list of arguments ) { va_list args; #if defined( AVR ) Log_P( PSTR( "ERROR: " )); va_start( args, fmt ); vLog( fmt, args ); va_end( args ); #else va_start( args, fmt ); vLogFunc( LOG_LEVEL_ERROR, fmt, args ); va_end( args ); #endif } // LogError
void MENU_Dump( uint8_t indent, MENU_ProgItem_t *menuItem ) { uint8_t i; MENU_MemItem_t item; while ( MENU_GetItem( menuItem, &item )->name != NULL ) { for ( i = 0; i < indent; i++ ) { Log( " " ); } Log( "Name: " ); Log_P( item.name ); Log( ", type: %d\n", item.type ); if ( item.type == MENU_TYPE_MENU ) { MENU_Dump( indent + 1, item.val.menu ); } menuItem++; } } // MENU_Dump
void LogAssertFailed ( const char *expr, const char *fileName, unsigned lineNum, const char *function ) { #if defined( AVR ) Log_P( PSTR( "ASSERT failed: " )); Log_P( fileName ); Log_P( PSTR( ": %d: " ), lineNum ); Log_P( function ); Log_P( PSTR( " Assertion '" )); Log_P( expr ); Log_P( PStR( "' failed.\n" )); #else LogFunc( LOG_LEVEL_ASSERT, "%s: %d: %s Assertion '%s' failed.\n", fileName, lineNum, function, expr ); #endif } // LogAssertFailed