18 lines
534 B
Text
18 lines
534 B
Text
|
#!/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
|