two_bit_pin_value_shift_amount
tmp = tmp >> two_bit_pin_value_shift_amount(pin);
unsigned shift = two_bit_pin_value_shift_amount(pin);