pls groot genoeg

This commit is contained in:
2018-11-18 16:02:11 +01:00
commit 8206ede06a
253 changed files with 159550 additions and 0 deletions

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>"