Fix setting GPIO input/output mode.
Merge pull request #9 from spectaclelabs/fix-gpio-mode

Fix setting STM32 GPIO input/output mode.