From 6549d8861a943b7c341a03901127d84f1fa41131 Mon Sep 17 00:00:00 2001 From: henryk Date: Mon, 26 Nov 2007 21:28:19 +0000 Subject: Restructure irq handling for setting tc_fdt (works now) and to get most iso specific stuff out of ssc_picc Add ssc tx code (doesn't work yet) git-svn-id: https://svn.openpcd.org:2342/trunk@355 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- openpicc/application/ssc_picc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'openpicc/application/ssc_picc.h') diff --git a/openpicc/application/ssc_picc.h b/openpicc/application/ssc_picc.h index db3cc00..9ba7ec8 100644 --- a/openpicc/application/ssc_picc.h +++ b/openpicc/application/ssc_picc.h @@ -15,6 +15,7 @@ extern void ssc_fini(void); extern void ssc_rx_stop(void); extern void ssc_rx_unthrottle(void); + enum ssc_mode { SSC_MODE_NONE, SSC_MODE_14443A_SHORT, @@ -26,6 +27,16 @@ enum ssc_mode { extern void ssc_rx_mode_set(enum ssc_mode ssc_mode); +typedef void (*ssc_irq_ext_t)(u_int32_t ssc_sr, enum ssc_mode ssc_mode, u_int8_t* samples); + +/* A fast method to extend the IRQ handler from the higher level code, e.g. to prepare + * an ATQA answer to REQA or WUPA in iso14443_layer3a. Normally I'd use the FreeRTOS + * primitives to wake the task and then do everything in task context, but the delay + * from SSC IRQ to the task returning from xQueueReceive is around 165us. Additionally to the + * delay from end of communication to SSC IRQ which is around 50us. This results in way more delay + * than acceptable for the synchronous responses (around 87us).*/ +extern ssc_irq_ext_t ssc_set_irq_extension(ssc_irq_ext_t ext_handler); + extern portBASE_TYPE ssc_get_overflows(void); extern int ssc_count_free(void); @@ -62,4 +73,6 @@ typedef struct { * rate is approx 4k bytes). */ extern ssc_dma_tx_buffer_t ssc_tx_buffer; +extern void ssc_tx_start(ssc_dma_tx_buffer_t *buf); + #endif -- cgit v1.2.3