diff options
Diffstat (limited to 'openpicc/application/ssc_picc.c')
-rw-r--r-- | openpicc/application/ssc_picc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/openpicc/application/ssc_picc.c b/openpicc/application/ssc_picc.c index 9f0630f..8faa681 100644 --- a/openpicc/application/ssc_picc.c +++ b/openpicc/application/ssc_picc.c @@ -88,10 +88,15 @@ ssc_dma_tx_buffer_t ssc_tx_buffer; static volatile int overflows; static volatile int ssc_buffer_errors; +static volatile int late_frames = 0; int ssc_get_overflows(void) { return 1000*ssc_buffer_errors + overflows; } +int ssc_get_late_frames(void) { + return late_frames; +} + int ssc_count_free(void) { int i,free = 0; for(i=0; i<SSC_DMA_BUFFER_COUNT; i++) { @@ -327,6 +332,9 @@ void ssc_tx_start(ssc_dma_tx_buffer_t *buf) if(AT91F_PIO_IsInputSet(AT91C_BASE_PIOA, OPENPICC_SSC_TF)) { /* TF was probably already high when we enabled the PIO change interrupt for it. */ ssc_tf_irq(OPENPICC_SSC_TF); + vLedBlinkRed(); + late_frames++; + usb_print_string_f("Late response\n\r", 0); } #endif } |