Incorporating some of dc42's enhancements.  This compiles BUT IT HASN'T BEEN TESTED.  Use with extreme caution.
Merge branch 'duet' of https://github.com/reprappro/RepRapFirmware into duet

Conflicts:
	Platform.h