static void tx_print_config(struct rxtx_data *tx) { unsigned int repetitions, repeat_delay; struct tx_params *tx_params = tx->params; MUTEX_LOCK(&tx->param_lock); repetitions = tx_params->repeat; repeat_delay = tx_params->repeat_delay; MUTEX_UNLOCK(&tx->param_lock); printf("\n"); rxtx_print_state(tx, " State: ", "\n"); rxtx_print_error(tx, " Last error: ", "\n"); rxtx_print_file(tx, " File: ", "\n"); rxtx_print_file_format(tx, " File format: ", "\n"); if (repetitions) { printf(" Repetitions: %u\n", repetitions); } else { printf(" Repetitions: infinite\n"); } if (repeat_delay) { printf(" Repetition delay: %u us\n", repeat_delay); } else { printf(" Repetition delay: none\n"); } rxtx_print_stream_info(tx, " ", "\n"); printf("\n"); }
static void rx_print_config(struct rxtx_data *rx) { size_t n_samples; struct rx_params *rx_params = rx->params; pthread_mutex_lock(&rx->param_lock); n_samples = rx_params->n_samples; pthread_mutex_unlock(&rx->param_lock); rxtx_print_state(rx, " State: ", "\n"); rxtx_print_error(rx, " Last error: ", "\n"); rxtx_print_file(rx, " File: ", "\n"); rxtx_print_file_format(rx, " File format: ", "\n"); if (n_samples) { printf(" # Samples: %" PRIu64 "\n", (uint64_t)n_samples); } else { printf(" # Samples: infinite\n"); } rxtx_print_stream_info(rx, " ", "\n"); printf("\n"); }