diff options
author | Fredrik Thulin <fredrik@thulin.net> | 2016-06-24 13:12:17 +0200 |
---|---|---|
committer | Fredrik Thulin <fredrik@thulin.net> | 2016-06-24 13:12:17 +0200 |
commit | 155f2d9cede0a650a49a13f4e47e1768919ee4ca (patch) | |
tree | f7d8e804cdc46be8fb3712d29017568fe8d4eefa /masterkey.h | |
parent | 715159e83b97e78a779bfeb38d634decd8e499fc (diff) |
Use hal_error_t as suggested by Rob.
Diffstat (limited to 'masterkey.h')
-rw-r--r-- | masterkey.h | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/masterkey.h b/masterkey.h index 8b47409..1d5e7a5 100644 --- a/masterkey.h +++ b/masterkey.h @@ -35,19 +35,12 @@ #ifndef __STM32_HSM_MASTERKEY_H #define __STM32_HSM_MASTERKEY_H -typedef enum { - HSM_MASTERKEY_FAIL, - HSM_MASTERKEY_OK, - HSM_MASTERKEY_SET, - HSM_MASTERKEY_NOT_SET, -} masterkey_status_t; +extern hal_error_t masterkey_volatile_read(uint8_t *buf, size_t len); +extern hal_error_t masterkey_volatile_write(uint8_t *buf, size_t len); +extern hal_error_t masterkey_volatile_erase(size_t len); -extern masterkey_status_t masterkey_volatile_read(uint8_t *buf, size_t len); -extern masterkey_status_t masterkey_volatile_write(uint8_t *buf, size_t len); -extern masterkey_status_t masterkey_volatile_erase(size_t len); - -extern masterkey_status_t masterkey_flash_read(uint8_t *buf, size_t len); -extern masterkey_status_t masterkey_flash_write(uint8_t *buf, size_t len); -extern masterkey_status_t masterkey_flash_erase(size_t len); +extern hal_error_t masterkey_flash_read(uint8_t *buf, size_t len); +extern hal_error_t masterkey_flash_write(uint8_t *buf, size_t len); +extern hal_error_t masterkey_flash_erase(size_t len); #endif /* __STM32_HSM_MASTERKEY_H */ |