i think i almost have the default pass, i have to understand one more function

This commit is contained in:
2018-11-18 18:19:38 +01:00
parent 8206ede06a
commit 36aeaa07f6
264 changed files with 11666 additions and 1 deletions

33
verb/fs.sbin/acodec Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
# acodec -a <reg> -d <data>
if [ "$1" == "-a" ]; then
if [ "$2" == "" ]; then
echo "Usage: acodec -a <reg> -d <data>"
fi
if [ "$3" == "" ]; then
i2c -cfg f8 -dev 1a -clk 200 -a $2
echo "read WM8960: Register ($2)."
elif [ "$3" != "-d" ] || [ "$4" == "" ]; then
echo "Usage: acodec -a <reg> -d <data>"
else
i2c -cfg f8 -dev 1a -clk 200 -a $2 -d $4
echo "write WM8960: Register ($2), Data ($4)."
fi
exit
fi
if [ "$1" == "-d" ]; then
if [ "$2" == "" ]; then
echo "Usage: acodec -a <reg> -d <data>"
fi
if [ "$3" != "-a" ] || [ "$4" == "" ]; then
echo "Usage: acodec -a <reg> -d <data>"
else
i2c -cfg f8 -dev 1a -clk 200 -a $4 -d $2
echo "write WM8960: Register ($4), Data ($2)."
fi
exit
fi
echo "Usage: acodec -a <reg> -d <data>"