• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: little file system adapt layer.
15  */
16 
17 #ifndef LITTLSFS_ADAPT_H
18 #define LITTLSFS_ADAPT_H
19 
20 #ifdef __cplusplus
21 #if __cplusplus
22 extern "C" {
23 #endif
24 #endif
25 void fs_adapt_mount(void);
26 
27 void fs_adapt_unmount(void);
28 
29 int fs_adapt_open(const char* path, int oflag);
30 
31 int fs_adapt_close(int fd);
32 
33 int fs_adapt_read(int fd, char *buf, unsigned int len);
34 
35 int fs_adapt_write(int fd, const char *buf, unsigned int len);
36 
37 int fs_adapt_delete(const char *path);
38 
39 int fs_adapt_stat(const char *path, unsigned int *file_size);
40 
41 int fs_adapt_seek(int fd, int offset, unsigned int whence);
42 
43 int fs_adapt_sync(int fd);
44 
45 int fs_adapt_mkdir(const char *path);
46 
47 void lfs_test(void);
48 
49 #ifdef __cplusplus
50 #if __cplusplus
51 }
52 #endif
53 #endif
54 
55 #endif
56