2023-09-04 14:54:35 +00:00
|
|
|
#!/bin/sh
|
2023-02-16 22:40:39 +00:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
|
|
|
|
|
2023-09-04 14:54:35 +00:00
|
|
|
cat <<EOF >/storage/.config/profile.d/020-gpios
|
|
|
|
DEVICE_JACK="8"
|
|
|
|
DEVICE_HDMI_GPIO="54"
|
|
|
|
DEVICE_WIFI="113"
|
|
|
|
EOF
|
2023-02-16 22:40:39 +00:00
|
|
|
|
2023-09-04 14:54:35 +00:00
|
|
|
. /storage/.config/profile.d/020-gpios
|
2023-02-16 22:40:39 +00:00
|
|
|
# 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
|