summaryrefslogtreecommitdiff
path: root/openpicc/application/ssc_picc.h
diff options
context:
space:
mode:
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