Moved GPIO port to macros.
Fixed timing subtraction ordering.