diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-02-23 01:34:47 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-03-01 23:48:44 +0100 |
commit | 330fe01d803655c395676cf030e8f12087c8835d (patch) | |
tree | db30ffd969446f271762284c79bd7a8e7a0124fe /src/target/firmware/abb | |
parent | 5f446da36d410bd321bbeb0ee2290491216ba502 (diff) |
Uplink: Use TPU window driven model
This means we can even send and receive in the same TDMA frame,
provided we keep the usual 3 timeslot distance between DL and UL.
Diffstat (limited to 'src/target/firmware/abb')
-rw-r--r-- | src/target/firmware/abb/twl3025.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/target/firmware/abb/twl3025.c b/src/target/firmware/abb/twl3025.c index 24149a7e..01817130 100644 --- a/src/target/firmware/abb/twl3025.c +++ b/src/target/firmware/abb/twl3025.c @@ -245,6 +245,9 @@ void twl3025_downlink(int on, int16_t at) } } +/* bdl_ena - 35 - TSP_DELAY - BULCAL_DURATION - TSP_DELAY - BULON_TO_BULCAL - TSP_DELAY */ +#define UPLINK_DELAY (3 * TSP_DELAY + BULCAL_DURATION + BULON_TO_BULCAL + 35) + void twl3025_uplink(int on, int16_t at) { int16_t bul_ena = at - TSP_DELAY - 6; @@ -252,12 +255,19 @@ void twl3025_uplink(int on, int16_t at) if (bul_ena < 0) printf("BULENA time negative (%d)\n", bul_ena); if (on) { - /* FIXME: calibration should be done just before BULENA */ + /* calibration should be done just before BULENA */ + tpu_enq_at(bul_ena - UPLINK_DELAY); + /* bdl_ena - 35 - TSP_DELAY - BULCAL_DURATION - TSP_DELAY - BULON_TO_BULCAL - TSP_DELAY */ twl3025_tsp_write(BULON); + /* bdl_ena - 35 - TSP_DELAY - BULCAL_DURATION - TSP_DELAY - BULON_TO_BULCAL */ tpu_enq_wait(BULON_TO_BULCAL - TSP_DELAY); + /* bdl_ena - 35 - TSP_DELAY - BULCAL_DURATION - TSP_DELAY */ twl3025_tsp_write(BULON | BULCAL); + /* bdl_ena - 35 - TSP_DELAY - BULCAL_DURATION */ tpu_enq_wait(BULCAL_DURATION - TSP_DELAY); + /* bdl_ena - 35 - TSP_DELAY */ twl3025_tsp_write(BULON); + /* bdl_ena - 35 */ tpu_enq_wait(35); /* minimum time required to bring the ramp up (really needed?) */ tpu_enq_at(bul_ena); twl3025_tsp_write(BULON | BULENA); |