
#This script unloads the csmencaps & slic drivers."
#Then it resets the MSP and restart it with the firmware speficied on the command line."
#If no firmware is specified it skips the reset/restart of the MSP phase.
#Then it reloads the csmencaps & slic drivers and start the application."


echo "Unloading the csmencaps driver"
modprobe -r csmencaps
echo -e "\nUnload the slic driver"
modprobe -r legerity

if [ $# -eq 1 ]; then
	echo -e "\nReseting the MSP and restarting it with $1 firmware"
	msp-control -i $1
fi

echo -e "\nReloading the csmencaps driver"
modprobe csmencaps
echo -e "\nBasic initialisation"
c300_init
echo -e "\nReloading the slic driver"
modprobe legerity
echo -e "\nStarting the application"
vapi_demo


