I believe that this would be a wonderful question on ros2_control’s github: GitHub - ros-controls/ros2_control: Generic and simple controls framework for ROS2

Unfortunately I did not work enough on the gpio to give you an educated answer. You will raise the chance to get a detailled answer if you ask your question on the github repository.