aboutsummaryrefslogtreecommitdiff
path: root/drivers/flash/flash_spi.h
diff options
context:
space:
mode:
authorNick Brassel <[email protected]>2024-08-26 10:01:57 +1000
committerNick Brassel <[email protected]>2024-08-26 10:01:57 +1000
commit5d76c5280dc0aff398cdce19fa54d0e0725c418d (patch)
tree40026340f0d524a6006f18f01ef988e15d271075 /drivers/flash/flash_spi.h
parente6a898e3eea3521d3f0497ee26937d5269d78fb7 (diff)
parent81dcf2b547bacc42bd9cf8ccaccd3d7164e69926 (diff)
downloadqmk_firmware-5d76c5280dc0aff398cdce19fa54d0e0725c418d.tar.gz
qmk_firmware-5d76c5280dc0aff398cdce19fa54d0e0725c418d.zip
Merge branch 'develop'0.26.0
Diffstat (limited to 'drivers/flash/flash_spi.h')
-rw-r--r--drivers/flash/flash_spi.h31
1 files changed, 2 insertions, 29 deletions
diff --git a/drivers/flash/flash_spi.h b/drivers/flash/flash_spi.h
index 87460fc210..7a979daf0f 100644
--- a/drivers/flash/flash_spi.h
+++ b/drivers/flash/flash_spi.h
@@ -17,6 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
+#include "flash.h"
+
/* All the following default configurations are based on MX25L4006E Nor FLASH. */
/*
@@ -105,32 +107,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
The page count of the FLASH, calculated by total FLASH size and page size.
*/
#define EXTERNAL_FLASH_PAGE_COUNT ((EXTERNAL_FLASH_SIZE) / (EXTERNAL_FLASH_PAGE_SIZE))
-
-typedef int16_t flash_status_t;
-
-#define FLASH_STATUS_SUCCESS (0)
-#define FLASH_STATUS_ERROR (-1)
-#define FLASH_STATUS_TIMEOUT (-2)
-#define FLASH_STATUS_BAD_ADDRESS (-3)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-void flash_init(void);
-
-flash_status_t flash_erase_chip(void);
-
-flash_status_t flash_erase_block(uint32_t addr);
-
-flash_status_t flash_erase_sector(uint32_t addr);
-
-flash_status_t flash_read_block(uint32_t addr, void *buf, size_t len);
-
-flash_status_t flash_write_block(uint32_t addr, const void *buf, size_t len);
-
-#ifdef __cplusplus
-}
-#endif