distribution/packages/hardware/quirks/devices/Anbernic RG552/030-enable_wifi

13 lines
431 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present BrooksyTech (https://github.com/brooksytech)
. /storage/.config/profile.d/001-device_config
# Set export GPIO for Wifi and enable
if [ ! -d "/sys/class/gpio/gpio${DEVICE_WIFI}" ]; then
echo ${DEVICE_WIFI} > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value
fi