[include][dbg]update: no longer use RT_DEBUG_LOG in rtdebug.h (#7750)

This commit is contained in:
Shicheng Chu
2023-06-29 23:24:25 +08:00
committed by GitHub
parent 148ae53cf8
commit e2c031643c
33 changed files with 524 additions and 477 deletions

View File

@@ -81,7 +81,7 @@ struct rt_init_tag
{
const char *level;
init_fn_t fn;
#if RT_DEBUG_INIT
#ifdef RT_DEBUG_INIT
const char *fn_name;
#endif
};
@@ -114,7 +114,7 @@ static int rt_init_objects_sort(void)
{
table->level = ((struct rt_init_desc *)ptr_begin)->level;
table->fn = ((struct rt_init_desc *)ptr_begin)->fn;
#if RT_DEBUG_INIT
#ifdef RT_DEBUG_INIT
table->fn_name = ((struct rt_init_desc *)ptr_begin)->fn_name;
#endif
ptr_begin += sizeof(struct rt_init_desc) / sizeof(unsigned int);
@@ -168,7 +168,7 @@ void rt_components_board_init(void)
{
break;
}
#if RT_DEBUG_INIT
#ifdef RT_DEBUG_INIT
rt_kprintf("initialize %s", rt_init_table[index_i].fn_name);
result = rt_init_table[index_i].fn();
rt_kprintf(":%d done\n", result);
@@ -203,7 +203,7 @@ void rt_components_init(void)
{
break;
}
#if RT_DEBUG_INIT
#ifdef RT_DEBUG_INIT
rt_kprintf("initialize %s", rt_init_table[index_i].fn_name);
result = rt_init_table[index_i].fn();
rt_kprintf(":%d done\n", result);