diff options
author | Lorenzo Miori <memoryS60@gmail.com> | 2013-09-10 22:48:34 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-02-05 09:56:21 +0100 |
commit | e876f4df6d240bd2e319b1e63be95a625f049a97 (patch) | |
tree | ce2fe1b24650e3be7a6cd2d346d29090a5422a8c /utils/ypr0tools | |
parent | b828b9d99bff2acc0e1f543f3176fd4b632cba68 (diff) | |
download | rockbox-e876f4df6d240bd2e319b1e63be95a625f049a97.tar.gz rockbox-e876f4df6d240bd2e319b1e63be95a625f049a97.zip |
Samsung YP-R1 target port
This is the basic port to the new target Samsung
YP-R1, which runs on a similar platform as YP-R0.
Port is usable, although there are still
some optimizations that have to be done.
Change-Id: If83a8e386369e413581753780c159026d9e41f04
Diffstat (limited to 'utils/ypr0tools')
-rwxr-xr-x | utils/ypr0tools/files/common/etc/safemode/smode | 2 | ||||
-rwxr-xr-x | utils/ypr0tools/rockbox.sh | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/utils/ypr0tools/files/common/etc/safemode/smode b/utils/ypr0tools/files/common/etc/safemode/smode index f94d09a26d..9a0cea9d66 100755 --- a/utils/ypr0tools/files/common/etc/safemode/smode +++ b/utils/ypr0tools/files/common/etc/safemode/smode | |||
@@ -30,7 +30,7 @@ fi | |||
30 | if [ -e "/usr/local/bin/r1" ] | 30 | if [ -e "/usr/local/bin/r1" ] |
31 | then | 31 | then |
32 | # running on YP-R1 model | 32 | # running on YP-R1 model |
33 | BACK=$(echo -e -n "\x02") | 33 | BACK=$(echo -e -n "\x03") |
34 | PLATFORM=1 | 34 | PLATFORM=1 |
35 | BUTTON_DEVICE="/dev/r1Button" | 35 | BUTTON_DEVICE="/dev/r1Button" |
36 | STORAGES="/dev/stl3,/dev/stl2" | 36 | STORAGES="/dev/stl3,/dev/stl2" |
diff --git a/utils/ypr0tools/rockbox.sh b/utils/ypr0tools/rockbox.sh index 85e1b43533..fcae06d717 100755 --- a/utils/ypr0tools/rockbox.sh +++ b/utils/ypr0tools/rockbox.sh | |||
@@ -14,11 +14,18 @@ | |||
14 | # expected to run $MAINFILE | 14 | # expected to run $MAINFILE |
15 | 15 | ||
16 | # Check for menu button being pressed. Return immediately to launch the OF | 16 | # Check for menu button being pressed. Return immediately to launch the OF |
17 | var=$(dd if=/dev/r0Btn bs=4 count=1) | 17 | if [ -e "/dev/r1Button" ] |
18 | # Here a workaround to detect the byte | 18 | then |
19 | var2=$(echo -e -n "\x07") | 19 | # running on YP-R1 model (volume up button) |
20 | BTN=$(echo -e -n "\x02") | ||
21 | VAL=$(dd if=/dev/r1Button bs=4 count=1) | ||
22 | else | ||
23 | # running on YP-R0 model (menu button) | ||
24 | BTN=$(echo -e -n "\x07") | ||
25 | VAL=$(dd if=/dev/r0Btn bs=4 count=1) | ||
26 | fi | ||
20 | 27 | ||
21 | if [[ "$var" = "$var2" ]] | 28 | if [[ "$VAL" = "$BTN" ]] |
22 | then | 29 | then |
23 | return | 30 | return |
24 | fi | 31 | fi |