2022-03-26 15:06:45 +00:00
|
|
|
. /etc/profile
|
|
|
|
# Enable GPIO 77 for power LED manipulation
|
2022-03-27 11:07:34 +00:00
|
|
|
echo ${DEVICE_LED} > /sys/class/gpio/export
|
2022-03-26 15:06:45 +00:00
|
|
|
|
|
|
|
# Enable WIFI GPIO for WIFI manipulation
|
2022-03-27 11:07:34 +00:00
|
|
|
echo ${DEVICE_WIFI} > /sys/class/gpio/export
|
2022-03-26 15:06:45 +00:00
|
|
|
|
|
|
|
# Power up the WIFI device
|
2022-03-27 11:07:34 +00:00
|
|
|
echo out > /sys/class/gpio/gpio${DEVICE_WIFI}/direction
|
|
|
|
echo 1 > /sys/class/gpio/gpio${DEVICE_WIFI}/value
|
2022-03-26 15:06:45 +00:00
|
|
|
|
|
|
|
# Enable PWM for rumble and turn rumble off during startup.
|
2022-03-27 11:07:34 +00:00
|
|
|
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
|