Da hast da das Übertragen von NULL nicht dabei, nur eine EINS.
Würde ich erstmal ganz einfach machen:
Code:
if (Ir_data_tmp & (1<<5))        command_rc5 |= (1<<7)
else         command_rc5 &= ~(1<<7)
das zweite Beispiel analog.