diff options
-rw-r--r-- | firmware/common/dir.h | 34 | ||||
-rw-r--r-- | firmware/common/file.h | 38 |
2 files changed, 72 insertions, 0 deletions
diff --git a/firmware/common/dir.h b/firmware/common/dir.h new file mode 100644 index 0000000000..83d4bfec98 --- /dev/null +++ b/firmware/common/dir.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Björn Stenberg | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef _DIR_H_ | ||
21 | #define _DIR_H_ | ||
22 | |||
23 | typdef struct { | ||
24 | int offset; | ||
25 | } DIR; | ||
26 | |||
27 | struct dirent { | ||
28 | int d_name[256]; | ||
29 | }; | ||
30 | |||
31 | extern DIR* opendir(char* name); | ||
32 | extern struct dirent* readdir(DIR* dir); | ||
33 | |||
34 | #endif | ||
diff --git a/firmware/common/file.h b/firmware/common/file.h new file mode 100644 index 0000000000..ec80a51579 --- /dev/null +++ b/firmware/common/file.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2002 by Björn Stenberg | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #ifndef _FILE_H_ | ||
21 | #define _FILE_H_ | ||
22 | |||
23 | #define SEEK_SET 0 | ||
24 | #define SEEK_CUR 1 | ||
25 | #define SEEK_END 2 | ||
26 | |||
27 | extern int open(char* pathname, int flags); | ||
28 | extern int close(int fd); | ||
29 | |||
30 | extern int read(int fd, void* buf, int count); | ||
31 | extern int write(int fd, void* buf, int count); | ||
32 | |||
33 | extern int lseek(int fd, int offset, int whence); | ||
34 | |||
35 | extern int remove(char* pathname); | ||
36 | extern int rename(char* oldname, char* newname); | ||
37 | |||
38 | #endif | ||