distribution/packages/hardware/quirks/devices/Anbernic RG353V/001-hardwareinit
2023-04-01 23:01:06 +00:00

17 lines
538 B
Bash
Executable file

#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# 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
cat <<EOF >/storage/.config/sleep.conf.d/sleep.conf
[Sleep]
AllowSuspend=yes
SuspendState=freeze
EOF