]> granicus.if.org Git - esp-idf/commitdiff
Merge branch 'bugfix/driver_cleanup_log' into 'master'
authorIvan Grokhotkov <ivan@espressif.com>
Mon, 12 Dec 2016 02:15:25 +0000 (10:15 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 12 Dec 2016 02:15:25 +0000 (10:15 +0800)
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

1  2 
components/driver/gpio.c
components/driver/ledc.c
components/driver/pcnt.c
components/driver/rmt.c
components/driver/timer.c
components/driver/uart.c

Simple merge
Simple merge
Simple merge
index 8f3816ec9a6eef4b1eddb280f64133bd5831fd54,16e9693af97817efd80d3616fb8e94083fc6a3c2..e29f190024db0e30a911c80124912ea2f8b1b2bf
  #define RMT_DRIVER_ERROR_STR      "RMT DRIVER ERR"
  #define RMT_DRIVER_LENGTH_ERROR_STR  "RMT PARAM LEN ERROR"
  
- static const char* RMT_TAG = "RMT";
+ static const char* RMT_TAG = "rmt";
  static bool s_rmt_driver_installed = false;
 +static rmt_isr_handle_t s_rmt_driver_intr_handle;
  
- #define RMT_CHECK(a, str, ret) if (!(a)) {                                           \
-         ESP_LOGE(RMT_TAG,"%s:%d (%s):%s", __FILE__, __LINE__, __FUNCTION__, str);    \
-         return (ret);                                                                \
-         }
+ #define RMT_CHECK(a, str, ret_val) \
+     if (!(a)) { \
+         ESP_LOGE(RMT_TAG,"%s(%d): %s", __FUNCTION__, __LINE__, str); \
+         return (ret_val); \
+     }
  static portMUX_TYPE rmt_spinlock = portMUX_INITIALIZER_UNLOCKED;
  
  typedef struct {
Simple merge
Simple merge