]> granicus.if.org Git - esp-idf/commitdiff
esp32/esp_common: Remove deprecated system_* APIs
authorAngus Gratton <angus@espressif.com>
Wed, 21 Aug 2019 02:45:09 +0000 (12:45 +1000)
committerAngus Gratton <gus@projectgus.com>
Thu, 12 Sep 2019 23:44:07 +0000 (09:44 +1000)
Mostly deprecated before ESP-IDF V1.0 & V2.0

components/esp32/system_api.c
components/esp_common/include/esp_system.h
components/esp_wifi/CMakeLists.txt
components/esp_wifi/src/restore.c [deleted file]

index f017a0f650852ab223585dc0357ad4944aee417d..a17d65a457a4c9b45d0f20b71fb9fbae72f35d17 100644 (file)
@@ -47,10 +47,6 @@ static uint8_t base_mac_addr[6] = { 0 };
 #define SHUTDOWN_HANDLERS_NO 2
 static shutdown_handler_t shutdown_handlers[SHUTDOWN_HANDLERS_NO];
 
-void system_init(void)
-{
-}
-
 esp_err_t esp_base_mac_addr_set(uint8_t *mac)
 {
     if (mac == NULL) {
@@ -122,7 +118,6 @@ esp_err_t esp_efuse_mac_get_default(uint8_t* mac)
     return ESP_OK;
 }
 
-esp_err_t system_efuse_read_mac(uint8_t *mac) __attribute__((alias("esp_efuse_mac_get_default")));
 esp_err_t esp_efuse_read_mac(uint8_t *mac) __attribute__((alias("esp_efuse_mac_get_default")));
 
 esp_err_t esp_derive_local_mac(uint8_t* local_mac, const uint8_t* universal_mac)
@@ -344,8 +339,6 @@ void IRAM_ATTR esp_restart_noos(void)
     }
 }
 
-void system_restart(void) __attribute__((alias("esp_restart")));
-
 uint32_t esp_get_free_heap_size( void )
 {
     return heap_caps_get_free_size( MALLOC_CAP_DEFAULT );
@@ -356,13 +349,6 @@ uint32_t esp_get_minimum_free_heap_size( void )
     return heap_caps_get_minimum_free_size( MALLOC_CAP_DEFAULT );
 }
 
-uint32_t system_get_free_heap_size(void) __attribute__((alias("esp_get_free_heap_size")));
-
-const char* system_get_sdk_version(void)
-{
-    return "master";
-}
-
 const char* esp_get_idf_version(void)
 {
     return IDF_VER;
index 8ca977f16fba30572e2cd36694b809adf358b794..7fa028846ee587fd3c8a51a68af9552c16e73151 100644 (file)
@@ -58,22 +58,6 @@ typedef enum {
     ESP_RST_SDIO,       //!< Reset over SDIO
 } esp_reset_reason_t;
 
-/** @cond */
-/**
-  * @attention  Applications don't need to call this function anymore. It does nothing and will
-  *             be removed in future version.
-  */
-void system_init(void) __attribute__ ((deprecated));
-
-/**
-  * @brief  Reset to default settings.
-  *
-  * Function has been deprecated, please use esp_wifi_restore instead.
-  * This name will be removed in a future release.
-  */
-void system_restore(void) __attribute__ ((deprecated));
-/** @endcond */
-
 /**
  * Shutdown handler type
  */
@@ -113,32 +97,12 @@ esp_err_t esp_unregister_shutdown_handler(shutdown_handler_t handle);
   */
 void esp_restart(void) __attribute__ ((noreturn));
 
-/** @cond */
-/**
-  * @brief  Restart system.
-  *
-  * Function has been renamed to esp_restart.
-  * This name will be removed in a future release.
-  */
-void system_restart(void) __attribute__ ((deprecated, noreturn));
-/** @endcond */
-
 /**
  * @brief  Get reason of last reset
  * @return See description of esp_reset_reason_t for explanation of each value.
  */
 esp_reset_reason_t esp_reset_reason(void);
 
-/** @cond */
-/**
-  * @brief  Get system time, unit: microsecond.
-  *
-  * This function is deprecated. Use 'gettimeofday' function for 64-bit precision.
-  * This definition will be removed in a future release.
-  */
-uint32_t system_get_time(void)  __attribute__ ((deprecated));
-/** @endcond */
-
 /**
   * @brief  Get the size of available heap.
   *
@@ -149,18 +113,6 @@ uint32_t system_get_time(void)  __attribute__ ((deprecated));
   */
 uint32_t esp_get_free_heap_size(void);
 
-/** @cond */
-/**
-  * @brief  Get the size of available heap.
-  *
-  * Function has been renamed to esp_get_free_heap_size.
-  * This name will be removed in a future release.
-  *
-  * @return Available heap size, in bytes.
-  */
-uint32_t system_get_free_heap_size(void)  __attribute__ ((deprecated));
-/** @endcond */
-
 /**
   * @brief Get the minimum heap that has ever been available
   *
@@ -258,17 +210,6 @@ esp_err_t esp_efuse_mac_get_default(uint8_t *mac);
   * @return ESP_OK on success
   */
 esp_err_t esp_efuse_read_mac(uint8_t *mac) __attribute__ ((deprecated));
-
-/**
-  * @brief  Read hardware MAC address.
-  *
-  * Function has been renamed to esp_efuse_mac_get_default.
-  * This name will be removed in a future release.
-  *
-  * @param  mac  hardware MAC address, length: 6 bytes.
-  * @return ESP_OK on success
-  */
-esp_err_t system_efuse_read_mac(uint8_t *mac) __attribute__ ((deprecated));
 /** @endcond */
 
 /**
@@ -301,17 +242,6 @@ esp_err_t esp_read_mac(uint8_t* mac, esp_mac_type_t type);
   */
 esp_err_t esp_derive_local_mac(uint8_t* local_mac, const uint8_t* universal_mac);
 
-/** @cond */
-/**
- * Get SDK version
- *
- * This function is deprecated and will be removed in a future release.
- *
- * @return constant string "master"
- */
-const char* system_get_sdk_version(void)  __attribute__ ((deprecated));
-/** @endcond */
-
 /**
  * @brief Chip models
  */
index 3b0e3d530ee988f5c2a48e02c578e0a7c4e9e556..1d239ed1155c1aa87994aa72cbaf44f0d241badc 100644 (file)
@@ -8,7 +8,6 @@ idf_component_register(SRCS "src/coexist.c"
                             "src/lib_printf.c"
                             "src/mesh_event.c"
                             "src/phy_init.c"
-                            "src/restore.c"
                             "src/smartconfig.c"
                             "src/smartconfig_ack.c"
                             "src/wifi_init.c"
diff --git a/components/esp_wifi/src/restore.c b/components/esp_wifi/src/restore.c
deleted file mode 100644 (file)
index e17f1ab..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2013-2017 Espressif Systems (Shanghai) PTE LTD
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#include "esp_system.h"
-#include "esp_wifi.h"
-
-/* This function is in a separate file from the reset of system APIs because
- * it causes link time dependency on WiFi stack.
- */
-void system_restore(void)
-{
-    esp_wifi_restore();
-}