Skip to content

Commit 8994f8f

Browse files
committed
feat(spi_flash): add support gpspi ext_flash
1 parent ccd9987 commit 8994f8f

File tree

15 files changed

+476
-74
lines changed

15 files changed

+476
-74
lines changed

components/hal/esp32c2/include/hal/gpspi_flash_ll.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
/*
2-
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/*******************************************************************************
88
* NOTICE
9+
* The Lowlevel layer for SPI Flash
910
* The ll is not public api, don't use in application code.
10-
* See readme.md in soc/include/hal/readme.md
1111
******************************************************************************/
1212

13-
// The Lowlevel layer for SPI Flash
14-
1513
#pragma once
1614

1715
#include <stdlib.h>
@@ -26,7 +24,6 @@
2624
extern "C" {
2725
#endif
2826

29-
//NOTE: These macros are changed on ESP32-C2 for build. MODIFY these when bringup flash.
3027
#define gpspi_flash_ll_get_hw(host_id) ( ((host_id)==SPI2_HOST) ? &GPSPI2 : ({abort();(spi_dev_t*)0;}) )
3128
#define gpspi_flash_ll_hw_get_id(dev) ( ((dev) == (void*)&GPSPI2) ? SPI2_HOST : -1 )
3229

components/hal/esp32c3/include/hal/gpspi_flash_ll.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
/*
2-
* SPDX-FileCopyrightText: 2020-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/*******************************************************************************
88
* NOTICE
9+
* The Lowlevel layer for SPI Flash
910
* The ll is not public api, don't use in application code.
10-
* See readme.md in soc/include/hal/readme.md
1111
******************************************************************************/
1212

13-
// The Lowlevel layer for SPI Flash
14-
1513
#pragma once
1614

1715
#include <stdlib.h>
@@ -28,7 +26,6 @@
2826
extern "C" {
2927
#endif
3028

31-
//NOTE: These macros are changed on c3 for build. MODIFY these when bringup flash.
3229
#define gpspi_flash_ll_get_hw(host_id) ( ((host_id)==SPI2_HOST) ? &GPSPI2 : ({abort();(spi_dev_t*)0;}) )
3330
#define gpspi_flash_ll_hw_get_id(dev) ( ((dev) == (void*)&GPSPI2) ? SPI2_HOST : -1 )
3431

components/hal/esp32c5/include/hal/gpspi_flash_ll.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/*******************************************************************************
88
* NOTICE
9+
* The Lowlevel layer for SPI Flash
910
* The ll is not public api, don't use in application code.
10-
* See readme.md in soc/include/hal/readme.md
1111
******************************************************************************/
1212

13-
// The Lowlevel layer for SPI Flash
14-
1513
#pragma once
1614

1715
#include <stdlib.h>
@@ -28,7 +26,6 @@
2826
extern "C" {
2927
#endif
3028

31-
//NOTE: These macros are changed on c3 for build. MODIFY these when bringup flash.
3229
#define gpspi_flash_ll_get_hw(host_id) ( ((host_id)==SPI2_HOST) ? &GPSPI2 : ({abort();(spi_dev_t*)0;}) )
3330
#define gpspi_flash_ll_hw_get_id(dev) ( ((dev) == (void*)&GPSPI2) ? SPI2_HOST : -1 )
3431

components/hal/esp32c6/include/hal/gpspi_flash_ll.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/*******************************************************************************
88
* NOTICE
9+
* The Lowlevel layer for SPI Flash
910
* The ll is not public api, don't use in application code.
10-
* See readme.md in soc/include/hal/readme.md
1111
******************************************************************************/
1212

13-
// The Lowlevel layer for SPI Flash
14-
1513
#pragma once
1614

1715
#include <stdlib.h>
@@ -28,7 +26,6 @@
2826
extern "C" {
2927
#endif
3028

31-
//NOTE: These macros are changed on c3 for build. MODIFY these when bringup flash.
3229
#define gpspi_flash_ll_get_hw(host_id) ( ((host_id)==SPI2_HOST) ? &GPSPI2 : ({abort();(spi_dev_t*)0;}) )
3330
#define gpspi_flash_ll_hw_get_id(dev) ( ((dev) == (void*)&GPSPI2) ? SPI2_HOST : -1 )
3431

components/hal/esp32c61/include/hal/gpspi_flash_ll.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
/*
2-
* SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/*******************************************************************************
88
* NOTICE
9+
* The Lowlevel layer for SPI Flash
910
* The ll is not public api, don't use in application code.
10-
* See readme.md in soc/include/hal/readme.md
1111
******************************************************************************/
1212

13-
// The Lowlevel layer for SPI Flash
14-
1513
#pragma once
1614

1715
#include <stdlib.h>
@@ -28,7 +26,6 @@
2826
extern "C" {
2927
#endif
3028

31-
//NOTE: These macros are changed on c3 for build. MODIFY these when bringup flash.
3229
#define gpspi_flash_ll_get_hw(host_id) ( ((host_id)==SPI2_HOST) ? &GPSPI2 : ({abort();(spi_dev_t*)0;}) )
3330
#define gpspi_flash_ll_hw_get_id(dev) ( ((dev) == (void*)&GPSPI2) ? SPI2_HOST : -1 )
3431

components/hal/esp32h2/include/hal/gpspi_flash_ll.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
/*
2-
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
2+
* SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

77
/*******************************************************************************
88
* NOTICE
9+
* The Lowlevel layer for SPI Flash
910
* The ll is not public api, don't use in application code.
10-
* See readme.md in soc/include/hal/readme.md
1111
******************************************************************************/
1212

13-
// The Lowlevel layer for SPI Flash
14-
1513
#pragma once
1614

1715
#include <stdlib.h>
@@ -28,7 +26,6 @@
2826
extern "C" {
2927
#endif
3028

31-
//NOTE: These macros are changed on h2 for build. MODIFY these when bringup flash.
3229
#define gpspi_flash_ll_get_hw(host_id) ( ((host_id)==SPI2_HOST) ? &GPSPI2 : ({abort();(spi_dev_t*)0;}) )
3330
#define gpspi_flash_ll_hw_get_id(dev) ( ((dev) == (void*)&GPSPI2) ? SPI2_HOST : -1 )
3431

0 commit comments

Comments
 (0)