summaryrefslogtreecommitdiff
path: root/openpicc/application/ssc_picc.h
diff options
context:
space:
mode:
authorhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-26 06:20:17 +0000
committerhenryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2007-11-26 06:20:17 +0000
commit16d42d5f6b8df076a04a18ffd13d0defc999c7bf (patch)
tree5ea288cc5c509bdc549690877a68bb03679cb447 /openpicc/application/ssc_picc.h
parent29ea5bbf5b9c3b3679aa40e4ee7029284cb424c6 (diff)
Prepare transmission code
Restructure/add some buffer code Reset the watchdog timer (now at 1.5s), add a watchdog pinger thread git-svn-id: https://svn.openpcd.org:2342/trunk@352 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/ssc_picc.h')
-rw-r--r--openpicc/application/ssc_picc.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/openpicc/application/ssc_picc.h b/openpicc/application/ssc_picc.h
index 813ef33..db3cc00 100644
--- a/openpicc/application/ssc_picc.h
+++ b/openpicc/application/ssc_picc.h
@@ -2,6 +2,7 @@
#define _SSC_H
#include "queue.h"
+#include "iso14443_layer3a.h"
extern void ssc_rx_start(void);
extern void ssc_rx_stop(void);
@@ -29,7 +30,7 @@ extern portBASE_TYPE ssc_get_overflows(void);
extern int ssc_count_free(void);
#define SSC_DMA_BUFFER_SIZE 2048
-#define SSC_DMA_BUFFER_COUNT 10
+#define SSC_DMA_BUFFER_COUNT 4
typedef enum {
FREE=0, /* Buffer is free */
@@ -43,8 +44,22 @@ typedef struct {
u_int32_t len; /* Length of the content */
enum ssc_mode reception_mode;
u_int8_t data[SSC_DMA_BUFFER_SIZE];
-} ssc_dma_buffer_t;
+} ssc_dma_rx_buffer_t;
extern xQueueHandle ssc_rx_queue;
+/* in bytes, used for the sample buffer that holds the subcarrier modulation data at fc/8 = 1695 MHz */
+#define SSC_TX_BUFFER_SIZE ((MAXIMUM_FRAME_SIZE*( (8+1)*2 ) ) + 2 + 2)
+
+typedef struct {
+ volatile ssc_dma_buffer_state_t state;
+ u_int32_t len; /* Length of the content */
+ u_int8_t data[SSC_TX_BUFFER_SIZE];
+} ssc_dma_tx_buffer_t;
+
+/* Declare one TX buffer. This means that only one buffer can ever be pending for sending. That's because
+ * this buffer must be huge (one frame of 256 bytes of subcarrier modulation data at 1695 MHz sample
+ * rate is approx 4k bytes). */
+extern ssc_dma_tx_buffer_t ssc_tx_buffer;
+
#endif
personal git repositories of Harald Welte. Your mileage may vary