forked from wolfSSL/wolfHSM
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwh_test_nvm_flash.h
More file actions
49 lines (44 loc) · 1.63 KB
/
wh_test_nvm_flash.h
File metadata and controls
49 lines (44 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Copyright (C) 2024 wolfSSL Inc.
*
* This file is part of wolfHSM.
*
* wolfHSM is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* wolfHSM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with wolfHSM. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* test/wh_test_nvm_flash.h
*
*/
#ifndef TEST_WH_TEST_NVM_FLASH_H_
#define TEST_WH_TEST_NVM_FLASH_H_
#include "wolfhsm/wh_nvm_flash.h"
/*
* Runs all the NVM flash tests using a RAM-based flash memory simulator, and
* optionally using a POSIX file simulator if WOLFHSM_CFG_TEST_POSIX is defined.
* Returns 0 on success, and a non-zero error code on failure
*/
int whTest_NvmFlash(void);
/*
* Runs low-level flash tests on a custom NVM flash configuration. Useful to
* test your FLASH HAL implementation. This will erase the first partition.
* Returns 0 on success, and a non-zero error code on failure
*/
int whTest_FlashCfg(const whFlashCb* fcb, void* fctx, const void* cfg);
/*
* Runs NVM flash tests on a custom NVM flash configuration. Useful to test your
* NVM HAL implementation
* Returns 0 on success, and a non-zero error code on failure
*/
int whTest_NvmFlashCfg(whNvmFlashConfig* cfg);
#endif /* TEST_WH_TEST_NVM_FLASH_H_ */