blob: 867807c62e0c8b7a9315bc68546463fbca8f5442 [file] [log] [blame]
Austin Schuhb402fd42019-04-13 00:02:53 -07001#ifndef MOTORS_PISTOL_GRIP_CONTROLLER_ADC_H_
2#define MOTORS_PISTOL_GRIP_CONTROLLER_ADC_H_
3
4#include "motors/util.h"
5
6namespace frc971 {
7namespace motors {
8
9struct SmallAdcReadings {
10 uint16_t currents[3];
11};
12
13struct SmallInitReadings {
14 uint16_t motor0_abs;
15 uint16_t motor1_abs;
16 uint16_t wheel_abs;
17};
18
19// Initializes the ADC.
20void AdcInitSmall();
21
22// Reads motor 0.
23SmallAdcReadings AdcReadSmall0(const DisableInterrupts &);
24
25// Reads motor 1.
26SmallAdcReadings AdcReadSmall1(const DisableInterrupts &);
27
28// Reads the absolute encoder values for initialization.
29SmallInitReadings AdcReadSmallInit(const DisableInterrupts &);
30
31} // namespace motors
32} // namespace frc971
33
34#endif // MOTORS_PISTOL_GRIP_CONTROLLER_ADC_H_