Skip to content

Commit 8ba4b07

Browse files
committed
use new share script
Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
1 parent 67ee9f1 commit 8ba4b07

4 files changed

Lines changed: 25 additions & 22 deletions

File tree

FunKey/board/funkey/rootfs-overlay/usr/local/sbin/is_usb_data_connected

Lines changed: 0 additions & 20 deletions
This file was deleted.

FunKey/board/funkey/rootfs-overlay/usr/local/sbin/share

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,25 @@ is_share_started () {
127127
return $res
128128
}
129129

130+
is_usb_data_connected () {
131+
132+
# Get USB state
133+
local usb_present=$(cat /sys/class/power_supply/axp20x-usb/present)
134+
135+
# Get udc state
136+
local udc_state=$(cat /sys/class/udc/musb-hdrc.1.auto/state)
137+
138+
if [ "x${udc_state}" = "xconfigured" -a "${usb_present}" -eq 1 ]; then
139+
140+
# Connected succesfully to a host
141+
echo "yes"
142+
return 0
143+
else
144+
echo "no"
145+
return 1
146+
fi
147+
}
148+
130149
case "$1" in
131150

132151
init)
@@ -145,6 +164,9 @@ case "$1" in
145164
is_share_started
146165
;;
147166

167+
is_usb_data_connected)
168+
is_usb_data_connected
169+
;;
148170

149171
*)
150172
die 15 "Usage $0 {init|start|stop|is_sharing}"

FunKey/package/gmenu2x/gmenu2x.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# gmenu2x
44
#
55
#############################################################
6-
GMENU2X_VERSION = 737b86e
6+
7+
GMENU2X_VERSION = 9f83250
78
GMENU2X_SITE_METHOD = git
89
GMENU2X_SITE = https://github.com/FunKey-Project/gmenu2x.git
910
GMENU2X_LICENSE = GPL-2.0

FunKey/package/retrofe/retrofe.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
################################################################################
66

7-
RETROFE_VERSION = 9184665
7+
RETROFE_VERSION = f162704
88
RETROFE_SITE_METHOD = git
99
RETROFE_SITE = https://github.com/FunKey-Project/RetroFE.git
1010
RETROFE_DEPENDENCIES = gstreamer1 gst1-plugins-base sdl sdl_image sdl_mixer sdl_sound sdl_ttf libglib2 sqlite zlib

0 commit comments

Comments
 (0)