summaryrefslogtreecommitdiff
path: root/src/chaoskey-v0.1/ao_chaoskey.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-01-19 18:30:57 -0800
committerKeith Packard <keithp@keithp.com>2016-01-19 18:30:57 -0800
commit02fd767ab60a9957faa2bff29c62ed954abc34e7 (patch)
treef0fa7d34d00457ee7bf13db2010406c7c25c2370 /src/chaoskey-v0.1/ao_chaoskey.c
parente5be0be35f724507d7efff48339a297df73d2641 (diff)
src/chaoskey-v0.1: Add HV enable support
Turn on the HV supply when the OS starts. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/chaoskey-v0.1/ao_chaoskey.c')
-rw-r--r--src/chaoskey-v0.1/ao_chaoskey.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/chaoskey-v0.1/ao_chaoskey.c b/src/chaoskey-v0.1/ao_chaoskey.c
index 48c8bf04..c9490184 100644
--- a/src/chaoskey-v0.1/ao_chaoskey.c
+++ b/src/chaoskey-v0.1/ao_chaoskey.c
@@ -20,6 +20,12 @@
#include <ao_crc.h>
#include <ao_trng_send.h>
+static void
+ao_hv_init(void)
+{
+ ao_enable_output(AO_HV_ENABLE_PORT, AO_HV_ENABLE_BIT, AO_HV_ENABLE_PIN, 1);
+}
+
void main(void)
{
ao_led_init(LEDS_AVAILABLE);
@@ -33,6 +39,8 @@ void main(void)
ao_usb_init();
+ ao_hv_init();
+
ao_trng_send_init();
ao_led_off(AO_LED_RED);