summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/rf
diff options
context:
space:
mode:
authorHarald Welte2010-02-23 01:25:09 +0100
committerHarald Welte2010-03-01 23:48:44 +0100
commit5f446da36d410bd321bbeb0ee2290491216ba502 (patch)
treeb49093869718e59e4a838b6e4ea4a6908bc9d012 /src/target/firmware/rf
parenttwl3025: fix typo (diff)
downloadosmocom-5f446da36d410bd321bbeb0ee2290491216ba502.tar.gz
osmocom-5f446da36d410bd321bbeb0ee2290491216ba502.tar.xz
osmocom-5f446da36d410bd321bbeb0ee2290491216ba502.zip
TRF6151: Add new trf6151_tx_window() function
This function takes care of starting a Tx (Uplink) window
Diffstat (limited to 'src/target/firmware/rf')
-rw-r--r--src/target/firmware/rf/trf6151.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/target/firmware/rf/trf6151.c b/src/target/firmware/rf/trf6151.c
index a155947..a95fa9a 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 */
+}