From 5af4a915edf3e77705fa2625081200b61f8dda26 Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Sun, 15 Oct 2017 21:34:00 -0400 Subject: Cleanup: All drivers return HAL_StatusTypeDef rather than magic values. Note: This affects libhal/ks_token.c, which uses the keystore driver directly. --- stm-flash.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'stm-flash.h') 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 */ -- cgit v1.2.3