From 959c67702501b1a7eb48d23ccb4a83c307537fe5 Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Tue, 17 Apr 2018 10:39:36 +0530 Subject: [PATCH 1/2] rtc_module: fix build failure if assertions are disabled Closes https://github.com/espressif/esp-idf/issues/1841 Signed-off-by: Mahavir Jain --- components/driver/rtc_module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/driver/rtc_module.c b/components/driver/rtc_module.c index 31804a78a1..c2bff692b4 100644 --- a/components/driver/rtc_module.c +++ b/components/driver/rtc_module.c @@ -1240,7 +1240,7 @@ static int adc_convert( adc_unit_t unit, int channel) adc_value = SENS.sar_meas_start2.meas2_data_sar; } else { ESP_LOGE(TAG, "invalid adc unit"); - assert(0); + return ESP_ERR_INVALID_ARG; } return adc_value; } From 60ab582ba688c0f2ccf8af4b841115937289f743 Mon Sep 17 00:00:00 2001 From: Mahavir Jain Date: Tue, 17 Apr 2018 10:42:25 +0530 Subject: [PATCH 2/2] bt: fix incorrect comments for error codes Closes https://github.com/espressif/esp-idf/issues/1845 Signed-off-by: Mahavir Jain --- .../bt/bluedroid/stack/include/smp_api.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/components/bt/bluedroid/stack/include/smp_api.h b/components/bt/bluedroid/stack/include/smp_api.h index 193cfe33b1..8cf278be55 100644 --- a/components/bt/bluedroid/stack/include/smp_api.h +++ b/components/bt/bluedroid/stack/include/smp_api.h @@ -85,23 +85,23 @@ typedef UINT8 tSMP_EVT; #define SMP_MAX_FAIL_RSN_PER_SPEC SMP_XTRANS_DERIVE_NOT_ALLOW /* self defined error code */ -#define SMP_PAIR_INTERNAL_ERR (SMP_MAX_FAIL_RSN_PER_SPEC + 0x01) /* 0x0E */ +#define SMP_PAIR_INTERNAL_ERR (SMP_MAX_FAIL_RSN_PER_SPEC + 0x01) /* 0x0F */ /* 0x0F unknown IO capability, unable to decide association model */ -#define SMP_UNKNOWN_IO_CAP (SMP_MAX_FAIL_RSN_PER_SPEC + 0x02) /* 0x0F */ +#define SMP_UNKNOWN_IO_CAP (SMP_MAX_FAIL_RSN_PER_SPEC + 0x02) /* 0x10 */ -#define SMP_INIT_FAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x03) /* 0x10 */ -#define SMP_CONFIRM_FAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x04) /* 0x11 */ -#define SMP_BUSY (SMP_MAX_FAIL_RSN_PER_SPEC + 0x05) /* 0x12 */ -#define SMP_ENC_FAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x06) /* 0x13 */ -#define SMP_STARTED (SMP_MAX_FAIL_RSN_PER_SPEC + 0x07) /* 0x14 */ -#define SMP_RSP_TIMEOUT (SMP_MAX_FAIL_RSN_PER_SPEC + 0x08) /* 0x15 */ -#define SMP_DIV_NOT_AVAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x09) /* 0x16 */ +#define SMP_INIT_FAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x03) /* 0x11 */ +#define SMP_CONFIRM_FAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x04) /* 0x12 */ +#define SMP_BUSY (SMP_MAX_FAIL_RSN_PER_SPEC + 0x05) /* 0x13 */ +#define SMP_ENC_FAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x06) /* 0x14 */ +#define SMP_STARTED (SMP_MAX_FAIL_RSN_PER_SPEC + 0x07) /* 0x15 */ +#define SMP_RSP_TIMEOUT (SMP_MAX_FAIL_RSN_PER_SPEC + 0x08) /* 0x16 */ +#define SMP_DIV_NOT_AVAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x09) /* 0x17 */ /* 0x17 unspecified failed reason */ -#define SMP_FAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x0A) /* 0x17 */ +#define SMP_FAIL (SMP_MAX_FAIL_RSN_PER_SPEC + 0x0A) /* 0x18 */ -#define SMP_CONN_TOUT (SMP_MAX_FAIL_RSN_PER_SPEC + 0x0B) +#define SMP_CONN_TOUT (SMP_MAX_FAIL_RSN_PER_SPEC + 0x0B) /* 0x19 */ #define SMP_SUCCESS 0 typedef UINT8 tSMP_STATUS;