2023-09-09 10:12:10 +00:00
|
|
|
#!/bin/sh
|
2023-10-23 22:44:47 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2023-10-24 16:00:57 +00:00
|
|
|
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
|
2023-09-09 10:12:10 +00:00
|
|
|
|
|
|
|
cat <<EOF >/storage/.config/profile.d/020-gpios
|
|
|
|
DEVICE_WIFI="0"
|
|
|
|
DEVICE_PWM_MOTOR="pwmchip1"
|
|
|
|
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
|