diff options
author | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-03 09:18:19 +0000 |
---|---|---|
committer | henryk <henryk@6dc7ffe9-61d6-0310-9af1-9938baff3ed1> | 2008-03-03 09:18:19 +0000 |
commit | d3bab6e9439b7161b7724df0cc902f4adcf1ecce (patch) | |
tree | c160196b7d058ebc3670805540c1bba0d869f357 /openpicc/application/ssc.h | |
parent | 2f730c90916047ec0b419ed9469fa44f537b8ab6 (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.h')
-rw-r--r-- | openpicc/application/ssc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openpicc/application/ssc.h b/openpicc/application/ssc.h index 0d96920..ac74255 100644 --- a/openpicc/application/ssc.h +++ b/openpicc/application/ssc.h @@ -11,18 +11,21 @@ typedef enum { METRIC_MANAGEMENT_ERRORS_1, // Internal buffer management error type 1 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 _MAX_METRICS, } ssc_metric; extern int ssc_get_metric(ssc_metric metric, char **description, int *value); typedef enum { - CALLBACK_RX_STARTED, // *data is ssh_handle_t *sh + CALLBACK_RX_STARTING, // *data is ssh_handle_t *sh CALLBACK_RX_STOPPED, // *data is ssh_handle_t *sh CALLBACK_RX_FRAME_BEGIN, // *data is int *end_asserted // may set *end_asserted = 1 to force tell the IRQ handler // that you have detected the end of reception CALLBACK_RX_FRAME_ENDED, // *data is ssc_dma_rx_buffer *buffer + CALLBACK_TX_FRAME_BEGIN, + CALLBACK_TX_FRAME_ENDED, CALLBACK_SETUP, // *data is ssh_handle_t *sh CALLBACK_TEARDOWN, // *data is ssh_handle_t *sh } ssc_callback_reason; @@ -38,6 +41,7 @@ struct _ssc_handle; typedef struct _ssc_handle ssc_handle_t; extern void ssc_select_clock(enum ssc_clock_source clock); +extern void ssc_set_gate(int data_enabled); extern void ssc_frame_started(void); @@ -45,6 +49,7 @@ extern void ssc_frame_started(void); extern ssc_handle_t* ssc_open(u_int8_t init_rx, u_int8_t init_tx, enum ssc_mode mode , ssc_callback_t callback); 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_close(ssc_handle_t* sh); |