mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-23 09:13:11 +00:00
Merge branch 'bugfix/driver_cleanup_log' into 'master'
drivers: remove file paths from log statements Function name and error string are usually sufficient to find the place which has triggered an error. `__FILE__` macro generates a string which has absolute file name (with our build system), which add many long strings to the program binary. Also change log tags to lower case to match style used elsewhere. Fixes https://github.com/espressif/esp-idf/issues/126 See merge request !282
This commit is contained in:
@@ -21,11 +21,13 @@
|
||||
#include "driver/timer.h"
|
||||
#include "driver/periph_ctrl.h"
|
||||
|
||||
static const char* TIMER_TAG = "TIMER_GROUP";
|
||||
#define TIMER_CHECK(a, str, ret_val) if (!(a)) { \
|
||||
ESP_LOGE(TIMER_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str); \
|
||||
return (ret_val); \
|
||||
}
|
||||
static const char* TIMER_TAG = "timer_group";
|
||||
#define TIMER_CHECK(a, str, ret_val) \
|
||||
if (!(a)) { \
|
||||
ESP_LOGE(TIMER_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
|
||||
return (ret_val); \
|
||||
}
|
||||
|
||||
#define TIMER_GROUP_NUM_ERROR "TIMER GROUP NUM ERROR"
|
||||
#define TIMER_NUM_ERROR "HW TIMER NUM ERROR"
|
||||
#define TIMER_PARAM_ADDR_ERROR "HW TIMER PARAM ADDR ERROR"
|
||||
|
Reference in New Issue
Block a user