Port manipulation

it doesn't look like the 'data' variable being passed into the function is ever sent to the pin o_O

Yes, it is, because the value of a bit in the data variable is used to determine whether to call DATA_1 or DATA_0.

The DATA_1 and DATA_0 macros diddle specific pins on the port.