#!/bin/sh

start() {
	echo "Configuring clock generator..."
	if which i2cset
		then
			i2cset -y 0 0x65 0x05 0x2f
			i2cset -y 0 0x66 0x05 0x2f
			echo "OK"
		else
			echo "ERROR: Cannot configure clock generator: missing i2cset"
	fi
}

stop() {
	echo "OK"
}

restart() {
        stop
        start
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        ;;
esac

exit $?
