diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-11-21 00:30:19 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2007-11-21 00:30:19 +0000 |
commit | 5cc0ed498f99d3b23c6f1b87a9a2fdcbb05dd1a9 (patch) | |
tree | e0f681d5a7fc06f192abdac3961ab39e08f98592 /openpicc/application/ssc_picc.h | |
parent | ac77f6b5c53c4f2afb97564d1d281c5fdc429409 (diff) |
Checking in status quo: Can currently receive and print frames in ssc continuous mode (with new short and incomplete ssc irq handler: FIXME, either switch back to original handler (maybe fixing it
if necessary) or handle the missing cases in the new handler). Lots of debug statements still in there
git-svn-id: https://svn.openpcd.org:2342/trunk@335 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/ssc_picc.h')
-rw-r--r-- | openpicc/application/ssc_picc.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/openpicc/application/ssc_picc.h b/openpicc/application/ssc_picc.h index 0ba15d0..34bdc18 100644 --- a/openpicc/application/ssc_picc.h +++ b/openpicc/application/ssc_picc.h @@ -1,6 +1,8 @@ #ifndef _SSC_H #define _SSC_H +#include "queue.h" + extern void ssc_rx_start(void); extern void ssc_rx_stop(void); @@ -23,4 +25,25 @@ enum ssc_mode { extern void ssc_rx_mode_set(enum ssc_mode ssc_mode); +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 + +typedef enum { + FREE=0, /* Buffer is free */ + PENDING, /* Buffer has been given to the DMA controller and is currently being filled */ + FULL, /* DMA controller signalled that the buffer is full */ + PROCESSING /* The buffer is currently processed by the consumer (e.g. decoder) */ +} ssc_dma_buffer_state_t; + +typedef struct { + volatile ssc_dma_buffer_state_t state; + u_int32_t len; /* Length of the content */ + u_int8_t data[SSC_DMA_BUFFER_SIZE]; +} ssc_dma_buffer_t; + +extern xQueueHandle ssc_rx_queue; + #endif |