From 8ba4b079643cb01371860927906c0a6ab00cf4fc Mon Sep 17 00:00:00 2001 From: Michel-FK Date: Mon, 7 Jun 2021 22:34:57 +0200 Subject: [PATCH] use new share script Signed-off-by: Michel-FK --- .../usr/local/sbin/is_usb_data_connected | 20 ----------------- .../rootfs-overlay/usr/local/sbin/share | 22 +++++++++++++++++++ FunKey/package/gmenu2x/gmenu2x.mk | 3 ++- FunKey/package/retrofe/retrofe.mk | 2 +- 4 files changed, 25 insertions(+), 22 deletions(-) delete mode 100755 FunKey/board/funkey/rootfs-overlay/usr/local/sbin/is_usb_data_connected diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/is_usb_data_connected b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/is_usb_data_connected deleted file mode 100755 index c447693..0000000 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/is_usb_data_connected +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -# Uncomment the following line to get debug info -#set -x - -# Get USB state -usb_present=$(cat /sys/class/power_supply/axp20x-usb/present) - -# Get udc state -udc_state=$(cat /sys/class/udc/musb-hdrc.1.auto/state) - -if [[ x"$udc_state" == "xconfigured" -a "$usb_present" == "1" ]]; then - - # Connected succesfully to a host - echo "yes" - exit 0 -else - echo "no" - exit 1 -fi diff --git a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/share b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/share index d0254c8..03c8254 100755 --- a/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/share +++ b/FunKey/board/funkey/rootfs-overlay/usr/local/sbin/share @@ -127,6 +127,25 @@ is_share_started () { return $res } +is_usb_data_connected () { + + # Get USB state + local usb_present=$(cat /sys/class/power_supply/axp20x-usb/present) + + # Get udc state + local udc_state=$(cat /sys/class/udc/musb-hdrc.1.auto/state) + + if [ "x${udc_state}" = "xconfigured" -a "${usb_present}" -eq 1 ]; then + + # Connected succesfully to a host + echo "yes" + return 0 + else + echo "no" + return 1 + fi +} + case "$1" in init) @@ -145,6 +164,9 @@ case "$1" in is_share_started ;; + is_usb_data_connected) + is_usb_data_connected + ;; *) die 15 "Usage $0 {init|start|stop|is_sharing}" diff --git a/FunKey/package/gmenu2x/gmenu2x.mk b/FunKey/package/gmenu2x/gmenu2x.mk index c0245f1..9984d40 100644 --- a/FunKey/package/gmenu2x/gmenu2x.mk +++ b/FunKey/package/gmenu2x/gmenu2x.mk @@ -3,7 +3,8 @@ # gmenu2x # ############################################################# -GMENU2X_VERSION = 737b86e + +GMENU2X_VERSION = 9f83250 GMENU2X_SITE_METHOD = git GMENU2X_SITE = https://github.com/FunKey-Project/gmenu2x.git GMENU2X_LICENSE = GPL-2.0 diff --git a/FunKey/package/retrofe/retrofe.mk b/FunKey/package/retrofe/retrofe.mk index a557a05..dc66961 100644 --- a/FunKey/package/retrofe/retrofe.mk +++ b/FunKey/package/retrofe/retrofe.mk @@ -4,7 +4,7 @@ # ################################################################################ -RETROFE_VERSION = 9184665 +RETROFE_VERSION = f162704 RETROFE_SITE_METHOD = git RETROFE_SITE = https://github.com/FunKey-Project/RetroFE.git RETROFE_DEPENDENCIES = gstreamer1 gst1-plugins-base sdl sdl_image sdl_mixer sdl_sound sdl_ttf libglib2 sqlite zlib