while(tx_flag!=1)
{os_switch_task();} 