got talking to the ADC working (theoretically)
diff --git a/bbb_cape/src/cape/fill_packet.c b/bbb_cape/src/cape/fill_packet.c
index 5779ae3..0f49bd4 100644
--- a/bbb_cape/src/cape/fill_packet.c
+++ b/bbb_cape/src/cape/fill_packet.c
@@ -12,6 +12,7 @@
#include "cape/bootloader_handoff.h"
#include "cape/gyro.h"
#include "cape/led.h"
+#include "cape/analog.h"
#define TIMESTAMP_TIM TIM6
#define RCC_APB1ENR_TIMESTAMP_TIMEN RCC_APB1ENR_TIM6EN
@@ -47,6 +48,10 @@
packet->main.encoders[5] = encoder_read(5);
packet->main.encoders[6] = encoder_read(6);
packet->main.encoders[7] = encoder_read(7);
+
+ for (int i = 0; i < 8; ++i) {
+ packet->main.analogs[i] = analog_get(i);
+ }
}
// Fills the new packet with data.
@@ -78,6 +83,7 @@
crc_init();
led_init();
+ analog_init();
encoder_init();
gyro_init();