Using the TRIS register, simply state TRISx = %11111100 assuming you have already set the portx to %00000011 that would make outputs on. You would be switching between input and hot(logic 1) output. Why a macro?