From: Michael (XIAO Xufeng) Date: Thu, 1 Aug 2019 05:54:31 +0000 (+0800) Subject: spi_common: remove deprecated spi_common_periph_claim macros X-Git-Tag: v4.1-dev~25^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26fc858ea4f6142d80eead64b743d3ef9eddb71b;p=esp-idf spi_common: remove deprecated spi_common_periph_claim macros --- diff --git a/components/driver/include/driver/spi_common.h b/components/driver/include/driver/spi_common.h index 8f7c97f3d5..9c8bf75460 100644 --- a/components/driver/include/driver/spi_common.h +++ b/components/driver/include/driver/spi_common.h @@ -143,18 +143,6 @@ esp_err_t spi_bus_free(spi_host_device_t host); */ bool spicommon_periph_claim(spi_host_device_t host, const char* source); -// The macro is to keep the back-compatibility of IDF v3.2 and before -// In this way we can call spicommon_periph_claim with two arguments, or the host with the source set to the calling function name -// When two arguments (host, func) are given, __spicommon_periph_claim2 is called -// or if only one arguments (host) is given, __spicommon_periph_claim1 is called -#define spicommon_periph_claim(host...) __spicommon_periph_claim(host, 2, 1) -#define __spicommon_periph_claim(host, source, n, ...) __spicommon_periph_claim ## n(host, source) -#define __spicommon_periph_claim1(host, _) ({ \ - char* warning_str = "calling spicommon_periph_claim without source string is deprecated.";\ - spicommon_periph_claim(host, __FUNCTION__); }) - -#define __spicommon_periph_claim2(host, func) spicommon_periph_claim(host, func) - /** * @brief Check whether the spi periph is in use. *