]> granicus.if.org Git - esp-idf/commitdiff
bootloader, driver/rtc: fix warnings about unused functions
authorIvan Grokhotkov <ivan@espressif.com>
Fri, 9 Dec 2016 07:47:32 +0000 (15:47 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Fri, 9 Dec 2016 07:47:32 +0000 (15:47 +0800)
components/bootloader/src/main/bootloader_start.c
components/driver/rtc_module.c

index c3ddf0e10a3d89cc001b9e810482f36b01f3554e..e567c78ef6413d691a0ec880229ee6f923f8a2fb 100644 (file)
@@ -622,6 +622,7 @@ void print_flash_info(const esp_image_header_t* phdr)
 #endif
 }
 
+#if CONFIG_CONSOLE_UART_CUSTOM
 static uint32_t get_apb_freq(void)
 {
     // Get the value of APB clock from RTC memory.
@@ -639,6 +640,7 @@ static uint32_t get_apb_freq(void)
         return APB_CLK_FREQ_ROM;
     }
 }
+#endif
 
 static void uart_console_configure(void)
 {
index ab6112d4f2853bed4f485e3d884fd31465983d87..ecb7e434d18e14d96d88d40d45a13b7d927931aa 100644 (file)
@@ -378,21 +378,6 @@ static esp_err_t touch_start(touch_pad_t touch_num)
     return ESP_OK;
 }
 
-static esp_err_t touch_stop(touch_pad_t touch_num)
-{
-    RTC_MODULE_CHECK(touch_num < TOUCH_PAD_MAX, "Touch_Pad Num Err", ESP_ERR_INVALID_ARG);
-    portENTER_CRITICAL(&rtc_spinlock);
-
-    //Disable Digital rtc control :work mode and out mode
-    CLEAR_PERI_REG_MASK(SENS_SAR_TOUCH_ENABLE_REG, (1 << (touch_num + SENS_TOUCH_PAD_WORKEN_S)) | \
-                        (1 << (touch_num + SENS_TOUCH_PAD_OUTEN2_S)) | \
-                        (1 << (touch_num + SENS_TOUCH_PAD_OUTEN1_S)));
-
-    portEXIT_CRITICAL(&rtc_spinlock);
-
-    return ESP_OK;
-}
-
 esp_err_t touch_pad_config(touch_pad_t touch_num, uint16_t threshold)
 {
     RTC_MODULE_CHECK(touch_num < TOUCH_PAD_MAX, "Touch_Pad Num Err", ESP_ERR_INVALID_ARG);
@@ -528,7 +513,6 @@ esp_err_t adc1_config_width(adc_bits_width_t width_bit)
 int adc1_get_voltage(adc1_channel_t channel)
 {
     uint16_t adc_value;
-    uint8_t atten = 0;
 
     RTC_MODULE_CHECK(channel < ADC1_CHANNEL_MAX, "ADC Channel Err", ESP_ERR_INVALID_ARG);
     portENTER_CRITICAL(&rtc_spinlock);
@@ -608,23 +592,6 @@ static esp_err_t dac_out_enable(dac_channel_t channel)
     return ESP_OK;
 }
 
-static esp_err_t  dac_out_disable(dac_channel_t channel)
-{
-    if (channel == DAC_CHANNEL_1) {
-        portENTER_CRITICAL(&rtc_spinlock);
-        CLEAR_PERI_REG_MASK(RTC_IO_PAD_DAC1_REG, RTC_IO_PDAC1_XPD_DAC | RTC_IO_PDAC1_DAC_XPD_FORCE);
-        portEXIT_CRITICAL(&rtc_spinlock);
-    } else if (channel == DAC_CHANNEL_2) {
-        portENTER_CRITICAL(&rtc_spinlock);
-        CLEAR_PERI_REG_MASK(RTC_IO_PAD_DAC2_REG, RTC_IO_PDAC2_XPD_DAC | RTC_IO_PDAC2_DAC_XPD_FORCE);
-        portEXIT_CRITICAL(&rtc_spinlock);
-    } else {
-        return ESP_ERR_INVALID_ARG;
-    }
-
-    return ESP_OK;
-}
-
 esp_err_t dac_out_voltage(dac_channel_t channel, uint8_t dac_value)
 {
     RTC_MODULE_CHECK(channel < DAC_CHANNEL_MAX, "DAC Channel Err", ESP_ERR_INVALID_ARG);