Turn on the HV supply when the OS starts.
Signed-off-by: Keith Packard <keithp@keithp.com>
#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);
ao_usb_init();
+ ao_hv_init();
+
ao_trng_send_init();
ao_led_off(AO_LED_RED);
#define AO_NUM_ADC 1
+/* HV enable */
+
+#define AO_HV_ENABLE_PORT (&stm_gpioa)
+#define AO_HV_ENABLE_BIT 8
+
/* CRC */
#define AO_CRC_WIDTH 32
#define AO_CRC_INIT 0xffffffff