I am trying to set the index-enable pin on and encoder to make it re-zero. I need it to happen when a signal becomes high. I'm having issues understanding how to drive a pin that is both an input and output. Can it be done with standard HAL components? or do I need to add something custom?