summaryrefslogtreecommitdiff
path: root/openpicc
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-03-12 17:32:45 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-03-12 17:32:45 +0000
commitc319d646a7961442b94ee798d5a3b3bf62d8a720 (patch)
treecf01b5e6606ee4f6031cc6b09032ef78b5a85097 /openpicc
parent274518e5d989ff2ba83493825ee2531c947d04e3 (diff)
Remove SSC DMA Rx buffers that are not going to be used for now and take up precious RAM
git-svn-id: https://svn.openpcd.org:2342/trunk@450 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
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