]> granicus.if.org Git - esp-idf/commitdiff
Make error codes looks like literals in the code of them (easy for searching). Minor...
authorAnton Maklakov <anton@espressif.com>
Mon, 6 Nov 2017 10:22:45 +0000 (18:22 +0800)
committerAngus Gratton <gus@projectgus.com>
Mon, 9 Apr 2018 03:54:18 +0000 (13:54 +1000)
components/bt/bt.c
components/esp32/event_default_handlers.c
components/esp32/include/rom/uart.h
components/heap/include/esp_heap_caps.h

index 0d848e214304f0d90955a9c13f1f6bbb55ed35d7..0a69d40b41582e752a6cc545e9ae32894e0c1ec6 100644 (file)
@@ -85,7 +85,7 @@ extern uint32_t _data_end_btdm_rom;
 do{\
     esp_err_t __err = (api_call);\
     if ((ret) != __err) {\
-        BT_DEBUG("%s %d %s ret=%d\n", __FUNCTION__, __LINE__, (info), __err);\
+        BT_DEBUG("%s %d %s ret=0x%X\n", __FUNCTION__, __LINE__, (info), __err);\
         return __err;\
     }\
 } while(0)
index 6b127e6091bdec7662ea4e6187bd814b01a1c577..7de0cbb7463fd9f2b54a69585da35b2466bd5c03 100644 (file)
@@ -41,7 +41,7 @@ static const char* TAG = "event";
 do{\
     esp_err_t __err = (api_call);\
     if ((ret) != __err) {\
-        ESP_LOGE(TAG, "%s %d %s ret=%d", __FUNCTION__, __LINE__, (info), __err);\
+        ESP_LOGE(TAG, "%s %d %s ret=0x%X", __FUNCTION__, __LINE__, (info), __err);\
         return __err;\
     }\
 } while(0)
index 8f075392cb97dfae4d63f6cfb31da2e68bbeb0a3..0a3e1aeb644d4b3b80d60918463aece271a2cde0 100644 (file)
@@ -128,7 +128,6 @@ typedef enum {
 } RcvMsgBuffState;
 
 typedef struct {
-//    uint32_t     RcvBuffSize;
     uint8_t *pRcvMsgBuff;
     uint8_t *pWritePos;
     uint8_t *pReadPos;
@@ -248,7 +247,7 @@ STATUS uart_tx_one_char(uint8_t TxChar);
   *
   * @return OK.
   */
-STATUS uart_tx_one_char2(uint8_t TxChar);//for send message
+STATUS uart_tx_one_char2(uint8_t TxChar);
 
 /**
   * @brief Wait until uart tx full empty.
@@ -285,7 +284,7 @@ static inline void IRAM_ATTR uart_tx_wait_idle(uint8_t uart_no) {
 STATUS uart_rx_one_char(uint8_t *pRxChar);
 
 /**
-  * @brief Get an input char to message channel, wait until successful.
+  * @brief Get an input char from message channel, wait until successful.
   *        Please do not call this function in SDK.
   *
   * @param  None
index c9a983dba6d2bfa110b1c5ae2276f94c59f51bed..5a7aa6bc2f3dafcc87c8b21ef3be750e0f1f5fbd 100644 (file)
@@ -67,7 +67,7 @@ void *heap_caps_malloc(size_t size, uint32_t caps);
 void heap_caps_free( void *ptr);
 
 /**
- * @brief Reallocate memory previously allocated via heap_caps_malloc() or heaps_caps_realloc().
+ * @brief Reallocate memory previously allocated via heap_caps_malloc() or heap_caps_realloc().
  *
  * Equivalent semantics to libc realloc(), for capability-aware memory.
  *
@@ -90,7 +90,7 @@ void *heap_caps_realloc( void *ptr, size_t size, int caps);
  *
  * Equivalent semantics to libc calloc(), for capability-aware memory.
  *
- * In IDF, ``calloc(p)`` is equivalent to ``heaps_caps_calloc(p, MALLOC_CAP_8BIT)``.
+ * In IDF, ``calloc(p)`` is equivalent to ``heap_caps_calloc(p, MALLOC_CAP_8BIT)``.
  *
  * @param n    Number of continuing chunks of memory to allocate
  * @param size Size, in bytes, of a chunk of memory to allocate