#ifndef LOG_SERVICE_H #define LOG_SERVICE_H #include "dlist.h" /* * Include user defined options first. Anything not defined in these files * will be set to standard values. Override anything you dont like! */ #if defined(CONFIG_PLATFORM_8195A) || defined(CONFIG_PLATFORM_8711B) #include "platform_opts.h" #include "platform_stdlib.h" #endif #ifdef __ICCARM__ #define STRINGIFY(s) #s #define SECTION(_name) _Pragma( STRINGIFY(location=_name)) #define log_module_init(fn) \ SECTION(".data.log_init") __root static void* log_##fn = (void*)fn #elif defined(__CC_ARM) #define log_module_init(fn) \ static void* log_##fn __attribute__((section(".data.log_init"))) = (void*)fn; #define DiagPrintf printf #elif defined(__GNUC__) #define log_module_init(fn) \ static void* log_##fn __attribute__((section(".data.log_init"))) = (void*)fn; #else #error "not implement" #endif #define ATC_INDEX_NUM 32 #ifndef SUPPORT_LOG_SERVICE #define SUPPORT_LOG_SERVICE 1 #endif //LOG_SERVICE_BUFLEN: default, only 63 bytes could be used for keeping input // cmd, the last byte is for string end ('\0'). #ifndef LOG_SERVICE_BUFLEN #define LOG_SERVICE_BUFLEN 64 #endif #ifndef CONFIG_LOG_HISTORY #define CONFIG_LOG_HISTORY 0 #if CONFIG_LOG_HISTORY #define LOG_HISTORY_LEN 5 #endif #endif //#ifndef CONFIG_LOG_HISTORY #ifndef MAX_ARGC #define MAX_ARGC 12 #endif #ifndef CONFIG_LOG_SERVICE_LOCK #define CONFIG_LOG_SERVICE_LOCK 0 // //to protect log_buf[], only one command processed per time #endif #define AT_BIT(n) (1< " //data transparent transmission indicator #endif