Code for the button board
The driver's station and Windows itself both seem to see it happily. It
also changes the brightness of the analog LEDs proportionally to the
input value.
Change-Id: Icd277197ccf5f4648d933764b5a69d43e21809e0
diff --git a/motors/peripheral/adc.h b/motors/peripheral/adc.h
index f9ec22a..d855acf 100644
--- a/motors/peripheral/adc.h
+++ b/motors/peripheral/adc.h
@@ -24,13 +24,19 @@
uint16_t wheel_abs;
};
+struct JoystickAdcReadings {
+ uint16_t analog0, analog1, analog2, analog3;
+};
+
void AdcInitMedium();
void AdcInitSmall();
+void AdcInitJoystick();
MediumAdcReadings AdcReadMedium(const DisableInterrupts &);
SmallAdcReadings AdcReadSmall0(const DisableInterrupts &);
SmallAdcReadings AdcReadSmall1(const DisableInterrupts &);
SmallInitReadings AdcReadSmallInit(const DisableInterrupts &);
+JoystickAdcReadings AdcReadJoystick(const DisableInterrupts &);
} // namespace salsa
} // namespace frc971