Added code from ianrenton. -- output to gpio for heng long protocol interface port