summaryrefslogtreecommitdiff
path: root/openpicc/application/ssc_buffer.h
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-03-03 09:18:19 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2008-03-03 09:18:19 +0000
commitd3bab6e9439b7161b7724df0cc902f4adcf1ecce (patch)
treec160196b7d058ebc3670805540c1bba0d869f357 /openpicc/application/ssc_buffer.h
parent2f730c90916047ec0b419ed9469fa44f537b8ab6 (diff)
Implement transmission
Implement a 'pretender' for PoC: Since Rx is not working properly we'll just pretend to have received something based on the approximate length. Clarify length calculations in machester encoder and remove obsolete test code git-svn-id: https://svn.openpcd.org:2342/trunk@437 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/ssc_buffer.h')
-rw-r--r--openpicc/application/ssc_buffer.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/openpicc/application/ssc_buffer.h b/openpicc/application/ssc_buffer.h
index fdb977f..7c79013 100644
--- a/openpicc/application/ssc_buffer.h
+++ b/openpicc/application/ssc_buffer.h
@@ -1,9 +1,14 @@
#ifndef SSC_BUFFER_H_
#define SSC_BUFFER_H_
+#include "iso14443.h"
+
#define SSC_RX_BUFFER_SIZE_AS_UINT8 2048
#define SSC_DMA_BUFFER_COUNT 4
+/* 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)
+
#if SSC_RX_BUFFER_SIZE_AS_UINT8 < DIV_ROUND_UP((ISO14443A_MAX_RX_FRAME_SIZE_IN_BITS*ISO14443A_SAMPLE_LEN),8)
#undef SSC_RX_BUFFER_SIZE_AS_UINT8
#define SSC_RX_BUFFER_SIZE_AS_UINT8 DIV_ROUND_UP((ISO14443A_MAX_RX_FRAME_SIZE_IN_BITS*ISO14443A_SAMPLE_LEN),8)
@@ -39,8 +44,11 @@ typedef struct {
u_int8_t data[SSC_RX_BUFFER_SIZE_AS_UINT8];
} ssc_dma_rx_buffer_t;
-
typedef struct {
+ volatile ssc_dma_buffer_state_t state;
+ u_int32_t len; /* Length of the content in bytes */
+ void *source; /* Source pointer for a prefilled buffer; set to NULL if not used */
+ u_int8_t data[SSC_TX_BUFFER_SIZE_AS_UINT8];
} ssc_dma_tx_buffer_t;
#endif /*SSC_BUFFER_H_*/
personal git repositories of Harald Welte. Your mileage may vary