diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-09 00:40:55 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-09 00:40:55 +0000 |
commit | 2bf5a3ae4e9356d80d6434e40e1e864ceb08d734 (patch) | |
tree | 2b36dfdfe8699009f4cfd2d71ebbf93329557155 /openpicc/application/ssc.h | |
parent | b5be7c184f7d07b49a04098cd41d980f90f7e699 (diff) |
Fix sending
Add Tx abort and SSC reset functionalities
There is a bug workaround for a peculiarity in the SSC Tx: When it is set to START CONTINOUS while a transmission is in progress (started by START TF RISING EDGE, which is necessary for the correct
timing) it will lose one (or two?) bits of sample data. The resetting of the start condition itself is necessary because the SSC will only transmit up to 64 bytes (32 bit times 16) per start
condition
Add performance counters for sent and received frames
git-svn-id: https://svn.openpcd.org:2342/trunk@445 6dc7ffe9-61d6-0310-9af1-9938baff3ed1
Diffstat (limited to 'openpicc/application/ssc.h')
-rw-r--r-- | openpicc/application/ssc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openpicc/application/ssc.h b/openpicc/application/ssc.h index 2f72e93..9edec64 100644 --- a/openpicc/application/ssc.h +++ b/openpicc/application/ssc.h @@ -12,6 +12,9 @@ typedef enum { METRIC_MANAGEMENT_ERRORS_2, // Internal buffer management error type 2 METRIC_MANAGEMENT_ERRORS_3, // Internal buffer management error type 3 METRIC_LATE_TX_FRAMES, // Frames that only reached the SSC when TF already was high + METRIC_RX_FRAMES, // Frames received + METRIC_TX_FRAMES, // Frames sent + METRIC_TX_ABORTED_FRAMES, // Aborted send frames _MAX_METRICS, } ssc_metric; @@ -26,6 +29,7 @@ typedef enum { CALLBACK_RX_FRAME_ENDED, // *data is ssc_dma_rx_buffer *buffer CALLBACK_TX_FRAME_BEGIN, CALLBACK_TX_FRAME_ENDED, + CALLBACK_TX_FRAME_ABORTED, CALLBACK_SETUP, // *data is ssh_handle_t *sh CALLBACK_TEARDOWN, // *data is ssh_handle_t *sh } ssc_callback_reason; @@ -44,6 +48,9 @@ extern ssc_handle_t* ssc_open(u_int8_t init_rx, u_int8_t init_tx, enum ssc_mode extern int ssc_recv(ssc_handle_t* sh, ssc_dma_rx_buffer_t* *buffer, unsigned int timeout); extern int ssc_send(ssc_handle_t* sh, ssc_dma_tx_buffer_t* buffer); +extern int ssc_send_abort(ssc_handle_t* sh); + +extern void ssc_hard_reset(ssc_handle_t *sh); extern int ssc_close(ssc_handle_t* sh); |