diff options
author | Thomas Martitz <kugel@rockbox.org> | 2014-02-07 18:30:50 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-02-23 20:23:52 +0100 |
commit | f6c26d33a4e15d966597bc9d66c1f33328a750af (patch) | |
tree | 5e0e4d0189c856010a78ce0b79cdc3c3cb5c1354 /firmware/export | |
parent | 46137ebd4d59d7a91d0b8d98d846a3fd2ec70f5c (diff) | |
download | rockbox-f6c26d33a4e15d966597bc9d66c1f33328a750af.tar.gz rockbox-f6c26d33a4e15d966597bc9d66c1f33328a750af.zip |
samsungypr0: Support or mounting the microsd
A thread polls the appropriate GPIO pin for sd card presence and mounts
using the mount system call.
Change-Id: I31ab41c4120f4af64eb6998b7e7b6f9051585efb
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config/samsungypr0.h | 8 | ||||
-rw-r--r-- | firmware/export/mv.h | 1 | ||||
-rw-r--r-- | firmware/export/rbpaths.h | 5 |
3 files changed, 11 insertions, 3 deletions
diff --git a/firmware/export/config/samsungypr0.h b/firmware/export/config/samsungypr0.h index 361c9697c5..bed5a2f977 100644 --- a/firmware/export/config/samsungypr0.h +++ b/firmware/export/config/samsungypr0.h | |||
@@ -161,6 +161,10 @@ | |||
161 | /* This folder resides in the ReadOnly CRAMFS. It is binded to /mnt/media0/.rockbox */ | 161 | /* This folder resides in the ReadOnly CRAMFS. It is binded to /mnt/media0/.rockbox */ |
162 | #define BOOTDIR "/.rockbox" | 162 | #define BOOTDIR "/.rockbox" |
163 | 163 | ||
164 | /* No special storage */ | 164 | /* External SD card can be mounted */ |
165 | #define CONFIG_STORAGE STORAGE_HOSTFS | 165 | #define CONFIG_STORAGE (STORAGE_HOSTFS|STORAGE_SD) |
166 | #define HAVE_MULTIDRIVE | ||
167 | #define NUM_DRIVES 2 | ||
168 | #define HAVE_HOTSWAP | ||
166 | #define HAVE_STORAGE_FLUSH | 169 | #define HAVE_STORAGE_FLUSH |
170 | #define MULTIDRIVE_DIR "/mnt/mmc" | ||
diff --git a/firmware/export/mv.h b/firmware/export/mv.h index 05c9c6349f..1d0a536663 100644 --- a/firmware/export/mv.h +++ b/firmware/export/mv.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef __MV_H__ | 22 | #ifndef __MV_H__ |
23 | #define __MV_H__ | 23 | #define __MV_H__ |
24 | 24 | ||
25 | #include <stdbool.h> | ||
25 | #include "config.h" | 26 | #include "config.h" |
26 | 27 | ||
27 | /* FixMe: These macros are a bit nasty and perhaps misplaced here. | 28 | /* FixMe: These macros are a bit nasty and perhaps misplaced here. |
diff --git a/firmware/export/rbpaths.h b/firmware/export/rbpaths.h index 0a5b36c5ab..1f7e1a2643 100644 --- a/firmware/export/rbpaths.h +++ b/firmware/export/rbpaths.h | |||
@@ -60,7 +60,6 @@ | |||
60 | #else /* APPLICATION */ | 60 | #else /* APPLICATION */ |
61 | 61 | ||
62 | #define HOME_DIR "<HOME>" /* replaced at runtime */ | 62 | #define HOME_DIR "<HOME>" /* replaced at runtime */ |
63 | #define HOME_DIR_LEN (sizeof(HOME_DIR)-1) | ||
64 | 63 | ||
65 | #define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" | 64 | #define PLUGIN_DIR ROCKBOX_LIBRARY_PATH "/rockbox/rocks" |
66 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) | 65 | #if (CONFIG_PLATFORM & PLATFORM_ANDROID) |
@@ -73,10 +72,13 @@ extern void paths_init(void); | |||
73 | 72 | ||
74 | #endif /* !APPLICATION || SAMSUNG_YPR0 */ | 73 | #endif /* !APPLICATION || SAMSUNG_YPR0 */ |
75 | 74 | ||
75 | #define HOME_DIR_LEN (sizeof(HOME_DIR)-1) | ||
76 | |||
76 | #ifdef APPLICATION | 77 | #ifdef APPLICATION |
77 | 78 | ||
78 | #include <dirent.h> | 79 | #include <dirent.h> |
79 | #include <fcntl.h> | 80 | #include <fcntl.h> |
81 | #include <unistd.h> | ||
80 | 82 | ||
81 | int app_open(const char *name, int o, ...); | 83 | int app_open(const char *name, int o, ...); |
82 | int app_creat(const char* name, mode_t mode); | 84 | int app_creat(const char* name, mode_t mode); |
@@ -87,6 +89,7 @@ int app_closedir(DIR *dir); | |||
87 | struct dirent* app_readdir(DIR* dir); | 89 | struct dirent* app_readdir(DIR* dir); |
88 | int app_mkdir(const char* name); | 90 | int app_mkdir(const char* name); |
89 | int app_rmdir(const char* name); | 91 | int app_rmdir(const char* name); |
92 | ssize_t app_readlink(const char *path, char *buf, size_t bufsiz); | ||
90 | 93 | ||
91 | #endif | 94 | #endif |
92 | 95 | ||