of the many bus_states, only 2 states are effectively used. instead of using bus_state_t we replace internal use by bool value. Minde that neither library users nor the socket interface will see a change, since the bus_state_t is converted to bool back and forth. The only assumption is that DS485_STATE_ACTIVE means connected, and all the other states are equal disconnected. Which can be checked by 'grep DS485_STATE' on popular projects.