An abstraction of the embedded_hal::digital::v2 OutputPin and InputPin to be shared between functions using an Rc<RefCell>