fatfs.h
Go to the documentation of this file.
1 /*
2  * KubOS Core Flight Services
3  * Copyright (C) 2015 Kubos Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #ifdef YOTTA_CFG_FS_FATFS
18 #ifndef FATFS_H
19 #define FATFS_H
20 
22 
23 extern fs_dev_t fatfs_dev;
24 
25 int fatfs_mount(fs_mount_t *mnt);
26 int fatfs_unmount(fs_mount_t *mnt);
27 int fatfs_open(struct _reent *r, const char *path, int flags, int mode, fs_fd_t *fd_out);
28 int fatfs_close(struct _reent *r, fs_fd_t *fd);
29 long fatfs_write(struct _reent *r, fs_fd_t *fd, const char *ptr, int len);
30 long fatfs_read(struct _reent *r, fs_fd_t *fd, char *ptr, int len);
31 _off_t fatfs_lseek(struct _reent *r, fs_fd_t *fd, _off_t pos, int dir);
32 int fatfs_sync(struct _reent *r, fs_fd_t *fd);
33 int fatfs_fstat(struct _reent *r, fs_fd_t *fd, struct stat *st);
34 int fatfs_stat(struct _reent *r, char *path, struct stat *st);
35 int fatfs_unlink(struct _reent *r, char *path);
36 
37 int fatfs_opendir(fs_dir_t *out, const char *path);
38 int fatfs_readdir(fs_dir_t *dir, fs_info_t *info);
39 int fatfs_closedir(fs_dir_t *dir);
40 
41 #endif
42 #endif