added functions for IOPin, TODO: use them in InputPin and OutputPin
draft for serial support, initialisation process