1 /*
2  * Copyright (c) 2019 Peter Bigot Consulting, LLC
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef _ZEPHYR_TESTS_SUBSYS_FS_LITTLEFS_TESTFS_LFS_H_
8 #define _ZEPHYR_TESTS_SUBSYS_FS_LITTLEFS_TESTFS_LFS_H_
9 
10 #include <zephyr/fs/fs.h>
11 #include "testfs_util.h"
12 
13 #define TESTFS_MNT_POINT_SMALL "/sml"
14 #define TESTFS_MNT_POINT_MEDIUM "/med"
15 #define TESTFS_MNT_POINT_LARGE "/lrg"
16 
17 extern struct fs_mount_t testfs_small_mnt;
18 extern struct fs_mount_t testfs_medium_mnt;
19 extern struct fs_mount_t testfs_large_mnt;
20 
21 #define MEDIUM_IO_SIZE 64
22 #define MEDIUM_CACHE_SIZE 256
23 #define MEDIUM_LOOKAHEAD_SIZE 64
24 
25 #define LARGE_IO_SIZE 256
26 #define LARGE_CACHE_SIZE 1024
27 #define LARGE_LOOKAHEAD_SIZE 128
28 
29 /** Wipe all data from the flash partition associated with the given
30  * mount point.
31  *
32  * This will cause it to be reformatted the next time it is mounted.
33  *
34  * @param mp pointer to the mount point data.  The flash partition ID
35  * must be encoded in the fs_mount_t::storage_dev pointer.
36  *
37  * @return a standard test result code.
38  */
39 int testfs_lfs_wipe_partition(const struct fs_mount_t *mp);
40 
41 #endif /* _ZEPHYR_TESTS_SUBSYS_FS_LITTLEFS_TESTFS_LFS_H_ */
42