Simplify gpio handling