diff options
author | Paul Selkirk <paul@psgd.org> | 2017-10-15 21:34:00 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2017-10-15 21:34:00 -0400 |
commit | 5af4a915edf3e77705fa2625081200b61f8dda26 (patch) | |
tree | 46d8e3cc6e27627e9f3e78c5a0b4a3573d1b1de3 /stm-flash.h | |
parent | b159bf0bb24a99c7d3ff1b3855f840add63198e5 (diff) |
Cleanup: All drivers return HAL_StatusTypeDef rather than magic values.
Note: This affects libhal/ks_token.c, which uses the keystore driver directly.
Diffstat (limited to 'stm-flash.h')
-rw-r--r-- | stm-flash.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/stm-flash.h b/stm-flash.h index aecb87f..db7d327 100644 --- a/stm-flash.h +++ b/stm-flash.h @@ -1,7 +1,8 @@ /* * stm-flash.h * ----------- - * Functions and defines for accessing the flash memory. + * Functions for writing/erasing the STM32 internal flash memory. + * The flash is memory mapped, so no code is needed here to read it. * * Copyright (c) 2016, NORDUnet A/S All rights reserved. * @@ -35,7 +36,7 @@ #ifndef __STM32_FLASH_H #define __STM32_FLASH_H -extern int stm_flash_erase_sectors(const uint32_t start_offset, const uint32_t end_offset); -extern int stm_flash_write32(const uint32_t offset, const uint32_t *buf, const uint32_t elements); +extern HAL_StatusTypeDef stm_flash_erase_sectors(const uint32_t start_offset, const uint32_t end_offset); +extern HAL_StatusTypeDef stm_flash_write32(const uint32_t offset, const uint32_t *buf, const size_t elements); #endif /* __STM32_FLASH_H */ |