summaryrefslogtreecommitdiff
path: root/openpicc
diff options
context:
space:
mode:
Diffstat (limited to 'openpicc')
-rw-r--r--openpicc/application/ssc.c7
-rw-r--r--openpicc/application/ssc_buffer.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/openpicc/application/ssc.c b/openpicc/application/ssc.c
index d1d4e48..6c53ebd 100644
--- a/openpicc/application/ssc.c
+++ b/openpicc/application/ssc.c
@@ -478,6 +478,7 @@ out:
taskEXIT_CRITICAL();
}
+#if SSC_DMA_BUFFER_COUNT > 0
static inline int _init_ssc_rx(ssc_handle_t *sh)
{
tc_cdiv_sync_init();
@@ -524,6 +525,7 @@ static inline int _init_ssc_rx(ssc_handle_t *sh)
out_fail_queue:
return 0;
}
+#endif
static inline int _init_ssc_tx(ssc_handle_t *sh)
{
@@ -602,11 +604,16 @@ ssc_handle_t* ssc_open(u_int8_t init_rx, u_int8_t init_tx, enum ssc_mode mode, s
}
if(init_rx) {
+#if SSC_DMA_BUFFER_COUNT > 0
sh->rx_enabled = _init_ssc_rx(sh);
if(!sh->rx_enabled) {
ssc_close(sh);
return NULL;
}
+#else
+ ssc_close(sh);
+ return NULL;
+#endif
}
if(sh->rx_enabled || sh->tx_enabled) {
diff --git a/openpicc/application/ssc_buffer.h b/openpicc/application/ssc_buffer.h
index 7c79013..5365851 100644
--- a/openpicc/application/ssc_buffer.h
+++ b/openpicc/application/ssc_buffer.h
@@ -4,7 +4,7 @@
#include "iso14443.h"
#define SSC_RX_BUFFER_SIZE_AS_UINT8 2048
-#define SSC_DMA_BUFFER_COUNT 4
+#define SSC_DMA_BUFFER_COUNT 0
/* in bytes, used for the sample buffer that holds the subcarrier modulation data at fc/8 = 1695 MHz */
#define SSC_TX_BUFFER_SIZE_AS_UINT8 ((MAXIMUM_FRAME_SIZE*( (8+1)*2 ) ) + 2 + 2)
personal git repositories of Harald Welte. Your mileage may vary