summaryrefslogtreecommitdiff
path: root/openpicc/application/ssc_picc.h
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-26 21:28:19 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-26 21:28:19 +0000
commit6549d8861a943b7c341a03901127d84f1fa41131 (patch)
tree0530145674d4a93948aa849c91de76fb29bf3b63 /openpicc/application/ssc_picc.h
parent7e89cafc042bef23c2c08ac50790b48364b94013 (diff)
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
Diffstat (limited to 'openpicc/application/ssc_picc.h')
-rw-r--r--openpicc/application/ssc_picc.h13
1 files changed, 13 insertions, 0 deletions
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
personal git repositories of Harald Welte. Your mileage may vary