1 #ifndef __APP_HAL_H__
2 #define __APP_HAL_H__
3 
4 #include <stdio.h>
5 #include <stdbool.h>
6 #include <string.h>
7 #include <unistd.h>
8 
9 #if BES_HAL_DEBUG
10 #define ENTER_FUNCTION() printf("%s enter ->\n", __FUNCTION__)
11 #define LEAVE_FUNCTION() printf("%s <- leave\n", __FUNCTION__)
12 #define FOOTPRINT() printf("%s:%d\n", __FUNCTION__, __LINE__)
13 #define TRACEME(str, ...)  printf("%s:%d "str, __FUNCTION__, __LINE__, ##__VA_ARGS__)
14 #else
15 #define ENTER_FUNCTION()
16 #define LEAVE_FUNCTION()
17 #define FOOTPRINT()
18 #define TRACEME(str, ...)
19 #endif
20 #define FAIL_FUNCTION() printf("%s:%d fail!\n", __FUNCTION__, __LINE__)
21 
22 #endif // __APP_HAL_H__
23 
24