Refactored some stmhal files which are shared with teensy.
Added analogRead, analogWriteXxx and servo support for teensy.