From 290884990881f61aa0906a2483d5f6c14bd6ec3e Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Sun, 17 Jul 2011 12:05:07 +0200 Subject: [PATCH] fw/apps: Remove manual gain control with keyboard - It's broken by the use of compute_gain - Since there is now an AGC loop, manually setting the register as no effect. If someone needs manual gain control for testing, he'll have to re-implement a proper AGC override. Signed-off-by: Sylvain Munaut --- src/target/firmware/apps/l1test/main.c | 27 -------------------------- src/target/firmware/apps/layer1/main.c | 27 -------------------------- 2 files changed, 54 deletions(-) diff --git a/src/target/firmware/apps/l1test/main.c b/src/target/firmware/apps/l1test/main.c index fc51acd..d1ca3d6 100644 --- a/src/target/firmware/apps/l1test/main.c +++ b/src/target/firmware/apps/l1test/main.c @@ -203,19 +203,8 @@ int main(void) twl3025_power_off(); } -static int8_t vga_gain = 40; -static int high_gain = 0; static int afcout = 0; -static void update_vga_gain(void) -{ - printf("VGA Gain: %u %s\n", vga_gain, high_gain ? "HIGH" : "LOW"); - trf6151_compute_gain(vga_gain, high_gain); - tpu_enq_sleep(); - tpu_enable(1); - tpu_wait_idle(); -} - static void tspact_toggle(uint8_t num) { printf("TSPACT%u toggle\n", num); @@ -231,22 +220,6 @@ static void key_handler(enum key_codes code, enum key_states state) return; switch (code) { - case KEY_1: /* VGA gain decrement */ - vga_gain -= 2; - if (vga_gain < 14) - vga_gain = 14; - update_vga_gain(); - break; - case KEY_2: /* High/Low Rx gain */ - high_gain ^= 1; - update_vga_gain(); - break; - case KEY_3: /* VGA gain increment */ - vga_gain += 2; - if (vga_gain > 40) - vga_gain = 40; - update_vga_gain(); - break; case KEY_4: tspact_toggle(6); /* TRENA (RFFE) */ break; diff --git a/src/target/firmware/apps/layer1/main.c b/src/target/firmware/apps/layer1/main.c index db76098..8eaf4a6 100644 --- a/src/target/firmware/apps/layer1/main.c +++ b/src/target/firmware/apps/layer1/main.c @@ -87,19 +87,8 @@ int main(void) twl3025_power_off(); } -static int8_t vga_gain = 40; -static int high_gain = 0; static int afcout = 0; -static void update_vga_gain(void) -{ - printf("VGA Gain: %u %s\n", vga_gain, high_gain ? "HIGH" : "LOW"); - trf6151_compute_gain(vga_gain, high_gain); - tpu_enq_sleep(); - tpu_enable(1); - tpu_wait_idle(); -} - static void tspact_toggle(uint8_t num) { printf("TSPACT%u toggle\n", num); @@ -115,22 +104,6 @@ static void key_handler(enum key_codes code, enum key_states state) return; switch (code) { - case KEY_1: /* VGA gain decrement */ - vga_gain -= 2; - if (vga_gain < 14) - vga_gain = 14; - update_vga_gain(); - break; - case KEY_2: /* High/Low Rx gain */ - high_gain ^= 1; - update_vga_gain(); - break; - case KEY_3: /* VGA gain increment */ - vga_gain += 2; - if (vga_gain > 40) - vga_gain = 40; - update_vga_gain(); - break; case KEY_4: tspact_toggle(6); /* TRENA (RFFE) */ break; -- 2.20.1