summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-27 20:30:18 -0700
committerKeith Packard <keithp@keithp.com>2016-05-27 20:30:18 -0700
commitf982248573c1b646ac53fde980a60ada5404f6aa (patch)
treef149ab459c4ccf296e1dc74cdd8e83d8c05d73ed /src
parentf5944ba4eb3f419f8cad461872d048b5adf7b566 (diff)
altosuilib: Fill preload map on site or lat/lon change
This loads the map view with the selected area when the site entry is changed or the user hits return in the lat/lon fields. This lets you see the target launch site without having to load the whole preload set. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/ao_trng_send.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/drivers/ao_trng_send.c b/src/drivers/ao_trng_send.c
index 171a345f..4ac6ee5e 100644
--- a/src/drivers/ao_trng_send.c
+++ b/src/drivers/ao_trng_send.c
@@ -22,7 +22,7 @@
#include <ao_exti.h>
#include <ao_power.h>
-static struct ao_task ao_trng_send_task, ao_trng_send_raw_task;
+static struct ao_task ao_trng_send_task;
static uint8_t trng_running;
static AO_TICK_TYPE trng_power_time;
@@ -30,6 +30,10 @@ static AO_TICK_TYPE trng_power_time;
static uint8_t random_mutex;
+#if AO_USB_HAS_IN2
+
+static struct ao_task ao_trng_send_raw_task;
+
static void
ao_trng_get_raw(uint16_t *buf)
{
@@ -90,6 +94,8 @@ ao_trng_send_raw(void)
}
}
+#endif
+
/* Make sure there's at least 8 bits of variance in the samples */
#define MIN_VARIANCE (128 * 128)
@@ -181,7 +187,9 @@ ao_trng_send(void)
if (failed > AO_TRNG_START_CHECK / 4)
ao_panic(AO_PANIC_DMA);
+#if AO_USB_HAS_IN2
ao_add_task(&ao_trng_send_raw_task, ao_trng_send_raw, "trng_send_raw");
+#endif
#ifdef AO_USB_START_DISABLED
ao_usb_enable();