From f982248573c1b646ac53fde980a60ada5404f6aa Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 27 May 2016 20:30:18 -0700 Subject: 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 --- src/drivers/ao_trng_send.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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 #include -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(); -- cgit v1.2.3