diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-02-23 01:25:09 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-03-01 23:48:44 +0100 |
commit | 5f446da36d410bd321bbeb0ee2290491216ba502 (patch) | |
tree | b49093869718e59e4a838b6e4ea4a6908bc9d012 /src | |
parent | 9b7afc615eb6c85c7765dfc57cdddcf7e728c6eb (diff) |
TRF6151: Add new trf6151_tx_window() function
This function takes care of starting a Tx (Uplink) window
Diffstat (limited to 'src')
-rw-r--r-- | src/target/firmware/include/rf/trf6151.h | 2 | ||||
-rw-r--r-- | src/target/firmware/rf/trf6151.c | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/target/firmware/include/rf/trf6151.h b/src/target/firmware/include/rf/trf6151.h index ea821f5b..77855d06 100644 --- a/src/target/firmware/include/rf/trf6151.h +++ b/src/target/firmware/include/rf/trf6151.h @@ -33,4 +33,6 @@ void trf6151_tx_test(uint16_t arfcn); /* prepare a Rx window with the TRF6151 finished at time 'start' (in qbits) */ void trf6151_rx_window(int16_t start_qbits, uint16_t arfcn, uint8_t vga_dbm, int rf_gain_high); +/* prepare a Tx window with the TRF6151 finished at time 'start' (in qbits) */ +void trf6151_tx_window(int16_t start_qbits, uint16_t arfcn); #endif /* TRF6151_H */ diff --git a/src/target/firmware/rf/trf6151.c b/src/target/firmware/rf/trf6151.c index a155947c..a95fa9a0 100644 --- a/src/target/firmware/rf/trf6151.c +++ b/src/target/firmware/rf/trf6151.c @@ -442,3 +442,18 @@ void trf6151_rx_window(int16_t start_qbits, uint16_t arfcn, uint8_t vga_dbm, int /* FIXME: power down at the right time again */ } + +/* prepare a Tx window with the TRF6151 finished at time 'start' (in qbits) */ +void trf6151_tx_window(int16_t start_qbits, uint16_t arfcn) +{ + int16_t start_pll_qbits; + + /* power up at the right time _before_ the 'start_qbits' point in time */ + start_pll_qbits = add_mod5000(start_qbits, -(TRF6151_TX_PLL_DELAY + TRF6151_RX_TPU_DELAY)); + tpu_enq_at(start_pll_qbits); + + trf6151_set_arfcn(arfcn, 1); + trf6151_set_mode(TRF6151_TX); + + /* FIXME: power down at the right time again */ +} |