feat(spi_flash): add support gpspi ext_flash

This commit is contained in:
wanckl
2025-03-18 17:15:42 +08:00
parent ccd99874a7
commit 8994f8fe70
15 changed files with 476 additions and 74 deletions

View File

@@ -6,12 +6,10 @@
/*******************************************************************************
* NOTICE
* The Lowlevel layer for SPI Flash
* The ll is not public api, don't use in application code.
* See readme.md in soc/include/hal/readme.md
******************************************************************************/
// The Lowlevel layer for SPI Flash
#pragma once
#include <stdlib.h>
@@ -30,7 +28,6 @@
extern "C" {
#endif
//NOTE: These macros are changed on h4 for build. MODIFY these when bringup flash.
#define gpspi_flash_ll_get_hw(host_id) ( ((host_id)==SPI2_HOST) ? &GPSPI2 : ({abort();(spi_dev_t*)0;}) )
#define gpspi_flash_ll_hw_get_id(dev) ( ((dev) == (void*)&GPSPI2) ? SPI2_HOST : -1 )