Skip to content

Commit

Permalink
stm32: simplify flash size calculation
Browse files Browse the repository at this point in the history
Can't use the new header here (this is C code), but can definitly do better than something that expands to inline assembly
  • Loading branch information
Daft-Freak committed Aug 8, 2022
1 parent 8db5590 commit c2f69f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 32blit-stm32/Inc/quadspi.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ extern QSPI_HandleTypeDef hqspi;
#define APPLICATION_ADDRESS QSPI_BASE

// Flash example
#define QSPI_FLASH_SIZE POSITION_VAL(0x2000000)-1
#define QSPI_FLASH_SIZE __builtin_ctz(0x2000000)-1
#define QSPI_PAGE_SIZE 256

/* Reset Operations */
Expand Down

0 comments on commit c2f69f4

Please sign in to comment.