Added PinState enum

I would be pleased to be part of the development of this project. I have just added PinState to be get a cleaner code when reading it. It is not a major change, but the cleaner, the better.