From 918773f92976b76290da9d9b256fd5fb3f2ead7e Mon Sep 17 00:00:00 2001 From: Leah Post Date: Tue, 5 Apr 2022 19:34:14 +0200 Subject: [PATCH 1/2] Fix typo --- drivers/flash/flash_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/flash/flash_spi.c b/drivers/flash/flash_spi.c index f4cbf6515998..684ee06d718f 100644 --- a/drivers/flash/flash_spi.c +++ b/drivers/flash/flash_spi.c @@ -57,7 +57,7 @@ along with this program. If not, see . /* Mode setting comands */ #define FLASH_CMD_DP 0xB9 /* DP (Deep Power Down) */ -#define FLASH_CMD_RDP 0xAB /* RDP (Release form Deep Power Down) */ +#define FLASH_CMD_RDP 0xAB /* RDP (Release from Deep Power Down) */ /* Status register */ #define FLASH_FLAG_WIP 0x01 /* Write in progress bit */ From 9ddc177310f7ebf2a75af91241fa675ba4bb4973 Mon Sep 17 00:00:00 2001 From: Leah Post Date: Tue, 5 Apr 2022 13:46:31 +0200 Subject: [PATCH 2/2] Fix external flash compilation error on AVR 512*1024 does not fit in 16-bit integers, so let's make it a long --- drivers/flash/flash_spi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/flash/flash_spi.h b/drivers/flash/flash_spi.h index abe95e955e56..87460fc210ee 100644 --- a/drivers/flash/flash_spi.h +++ b/drivers/flash/flash_spi.h @@ -74,21 +74,21 @@ along with this program. If not, see . The sector size of the FLASH in bytes, as specified in the datasheet. */ #ifndef EXTERNAL_FLASH_SECTOR_SIZE -# define EXTERNAL_FLASH_SECTOR_SIZE (4 * 1024) +# define EXTERNAL_FLASH_SECTOR_SIZE (4 * 1024L) #endif /* The block size of the FLASH in bytes, as specified in the datasheet. */ #ifndef EXTERNAL_FLASH_BLOCK_SIZE -# define EXTERNAL_FLASH_BLOCK_SIZE (64 * 1024) +# define EXTERNAL_FLASH_BLOCK_SIZE (64 * 1024L) #endif /* The total size of the FLASH in bytes, as specified in the datasheet. */ #ifndef EXTERNAL_FLASH_SIZE -# define EXTERNAL_FLASH_SIZE (512 * 1024) +# define EXTERNAL_FLASH_SIZE (512 * 1024L) #endif /*