From 36c73e6d701a8887aa707a65e350fad68e33e701 Mon Sep 17 00:00:00 2001 From: Per Malmberg Date: Tue, 5 Mar 2019 21:59:54 +0100 Subject: [PATCH] Easier use of -Wsign-conversion warnings needs changes. Merges https://github.com/espressif/esp-idf/pull/3129 --- components/driver/include/driver/gpio.h | 1 + components/freertos/include/freertos/portable.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/components/driver/include/driver/gpio.h b/components/driver/include/driver/gpio.h index c2231a625..ffa88a45c 100644 --- a/components/driver/include/driver/gpio.h +++ b/components/driver/include/driver/gpio.h @@ -128,6 +128,7 @@ extern "C" { #define GPIO_IS_VALID_OUTPUT_GPIO(gpio_num) ((GPIO_IS_VALID_GPIO(gpio_num)) && (gpio_num < 34)) /*!< Check whether it can be a valid GPIO number of output mode */ typedef enum { + GPIO_NUM_NC = -1, /*!< Use to signal not connected to S/W */ GPIO_NUM_0 = 0, /*!< GPIO0, input and output */ GPIO_NUM_1 = 1, /*!< GPIO1, input and output */ GPIO_NUM_2 = 2, /*!< GPIO2, input and output diff --git a/components/freertos/include/freertos/portable.h b/components/freertos/include/freertos/portable.h index ce189f31c..7454441cf 100644 --- a/components/freertos/include/freertos/portable.h +++ b/components/freertos/include/freertos/portable.h @@ -204,7 +204,7 @@ BaseType_t xPortInterruptedFromISRContext(); /* Multi-core: get current core ID */ static inline uint32_t IRAM_ATTR xPortGetCoreID() { - int id; + uint32_t id; __asm__ __volatile__ ( "rsr.prid %0\n" " extui %0,%0,13,1"