distribution/packages/jelos/sources/autostart/RG351P/001-hardwareinit
2022-03-27 07:07:34 -04:00

16 lines
629 B
Text

. /etc/profile
# Enable GPIO 77 for power LED manipulation
echo ${DEVICE_LED} > /sys/class/gpio/export
# Enable WIFI GPIO for WIFI manipulation
echo ${DEVICE_WIFI} > /sys/class/gpio/export
# Power up the WIFI device
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value
# 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