distribution/packages/hardware/quirks/devices/Anbernic RG353V/020-gpios

17 lines
576 B
Bash
Executable file

#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
cat <<EOF >/storage/.config/profile.d/020-gpios
DEVICE_WIFI="5"
DEVICE_LED="77"
DEVICE_PWM_MOTOR="pwmchip1"
DEVICE_JACK="86"
EOF
. /storage/.config/profile.d/020-gpios
# Enable PWM for rumble and turn rumble off during startup.
echo 0 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/export
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/period
echo 1 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/enable
echo 1000000 > /sys/class/pwm/${DEVICE_PWM_MOTOR}/pwm0/duty_cycle