@@ -115,7 +115,7 @@ enum hardware_type_e {
115115#define MILLISEC_TO_MICROSEC (x ) (1000*(x))
116116
117117#define MEM_DUMP (s ) \
118- printf( "%s free:%lu min-free:%lu lfb-def:%u lfb-8bit:%u\n\n ", s, \
118+ ESP_LOGD(TAG, "%s free:%lu min-free:%lu lfb-def:%u lfb-8bit:%u", s, \
119119 (unsigned long int)esp_get_free_heap_size(), (unsigned long int)esp_get_minimum_free_heap_size(), \
120120 heap_caps_get_largest_free_block(MALLOC_CAP_DEFAULT), \
121121 heap_caps_get_largest_free_block(MALLOC_CAP_8BIT))
@@ -125,7 +125,7 @@ enum hardware_type_e {
125125#define HOSTED_CREATE_HANDLE (tYPE , hANDLE ) { \
126126 hANDLE = (tYPE *)g_h.funcs->_h_malloc(sizeof(tYPE)); \
127127 if (!hANDLE) { \
128- printf( "%s:%u Mem alloc fail while create handle\n ", __func__,__LINE__); \
128+ ESP_LOGE(TAG, "%s:%u Mem alloc fail while create handle", __func__,__LINE__); \
129129 return NULL; \
130130 } \
131131}
@@ -142,15 +142,15 @@ enum hardware_type_e {
142142#define HOSTED_CALLOC (struct_name , buff , nbytes , gotosym ) do { \
143143 buff = (struct_name *)g_h.funcs->_h_calloc(1, nbytes); \
144144 if (!buff) { \
145- printf( "%s, Failed to allocate memory \n ", __func__); \
145+ ESP_LOGE(TAG, "%s, Failed to allocate memory", __func__); \
146146 goto gotosym; \
147147 } \
148148} while(0);
149149
150150#define HOSTED_MALLOC (struct_name , buff , nbytes , gotosym ) do { \
151151 buff = (struct_name *)g_h.funcs->_h_malloc(nbytes); \
152152 if (!buff) { \
153- printf( "%s, Failed to allocate memory \n ", __func__); \
153+ ESP_LOGE(TAG, "%s, Failed to allocate memory", __func__); \
154154 goto gotosym; \
155155 } \
156156} while(0);
0 commit comments