diff options
Diffstat (limited to 'software')
-rw-r--r-- | software/rda1846dongle/rda1846dongle.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/software/rda1846dongle/rda1846dongle.c b/software/rda1846dongle/rda1846dongle.c index 71b79e0..8316d62 100644 --- a/software/rda1846dongle/rda1846dongle.c +++ b/software/rda1846dongle/rda1846dongle.c @@ -158,35 +158,37 @@ static void print_dtmf(void) static void handle_cmd(uint8_t cmd) { switch(cmd) { - case '0': rda1846_gpio_AA(); led_off(); printf("led OFF\r\n"); break; - case '1': rda1846_gpio_55(); led_on(); printf("led ON\r\n"); break; + case '0': led_off(); printf("led OFF\r\n"); break; + case '1': led_on(); printf("led ON\r\n"); break; case 't': led_toggle(); printf("led TOGGLE\r\n"); break; case '!': rda1846_soft_reset(); reset2bootloader(); break; case 'r': reset_rda(); break; case 'i': reinit_rda(); break; - case 'F': set_default_freq(); break; case '2': set_band(b_2m); break; case '7': set_band(b_70cm); break; case 'b': set_bw(bw_12k5); break; case 'B': set_bw(bw_25k); break; + case 'F': set_default_freq(); break; + case '+': current_freq_kHz+=25; update_current_freq(); break; + case '-': current_freq_kHz-=25; update_current_freq(); break; + + case 'P': rda1846_powerdown(); print_status(); break; + case 'I': rda1846_idle(); print_status(); break; + case 'R': rda1846_receive(); print_status(); break; + case 'T': rda1846_transmit(); print_status(); break; case 'g': rda1846_gpio_off(); printf("GPIO off\r\n"); break; case 'G': rda1846_gpio_default(); printf("GPIO to defaults\r\n"); break; + case '5': rda1846_gpio_55(); break; + case 'a': rda1846_gpio_AA(); break; case 'f': print_actual_freq(); break; case 's': print_status(); break; case 'd': print_dtmf(); break; case 'D': rda1846_dump_register(); break; - case 'P': rda1846_powerdown(); print_status(); break; - case 'I': rda1846_idle(); print_status(); break; - case 'R': rda1846_receive(); print_status(); break; - case 'T': rda1846_transmit(); print_status(); break; - - case '+': current_freq_kHz+=25; update_current_freq(); break; - case '-': current_freq_kHz-=25; update_current_freq(); break; default: printf("\r\n"); return; } } |