summaryrefslogtreecommitdiff
path: root/openpicc/application/ssc_picc.c
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-09 06:00:31 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-12-09 06:00:31 +0000
commit61ae0602b252c367c6c5514b113fdf9bacdddc0b (patch)
treed09c4713e89314a9f97141cf60a82c73585fb71c /openpicc/application/ssc_picc.c
parent4077ce43189067b2498b9fd0e306052ea18ed3fb (diff)
Count and print late frames
Make load modulation level changeable on the fly Better fdt calculation and ajustable fdt offset git-svn-id: https://svn.openpcd.org:2342/trunk@378 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/ssc_picc.c')
-rw-r--r--openpicc/application/ssc_picc.c8
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
}
personal git repositories of Harald Welte. Your mileage may vary