| Rev 1966 | Rev 1967 | ||
|---|---|---|---|
| Line 96... | Line 96... | ||
| 96 | unsigned int32 TDC_get_measurement(int num) |
96 | unsigned int32 TDC_get_measurement(int num) |
| 97 | { |
97 | { |
| 98 | unsigned int32 ret; |
98 | unsigned int32 ret; |
| 99 | |
99 | |
| 100 | output_low(TDC_ENABLE); |
100 | output_low(TDC_ENABLE); |
| 101 | spi_xfer(TDC_stream,0xB0 + num, 8); |
101 | spi_xfer(TDC_stream,0xB0 + num - 1, 8); |
| 102 | ret=spi_xfer(TDC_stream,0,32); |
102 | ret=spi_xfer(TDC_stream,0,32); |
| 103 | output_high(TDC_ENABLE); |
103 | output_high(TDC_ENABLE); |
| 104 | return ret; |
104 | return ret; |
| 105 | } |
105 | } |
| 106 | |
106 | |