Encapsulate GPIO access logic