Waypoint set using DIO

Hello, how can I query the status for the DIO in a timer task(). I want to set a waypoint using the IO.