summaryrefslogtreecommitdiff
path: root/src/product
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-07-10 22:41:59 -0700
committerKeith Packard <keithp@keithp.com>2012-07-10 22:41:59 -0700
commit46407f7f3e4d2b6e74b3a2e90b38736a792cfc54 (patch)
treeeb4b15fd39b0d9ed7a2131ef662429b050fa4908 /src/product
parentaa305da7e5dc182c99c09e422c053d85ed48d5d5 (diff)
altos: Force 434.550Mhz by connecting debug gnd and clk (trac #41)
Check for pin P2_2 low at startup and set the frequency to 434.550MHz. This value won't get written to flash, so rebooting again will restore the configured frequency. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/product')
-rw-r--r--src/product/ao_telemini.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/product/ao_telemini.c b/src/product/ao_telemini.c
index fa23de01..21551ee9 100644
--- a/src/product/ao_telemini.c
+++ b/src/product/ao_telemini.c
@@ -18,6 +18,8 @@
#include "ao.h"
#include "ao_pins.h"
+__xdata uint8_t ao_force_freq;
+
void
main(void)
{
@@ -33,6 +35,17 @@ main(void)
ao_led_init(LEDS_AVAILABLE);
ao_led_on(AO_LED_RED);
+ /* A hack -- look at the debug clock pin, if it's sitting at
+ * ground, then we force the computer to idle mode instead of
+ * flight mode
+ */
+ if (P2_2 == 0) {
+ ao_flight_force_idle = 1;
+ ao_force_freq = 1;
+ while (P2_2 == 0)
+ ;
+ }
+
ao_timer_init();
ao_adc_init();
ao_cmd_init();