Files
uDCCD/firmware/src/hw/potentiometer.h
2024-04-11 23:03:33 +03:00

35 lines
550 B
C++

#ifndef POTENTIOMETER_H_
#define POTENTIOMETER_H_
/**** Includes ****/
#include <stdint.h>
#include "../bsp/ain.h"
namespace hw {
/**** Public definitions ****/
class Potentiometer
{
protected:
bsp::AnalogIn* ain_ch;
public:
Potentiometer(bsp::AnalogIn* ain_ch, uint16_t low_deadzone, uint16_t high_deadzone);
~Potentiometer(void);
uint16_t low_deadzone;
uint16_t high_deadzone;
uint8_t percent;
uint8_t update(void);
};
/**** Public function declarations ****/
#ifdef TESTING
#endif
} //namespace
#endif /* POTENTIOMETER_H_ */