static void reporter(void *user_data, int reason, bert_results_t *results) { switch (reason) { case BERT_REPORT_REGULAR: fprintf(stderr, "BERT report regular - %d bits, %d bad bits, %d resyncs\n", results->total_bits, results->bad_bits, results->resyncs); memcpy(&latest_results, results, sizeof(latest_results)); break; default: fprintf(stderr, "BERT report %s\n", bert_event_to_str(reason)); break; } }
static void reporter(void *user_data, int reason, bert_results_t *results) { int channel; channel = (int) (intptr_t) user_data; printf("BERT report '%s' ", bert_event_to_str(reason)); switch (reason) { case BERT_REPORT_REGULAR: printf("%d bits, %d bad bits, %d resyncs", results->total_bits, results->bad_bits, results->resyncs); break; } printf("\r"); }