From 1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 5 Jul 2016 18:03:49 +0200 Subject: Switch from GPLv2 to GPLv2+ Signed-off-by: Keith Packard --- src/cc1111/ao_adc.c | 3 ++- src/cc1111/ao_aes.c | 3 ++- src/cc1111/ao_arch.h | 3 ++- src/cc1111/ao_arch_funcs.h | 3 ++- src/cc1111/ao_battery.c | 3 ++- src/cc1111/ao_beep.c | 3 ++- src/cc1111/ao_button.c | 3 ++- src/cc1111/ao_dbg.c | 3 ++- src/cc1111/ao_dma.c | 3 ++- src/cc1111/ao_exti.c | 3 ++- src/cc1111/ao_exti.h | 3 ++- src/cc1111/ao_intflash.c | 3 ++- src/cc1111/ao_launch.c | 3 ++- src/cc1111/ao_lcd_port.c | 3 ++- src/cc1111/ao_led.c | 3 ++- src/cc1111/ao_pins.h | 3 ++- src/cc1111/ao_radio.c | 3 ++- src/cc1111/ao_reboot.c | 3 ++- src/cc1111/ao_romconfig.c | 3 ++- src/cc1111/ao_serial.c | 3 ++- src/cc1111/ao_spi.c | 3 ++- src/cc1111/ao_string.c | 3 ++- src/cc1111/ao_timer.c | 3 ++- src/cc1111/ao_usb.c | 3 ++- src/cc1111/cc1111.h | 3 ++- 25 files changed, 50 insertions(+), 25 deletions(-) (limited to 'src/cc1111') diff --git a/src/cc1111/ao_adc.c b/src/cc1111/ao_adc.c index 1689ebef..94af5cda 100644 --- a/src/cc1111/ao_adc.c +++ b/src/cc1111/ao_adc.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_aes.c b/src/cc1111/ao_aes.c index b1f305ec..e845a928 100644 --- a/src/cc1111/ao_aes.c +++ b/src/cc1111/ao_aes.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_arch.h b/src/cc1111/ao_arch.h index 6eb1a111..bacfabb8 100644 --- a/src/cc1111/ao_arch.h +++ b/src/cc1111/ao_arch.h @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_arch_funcs.h b/src/cc1111/ao_arch_funcs.h index 1eb506cd..d849655b 100644 --- a/src/cc1111/ao_arch_funcs.h +++ b/src/cc1111/ao_arch_funcs.h @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_battery.c b/src/cc1111/ao_battery.c index b9845fb3..9fb4c26b 100644 --- a/src/cc1111/ao_battery.c +++ b/src/cc1111/ao_battery.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_beep.c b/src/cc1111/ao_beep.c index 3642f4c6..04d10485 100644 --- a/src/cc1111/ao_beep.c +++ b/src/cc1111/ao_beep.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_button.c b/src/cc1111/ao_button.c index a0f221c2..0496a32f 100644 --- a/src/cc1111/ao_button.c +++ b/src/cc1111/ao_button.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_dbg.c b/src/cc1111/ao_dbg.c index 4e534697..ca751b88 100644 --- a/src/cc1111/ao_dbg.c +++ b/src/cc1111/ao_dbg.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_dma.c b/src/cc1111/ao_dma.c index 8779ddf4..18266518 100644 --- a/src/cc1111/ao_dma.c +++ b/src/cc1111/ao_dma.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_exti.c b/src/cc1111/ao_exti.c index 537f6252..e21e417c 100644 --- a/src/cc1111/ao_exti.c +++ b/src/cc1111/ao_exti.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_exti.h b/src/cc1111/ao_exti.h index 49fca5d2..927a4f09 100644 --- a/src/cc1111/ao_exti.h +++ b/src/cc1111/ao_exti.h @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_intflash.c b/src/cc1111/ao_intflash.c index eb3535c6..154b3c25 100644 --- a/src/cc1111/ao_intflash.c +++ b/src/cc1111/ao_intflash.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_launch.c b/src/cc1111/ao_launch.c index 420f7568..4f0a0c14 100644 --- a/src/cc1111/ao_launch.c +++ b/src/cc1111/ao_launch.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_lcd_port.c b/src/cc1111/ao_lcd_port.c index e61b1a60..9b588090 100644 --- a/src/cc1111/ao_lcd_port.c +++ b/src/cc1111/ao_lcd_port.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_led.c b/src/cc1111/ao_led.c index 5beed58d..5fae46c2 100644 --- a/src/cc1111/ao_led.c +++ b/src/cc1111/ao_led.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_pins.h b/src/cc1111/ao_pins.h index 9cbb0a7b..10b1f802 100644 --- a/src/cc1111/ao_pins.h +++ b/src/cc1111/ao_pins.h @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_radio.c b/src/cc1111/ao_radio.c index cead0364..ad337fc5 100644 --- a/src/cc1111/ao_radio.c +++ b/src/cc1111/ao_radio.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_reboot.c b/src/cc1111/ao_reboot.c index 8c47b893..6e1de7a3 100644 --- a/src/cc1111/ao_reboot.c +++ b/src/cc1111/ao_reboot.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_romconfig.c b/src/cc1111/ao_romconfig.c index f3fe61b1..abd51b23 100644 --- a/src/cc1111/ao_romconfig.c +++ b/src/cc1111/ao_romconfig.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_serial.c b/src/cc1111/ao_serial.c index b4f57908..70293b4e 100644 --- a/src/cc1111/ao_serial.c +++ b/src/cc1111/ao_serial.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_spi.c b/src/cc1111/ao_spi.c index fb08f3f5..124e09cb 100644 --- a/src/cc1111/ao_spi.c +++ b/src/cc1111/ao_spi.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_string.c b/src/cc1111/ao_string.c index 85d6383e..dd62ca3d 100644 --- a/src/cc1111/ao_string.c +++ b/src/cc1111/ao_string.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_timer.c b/src/cc1111/ao_timer.c index 2fbc6621..0acef562 100644 --- a/src/cc1111/ao_timer.c +++ b/src/cc1111/ao_timer.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/ao_usb.c b/src/cc1111/ao_usb.c index d9d255f8..7d363c08 100644 --- a/src/cc1111/ao_usb.c +++ b/src/cc1111/ao_usb.c @@ -3,7 +3,8 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; version 2 of the License. + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of diff --git a/src/cc1111/cc1111.h b/src/cc1111/cc1111.h index ac1e71c9..7d7c3a20 100644 --- a/src/cc1111/cc1111.h +++ b/src/cc1111/cc1111.h @@ -5,7 +5,8 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. + the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -- cgit v1.2.3 From 71ddb973ff75680e78fbbef7978ab3893c367629 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 27 Jul 2016 13:24:57 -0700 Subject: altos: Expose cc1200 radio test functions for telemini bringup This exposes the cc1200 radio test function so we can load special test firmware in telemini to do the radio cal as it has no USB to perform that interactively. Signed-off-by: Keith Packard --- src/cc1111/ao_radio.c | 10 +++++----- src/drivers/ao_cc1200.c | 49 ++++++++++++++++++++++++++++++++----------------- src/kernel/ao.h | 6 ++++++ 3 files changed, 43 insertions(+), 22 deletions(-) (limited to 'src/cc1111') diff --git a/src/cc1111/ao_radio.c b/src/cc1111/ao_radio.c index ad337fc5..166d14d5 100644 --- a/src/cc1111/ao_radio.c +++ b/src/cc1111/ao_radio.c @@ -588,13 +588,13 @@ ao_radio_rdf_abort(void) /* Output carrier */ -static __xdata ao_radio_test_on; +static __xdata radio_test_on; void ao_radio_test(uint8_t on) { if (on) { - if (!ao_radio_test_on) { + if (!radio_test_on) { #if HAS_MONITOR ao_monitor_disable(); #endif @@ -606,13 +606,13 @@ ao_radio_test(uint8_t on) #endif ao_radio_get(0xff); RFST = RFST_STX; - ao_radio_test_on = 1; + radio_test_on = 1; } } else { - if (ao_radio_test_on) { + if (radio_test_on) { ao_radio_idle(); ao_radio_put(); - ao_radio_test_on = 0; + radio_test_on = 0; #if HAS_MONITOR ao_monitor_enable(); #endif diff --git a/src/drivers/ao_cc1200.c b/src/drivers/ao_cc1200.c index 1f2a3ba9..2bc99734 100644 --- a/src/drivers/ao_cc1200.c +++ b/src/drivers/ao_cc1200.c @@ -803,18 +803,12 @@ ao_radio_rdf_abort(void) ao_wakeup(&ao_radio_wake); } -static void -ao_radio_test_cmd(void) +static uint8_t radio_on; + +void +ao_radio_test_on(void) { - uint8_t mode = 2; - static uint8_t radio_on; - ao_cmd_white(); - if (ao_cmd_lex_c != '\n') { - ao_cmd_decimal(); - mode = (uint8_t) ao_cmd_lex_u32; - } - mode++; - if ((mode & 2) && !radio_on) { + if (!radio_on) { #if HAS_MONITOR ao_monitor_disable(); #endif @@ -837,12 +831,12 @@ ao_radio_test_cmd(void) #endif radio_on = 1; } - if (mode == 3) { - printf ("Hit a character to stop..."); flush(); - getchar(); - putchar('\n'); - } - if ((mode & 1) && radio_on) { +} + +void +ao_radio_test_off(void) +{ + if (radio_on) { ao_radio_idle(); ao_radio_put(); radio_on = 0; @@ -855,6 +849,27 @@ ao_radio_test_cmd(void) } } +static void +ao_radio_test_cmd(void) +{ + uint8_t mode = 2; + ao_cmd_white(); + if (ao_cmd_lex_c != '\n') { + ao_cmd_decimal(); + mode = (uint8_t) ao_cmd_lex_u32; + } + mode++; + if ((mode & 2)) + ao_radio_test_on(); + if (mode == 3) { + printf ("Hit a character to stop..."); flush(); + getchar(); + putchar('\n'); + } + if ((mode & 1)) + ao_radio_test_off(); +} + void ao_radio_send(const void *d, uint8_t size) { diff --git a/src/kernel/ao.h b/src/kernel/ao.h index 50fd065f..fb41d7a9 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -640,6 +640,12 @@ ao_radio_continuity(uint8_t c); void ao_radio_rdf_abort(void); +void +ao_radio_test_on(void); + +void +ao_radio_test_off(void); + void ao_radio_init(void); -- cgit v1.2.3