adde functions for switching betwee rx and tx mode