diff options
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/ao_cc115l.c | 2 | ||||
-rw-r--r-- | src/drivers/ao_trng_send.c | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/drivers/ao_cc115l.c b/src/drivers/ao_cc115l.c index 0246ba02..24180f34 100644 --- a/src/drivers/ao_cc115l.c +++ b/src/drivers/ao_cc115l.c @@ -70,7 +70,7 @@ struct ao_cc115l_trace { const char *comment; }; -#define NUM_TRACE 256 +#define NUM_TRACE 32 static struct ao_cc115l_trace trace[NUM_TRACE]; static int trace_i; 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(); |