From e876f4df6d240bd2e319b1e63be95a625f049a97 Mon Sep 17 00:00:00 2001 From: Lorenzo Miori Date: Tue, 10 Sep 2013 22:48:34 +0200 Subject: 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 --- utils/ypr0tools/files/common/etc/safemode/smode | 2 +- utils/ypr0tools/rockbox.sh | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'utils') 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 if [ -e "/usr/local/bin/r1" ] then # running on YP-R1 model - BACK=$(echo -e -n "\x02") + BACK=$(echo -e -n "\x03") PLATFORM=1 BUTTON_DEVICE="/dev/r1Button" 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 @@ # expected to run $MAINFILE # Check for menu button being pressed. Return immediately to launch the OF -var=$(dd if=/dev/r0Btn bs=4 count=1) -# Here a workaround to detect the byte -var2=$(echo -e -n "\x07") +if [ -e "/dev/r1Button" ] +then + # running on YP-R1 model (volume up button) + BTN=$(echo -e -n "\x02") + VAL=$(dd if=/dev/r1Button bs=4 count=1) +else + # running on YP-R0 model (menu button) + BTN=$(echo -e -n "\x07") + VAL=$(dd if=/dev/r0Btn bs=4 count=1) +fi -if [[ "$var" = "$var2" ]] +if [[ "$VAL" = "$BTN" ]] then return fi -- cgit v1.2.3