diff options
| author | Damien George <damien@micropython.org> | 2021-08-26 11:38:29 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-08-31 00:16:39 +1000 |
| commit | 6936f410abe08eb3decd798147f2724691222bfa (patch) | |
| tree | 41bf7f4c20b0bd62874d0919819d2b2c96c53dde /ports/stm32/flashbdev.c | |
| parent | a66bd7a48925d318e1dd6ada756df947ffacdc12 (diff) | |
stm32/storage: Make extended-block-device more configurable.
A board can now define the following to fully customise the extended block
device interface provided by the storage sub-system:
- MICROPY_HW_BDEV_BLOCKSIZE_EXT
- MICROPY_HW_BDEV_READBLOCKS_EXT
- MICROPY_HW_BDEV_WRITEBLOCKS_EXT
- MICROPY_HW_BDEV_ERASEBLOCKS_EXT
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/stm32/flashbdev.c')
| -rw-r--r-- | ports/stm32/flashbdev.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ports/stm32/flashbdev.c b/ports/stm32/flashbdev.c index 4153a713c..6ed891300 100644 --- a/ports/stm32/flashbdev.c +++ b/ports/stm32/flashbdev.c @@ -157,6 +157,7 @@ int32_t flash_bdev_ioctl(uint32_t op, uint32_t arg) { return 0; case BDEV_IOCTL_NUM_BLOCKS: + // Units are FLASH_BLOCK_SIZE return FLASH_MEM_SEG1_NUM_BLOCKS + FLASH_MEM_SEG2_NUM_BLOCKS; case BDEV_IOCTL_IRQ_HANDLER: |
