Swap input and output in I/O controller

This is how it should be.
Fix incorrect type when publishing I/O pin change
Change pins to be in input mode by default