#ifndef ANALOG_IN_H_
#define ANALOG_IN_H_

/**** Includes ****/
#include <stdint.h>

namespace bsp {

/**** Public definitions ****/
static const uint8_t DEF_AIN_MUL = 215;
static const uint8_t DEF_AIN_DIV = 44;
static const int16_t DEF_AIN_OFFSET = 0;

class AnalogIn
{	
	public:
	AnalogIn(void);
	~AnalogIn(void);
	
	void init(uint8_t adc_ch);
	
	uint8_t mul;
	uint8_t div;
	int16_t offset;
	uint16_t last_read;
	
	uint16_t read(void);
	
	#ifndef TESTING
	protected:
	#endif
	uint8_t adc_ch;
};

/**** Public function declarations ****/

#ifdef TESTING
#endif

} //namespace

#endif /* ANALOG_IN_H_ */