Skip to content

Commit a4c03ce

Browse files
committed
Merge branch 'change/remove_deprecated_items' into 'master'
change: remove deprecated items See merge request espressif/esp-idf!41769
2 parents bd3b929 + 00022a3 commit a4c03ce

File tree

22 files changed

+180
-300
lines changed

22 files changed

+180
-300
lines changed

components/esp_driver_spi/test_apps/master/main/test_spi_bus_lock.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -13,13 +13,13 @@
1313
#include "unity.h"
1414

1515
#if CONFIG_IDF_TARGET_ESP32
16-
// The VSPI pins on UT_T1_ESP_FLASH are connected to a external flash
17-
#define TEST_BUS_PIN_NUM_MISO VSPI_IOMUX_PIN_NUM_MISO
18-
#define TEST_BUS_PIN_NUM_MOSI VSPI_IOMUX_PIN_NUM_MOSI
19-
#define TEST_BUS_PIN_NUM_CLK VSPI_IOMUX_PIN_NUM_CLK
20-
#define TEST_BUS_PIN_NUM_CS VSPI_IOMUX_PIN_NUM_CS
21-
#define TEST_BUS_PIN_NUM_WP VSPI_IOMUX_PIN_NUM_WP
22-
#define TEST_BUS_PIN_NUM_HD VSPI_IOMUX_PIN_NUM_HD
16+
// The SPI3 pins on UT_T1_ESP_FLASH are connected to a external flash
17+
#define TEST_BUS_PIN_NUM_MISO SPI3_IOMUX_PIN_NUM_MISO
18+
#define TEST_BUS_PIN_NUM_MOSI SPI3_IOMUX_PIN_NUM_MOSI
19+
#define TEST_BUS_PIN_NUM_CLK SPI3_IOMUX_PIN_NUM_CLK
20+
#define TEST_BUS_PIN_NUM_CS SPI3_IOMUX_PIN_NUM_CS
21+
#define TEST_BUS_PIN_NUM_WP SPI3_IOMUX_PIN_NUM_WP
22+
#define TEST_BUS_PIN_NUM_HD SPI3_IOMUX_PIN_NUM_HD
2323

2424
#else
2525
#define TEST_BUS_PIN_NUM_MISO SPI2_IOMUX_PIN_NUM_MISO

components/esp_hw_support/port/include/esp_spiram.h

Lines changed: 0 additions & 10 deletions
This file was deleted.

components/fatfs/vfs/esp_vfs_fat.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -209,17 +209,6 @@ esp_err_t esp_vfs_fat_sdspi_mount(const char* base_path,
209209
const esp_vfs_fat_mount_config_t* mount_config,
210210
sdmmc_card_t** out_card);
211211

212-
/**
213-
* @brief Unmount FAT filesystem and release resources acquired using esp_vfs_fat_sdmmc_mount
214-
*
215-
* @deprecated Use `esp_vfs_fat_sdcard_unmount()` instead.
216-
*
217-
* @return
218-
* - ESP_OK on success
219-
* - ESP_ERR_INVALID_STATE if esp_vfs_fat_sdmmc_mount hasn't been called
220-
*/
221-
esp_err_t esp_vfs_fat_sdmmc_unmount(void) __attribute__((deprecated("Please use esp_vfs_fat_sdcard_unmount instead")));
222-
223212
/**
224213
* @brief Unmount an SD card from the FAT filesystem and release resources acquired using
225214
* `esp_vfs_fat_sdmmc_mount()` or `esp_vfs_fat_sdspi_mount()`

components/fatfs/vfs/vfs_fat_sdmmc.c

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -32,11 +32,6 @@ static const char* TAG = "vfs_fat_sdmmc";
3232
} while(0)
3333

3434
static vfs_fat_sd_ctx_t *s_ctx[FF_VOLUMES] = {};
35-
/**
36-
* This `s_saved_ctx_id` is only used by `esp_vfs_fat_sdmmc_unmount`, which is deprecated.
37-
* This variable together with `esp_vfs_fat_sdmmc_unmount` should be removed in next major version
38-
*/
39-
static uint32_t s_saved_ctx_id = FF_VOLUMES;
4035

4136
static void call_host_deinit(const sdmmc_host_t *host_config);
4237
static esp_err_t partition_card(const esp_vfs_fat_mount_config_t *mount_config,
@@ -287,10 +282,6 @@ esp_err_t esp_vfs_fat_sdmmc_mount(const char* base_path,
287282
if (out_card != NULL) {
288283
*out_card = card;
289284
}
290-
//For deprecation backward compatibility
291-
if (s_saved_ctx_id == FF_VOLUMES) {
292-
s_saved_ctx_id = 0;
293-
}
294285

295286
ctx = calloc(1, sizeof(vfs_fat_sd_ctx_t));
296287
if (!ctx) {
@@ -385,10 +376,6 @@ esp_err_t esp_vfs_fat_sdspi_mount(const char* base_path,
385376
if (out_card != NULL) {
386377
*out_card = card;
387378
}
388-
//For deprecation backward compatibility
389-
if (s_saved_ctx_id == FF_VOLUMES) {
390-
s_saved_ctx_id = 0;
391-
}
392379

393380
ctx = calloc(1, sizeof(vfs_fat_sd_ctx_t));
394381
if (!ctx) {
@@ -444,15 +431,6 @@ static esp_err_t unmount_card_core(const char *base_path, sdmmc_card_t *card)
444431
return err;
445432
}
446433

447-
esp_err_t esp_vfs_fat_sdmmc_unmount(void)
448-
{
449-
esp_err_t err = unmount_card_core(s_ctx[s_saved_ctx_id]->base_path, s_ctx[s_saved_ctx_id]->card);
450-
free(s_ctx[s_saved_ctx_id]);
451-
s_ctx[s_saved_ctx_id] = NULL;
452-
s_saved_ctx_id = FF_VOLUMES;
453-
return err;
454-
}
455-
456434
esp_err_t esp_vfs_fat_sdcard_unmount(const char *base_path, sdmmc_card_t *card)
457435
{
458436
uint32_t id = FF_VOLUMES;

components/hal/include/hal/spi_flash_hal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ typedef struct {
8585
};
8686
bool iomux; ///< Whether the IOMUX is used, used for timing compensation.
8787
int input_delay_ns; ///< Input delay on the MISO pin after the launch clock, used for timing compensation.
88-
enum esp_flash_speed_s speed __attribute__((deprecated)); ///< SPI flash clock speed to work at. Replaced by freq_mhz
8988
spi_host_device_t host_id; ///< SPI peripheral ID.
9089
int cs_num; ///< Which cs pin is used, 0-(SOC_SPI_PERIPH_CS_NUM-1).
9190
bool auto_sus_en; ///< Auto suspend feature enable bit 1: enable, 0: disable.

components/hal/include/hal/spi_flash_types.h

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2010-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2010-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -33,25 +33,6 @@ typedef struct {
3333
uint32_t io_mode; ///< Flash working mode when `SPI_FLASH_IGNORE_BASEIO` is specified.
3434
} spi_flash_trans_t;
3535

36-
/**
37-
* @brief SPI flash clock speed values, always refer to them by the enum rather
38-
* than the actual value (more speed may be appended into the list).
39-
*
40-
* A strategy to select the maximum allowed speed is to enumerate from the
41-
* ``ESP_FLSH_SPEED_MAX-1`` or highest frequency supported by your flash, and
42-
* decrease the speed until the probing success.
43-
*/
44-
typedef enum esp_flash_speed_s {
45-
ESP_FLASH_5MHZ = 5, ///< The flash runs under 5MHz
46-
ESP_FLASH_10MHZ = 10, ///< The flash runs under 10MHz
47-
ESP_FLASH_20MHZ = 20, ///< The flash runs under 20MHz
48-
ESP_FLASH_26MHZ = 26, ///< The flash runs under 26MHz
49-
ESP_FLASH_40MHZ = 40, ///< The flash runs under 40MHz
50-
ESP_FLASH_80MHZ = 80, ///< The flash runs under 80MHz
51-
ESP_FLASH_120MHZ = 120, ///< The flash runs under 120MHz, 120MHZ can only be used by main flash after timing tuning in system. Do not use this directly in any API.
52-
ESP_FLASH_SPEED_MAX, ///< The maximum frequency supported by the host is ``ESP_FLASH_SPEED_MAX-1``.
53-
} esp_flash_speed_t __attribute__((deprecated));
54-
5536
// These bits are not quite like "IO mode", but are able to be appended into the io mode and used by the HAL.
5637
#define SPI_FLASH_CONFIG_CONF_BITS BIT(31) ///< OR the io_mode with this mask, to enable the dummy output feature or replace the first several dummy bits into address to meet the requirements of conf bits. (Used in DIO/QIO/OIO mode)
5738

Lines changed: 15 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -23,35 +23,18 @@
2323
#define SPI_D2WD_PIN_NUM_WP 7
2424
#define SPI_D2WD_PIN_NUM_HD 11
2525

26-
#define SPI2_FUNC_NUM HSPI_FUNC_NUM
27-
#define SPI2_IOMUX_PIN_NUM_MISO HSPI_IOMUX_PIN_NUM_MISO
28-
#define SPI2_IOMUX_PIN_NUM_MOSI HSPI_IOMUX_PIN_NUM_MOSI
29-
#define SPI2_IOMUX_PIN_NUM_CLK HSPI_IOMUX_PIN_NUM_CLK
30-
#define SPI2_IOMUX_PIN_NUM_CS HSPI_IOMUX_PIN_NUM_CS
31-
#define SPI2_IOMUX_PIN_NUM_WP HSPI_IOMUX_PIN_NUM_WP
32-
#define SPI2_IOMUX_PIN_NUM_HD HSPI_IOMUX_PIN_NUM_HD
26+
#define SPI2_FUNC_NUM 1
27+
#define SPI2_IOMUX_PIN_NUM_MISO 12
28+
#define SPI2_IOMUX_PIN_NUM_MOSI 13
29+
#define SPI2_IOMUX_PIN_NUM_CLK 14
30+
#define SPI2_IOMUX_PIN_NUM_CS 15
31+
#define SPI2_IOMUX_PIN_NUM_WP 2
32+
#define SPI2_IOMUX_PIN_NUM_HD 4
3333

34-
#define SPI3_FUNC_NUM VSPI_FUNC_NUM
35-
#define SPI3_IOMUX_PIN_NUM_MISO VSPI_IOMUX_PIN_NUM_MISO
36-
#define SPI3_IOMUX_PIN_NUM_MOSI VSPI_IOMUX_PIN_NUM_MOSI
37-
#define SPI3_IOMUX_PIN_NUM_CLK VSPI_IOMUX_PIN_NUM_CLK
38-
#define SPI3_IOMUX_PIN_NUM_CS VSPI_IOMUX_PIN_NUM_CS
39-
#define SPI3_IOMUX_PIN_NUM_WP VSPI_IOMUX_PIN_NUM_WP
40-
#define SPI3_IOMUX_PIN_NUM_HD VSPI_IOMUX_PIN_NUM_HD
41-
42-
//Following Macros are deprecated. Please use the Macros above
43-
#define HSPI_FUNC_NUM 1
44-
#define HSPI_IOMUX_PIN_NUM_MISO 12
45-
#define HSPI_IOMUX_PIN_NUM_MOSI 13
46-
#define HSPI_IOMUX_PIN_NUM_CLK 14
47-
#define HSPI_IOMUX_PIN_NUM_CS 15
48-
#define HSPI_IOMUX_PIN_NUM_WP 2
49-
#define HSPI_IOMUX_PIN_NUM_HD 4
50-
51-
#define VSPI_FUNC_NUM 1
52-
#define VSPI_IOMUX_PIN_NUM_MISO 19
53-
#define VSPI_IOMUX_PIN_NUM_MOSI 23
54-
#define VSPI_IOMUX_PIN_NUM_CLK 18
55-
#define VSPI_IOMUX_PIN_NUM_CS 5
56-
#define VSPI_IOMUX_PIN_NUM_WP 22
57-
#define VSPI_IOMUX_PIN_NUM_HD 21
34+
#define SPI3_FUNC_NUM 1
35+
#define SPI3_IOMUX_PIN_NUM_MISO 19
36+
#define SPI3_IOMUX_PIN_NUM_MOSI 23
37+
#define SPI3_IOMUX_PIN_NUM_CLK 18
38+
#define SPI3_IOMUX_PIN_NUM_CS 5
39+
#define SPI3_IOMUX_PIN_NUM_WP 22
40+
#define SPI3_IOMUX_PIN_NUM_HD 21

components/soc/esp32/spi_periph.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -46,15 +46,15 @@ const spi_signal_conn_t spi_periph_signal[3] = {
4646
.spihd_in = HSPIHD_IN_IDX,
4747
.spics_out = {HSPICS0_OUT_IDX, HSPICS1_OUT_IDX, HSPICS2_OUT_IDX},
4848
.spics_in = HSPICS0_IN_IDX,
49-
.spiclk_iomux_pin = HSPI_IOMUX_PIN_NUM_CLK,
50-
.spid_iomux_pin = HSPI_IOMUX_PIN_NUM_MOSI,
51-
.spiq_iomux_pin = HSPI_IOMUX_PIN_NUM_MISO,
52-
.spiwp_iomux_pin = HSPI_IOMUX_PIN_NUM_WP,
53-
.spihd_iomux_pin = HSPI_IOMUX_PIN_NUM_HD,
54-
.spics0_iomux_pin = HSPI_IOMUX_PIN_NUM_CS,
49+
.spiclk_iomux_pin = SPI2_IOMUX_PIN_NUM_CLK,
50+
.spid_iomux_pin = SPI2_IOMUX_PIN_NUM_MOSI,
51+
.spiq_iomux_pin = SPI2_IOMUX_PIN_NUM_MISO,
52+
.spiwp_iomux_pin = SPI2_IOMUX_PIN_NUM_WP,
53+
.spihd_iomux_pin = SPI2_IOMUX_PIN_NUM_HD,
54+
.spics0_iomux_pin = SPI2_IOMUX_PIN_NUM_CS,
5555
.irq = ETS_SPI2_INTR_SOURCE,
5656
.irq_dma = ETS_SPI2_DMA_INTR_SOURCE,
57-
.func = HSPI_FUNC_NUM,
57+
.func = SPI2_FUNC_NUM,
5858
.hw = &SPI2
5959
}, {
6060
.spiclk_out = VSPICLK_OUT_IDX,
@@ -69,15 +69,15 @@ const spi_signal_conn_t spi_periph_signal[3] = {
6969
.spihd_in = VSPIHD_IN_IDX,
7070
.spics_out = {VSPICS0_OUT_IDX, VSPICS1_OUT_IDX, VSPICS2_OUT_IDX},
7171
.spics_in = VSPICS0_IN_IDX,
72-
.spiclk_iomux_pin = VSPI_IOMUX_PIN_NUM_CLK,
73-
.spid_iomux_pin = VSPI_IOMUX_PIN_NUM_MOSI,
74-
.spiq_iomux_pin = VSPI_IOMUX_PIN_NUM_MISO,
75-
.spiwp_iomux_pin = VSPI_IOMUX_PIN_NUM_WP,
76-
.spihd_iomux_pin = VSPI_IOMUX_PIN_NUM_HD,
77-
.spics0_iomux_pin = VSPI_IOMUX_PIN_NUM_CS,
72+
.spiclk_iomux_pin = SPI3_IOMUX_PIN_NUM_CLK,
73+
.spid_iomux_pin = SPI3_IOMUX_PIN_NUM_MOSI,
74+
.spiq_iomux_pin = SPI3_IOMUX_PIN_NUM_MISO,
75+
.spiwp_iomux_pin = SPI3_IOMUX_PIN_NUM_WP,
76+
.spihd_iomux_pin = SPI3_IOMUX_PIN_NUM_HD,
77+
.spics0_iomux_pin = SPI3_IOMUX_PIN_NUM_CS,
7878
.irq = ETS_SPI3_INTR_SOURCE,
7979
.irq_dma = ETS_SPI3_DMA_INTR_SOURCE,
80-
.func = VSPI_FUNC_NUM,
80+
.func = SPI3_FUNC_NUM,
8181
.hw = &SPI3
8282
}
8383
};

components/soc/esp32s2/include/soc/spi_pins.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -46,12 +46,3 @@
4646
#define SPI2_IOMUX_PIN_NUM_IO7_OCT 13
4747

4848
//SPI3 has no iomux pins
49-
50-
//Following Macros are deprecated. Please use the Macros above
51-
#define FSPI_FUNC_NUM SPI2_FUNC_NUM
52-
#define FSPI_IOMUX_PIN_NUM_HD SPI2_IOMUX_PIN_NUM_HD
53-
#define FSPI_IOMUX_PIN_NUM_CS SPI2_IOMUX_PIN_NUM_CS
54-
#define FSPI_IOMUX_PIN_NUM_MOSI SPI2_IOMUX_PIN_NUM_MOSI
55-
#define FSPI_IOMUX_PIN_NUM_CLK SPI2_IOMUX_PIN_NUM_CLK
56-
#define FSPI_IOMUX_PIN_NUM_MISO SPI2_IOMUX_PIN_NUM_MISO
57-
#define FSPI_IOMUX_PIN_NUM_WP SPI2_IOMUX_PIN_NUM_WP

components/soc/esp32s2/spi_periph.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -56,16 +56,16 @@ const spi_signal_conn_t spi_periph_signal[SOC_SPI_PERIPH_NUM] = {
5656
.spid7_in = FSPIIO7_IN_IDX,
5757
.spics_out = {FSPICS0_OUT_IDX, FSPICS1_OUT_IDX, FSPICS2_OUT_IDX, FSPICS3_OUT_IDX, FSPICS4_OUT_IDX, FSPICS5_OUT_IDX},
5858
.spics_in = FSPICS0_IN_IDX,
59-
.spiclk_iomux_pin = FSPI_IOMUX_PIN_NUM_CLK,
60-
.spid_iomux_pin = FSPI_IOMUX_PIN_NUM_MOSI,
61-
.spiq_iomux_pin = FSPI_IOMUX_PIN_NUM_MISO,
62-
.spiwp_iomux_pin = FSPI_IOMUX_PIN_NUM_WP,
63-
.spihd_iomux_pin = FSPI_IOMUX_PIN_NUM_HD,
64-
.spics0_iomux_pin = FSPI_IOMUX_PIN_NUM_CS,
59+
.spiclk_iomux_pin = SPI2_IOMUX_PIN_NUM_CLK,
60+
.spid_iomux_pin = SPI2_IOMUX_PIN_NUM_MOSI,
61+
.spiq_iomux_pin = SPI2_IOMUX_PIN_NUM_MISO,
62+
.spiwp_iomux_pin = SPI2_IOMUX_PIN_NUM_WP,
63+
.spihd_iomux_pin = SPI2_IOMUX_PIN_NUM_HD,
64+
.spics0_iomux_pin = SPI2_IOMUX_PIN_NUM_CS,
6565
.irq = ETS_SPI2_INTR_SOURCE,
6666
.irq_dma = ETS_SPI2_DMA_INTR_SOURCE,
6767
.hw = &GPSPI2,
68-
.func = FSPI_FUNC_NUM,
68+
.func = SPI2_FUNC_NUM,
6969
}, {
7070
.spiclk_out = SPI3_CLK_OUT_MUX_IDX,
7171
.spiclk_in = SPI3_CLK_IN_IDX,

0 commit comments

Comments
 (0)