diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-12-14 23:13:20 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-12-14 23:13:20 +0000 |
commit | 5a29168eaddaaa47909f2ae84c41d0743996215f (patch) | |
tree | 2767987f0ce4fabcaf3670e232fa81c86a934d81 /openpicc/application/ssc_picc.h | |
parent | e777e32afb32f8863d495eff68ea0a91b0793fac (diff) |
Sanitize and clarify the len handling in rx buffers.
Fix miller decoder
git-svn-id: https://svn.openpcd.org:2342/trunk@387 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/ssc_picc.h')
-rw-r--r-- | openpicc/application/ssc_picc.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/openpicc/application/ssc_picc.h b/openpicc/application/ssc_picc.h index 5eb1160..a01b16d 100644 --- a/openpicc/application/ssc_picc.h +++ b/openpicc/application/ssc_picc.h @@ -48,7 +48,7 @@ typedef enum { } ssc_metric; extern int ssc_get_metric(ssc_metric metric); -#define SSC_DMA_BUFFER_SIZE 2048 +#define SSC_RX_BUFFER_SIZE 2048 #define SSC_DMA_BUFFER_COUNT 4 typedef enum { @@ -60,10 +60,16 @@ typedef enum { } ssc_dma_buffer_state_t; typedef struct { + enum ssc_mode mode; + u_int16_t transfersize; + u_int16_t transfers; +} ssc_mode_def; + +typedef struct { volatile ssc_dma_buffer_state_t state; - u_int32_t len; /* Length of the content */ - enum ssc_mode reception_mode; /* The SSC mode that the buffer has been loaded for (affects element size and count) */ - u_int8_t data[SSC_DMA_BUFFER_SIZE]; + u_int32_t len; /* Length of the content, in samples */ + const ssc_mode_def *reception_mode; /* Pointer to the SSC mode definition that the buffer has been loaded for (affects element size and count) */ + u_int8_t data[SSC_RX_BUFFER_SIZE]; } ssc_dma_rx_buffer_t; extern xQueueHandle ssc_rx_queue; |