#ifndef REGULATED_OUTPUT_H_
#define REGULATED_OUTPUT_H_

/**** Includes ****/
#include <stdint.h>
#include "../bsp/ain.h"
#include "../bsp/halfbridge.h"

namespace hw {

/**** Public definitions ****/

class RegOut
{
	protected:
	bsp::Hafbridge* hbridge;
	bsp::AnalogIn* supply_voltage;
	bsp::AnalogIn* out_voltage;
	bsp::AnalogIn* out_currnet;
	
	public:
	RegOut(bsp::Hafbridge* hbridge, bsp::AnalogIn* sup_u, bsp::AnalogIn* out_u, bsp::AnalogIn* out_i);
	~RegOut(void);
	
	uint16_t max_voltage;
	uint16_t max_current;
	uint16_t min_voltage;
	
	uint16_t set_voltage;	
	uint16_t out_impedance;
	
	void update(void);
	void enable(void);
	void disable(void);
	uint8_t is_enabled(void);
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* REGULATED_OUTPUT_H_ */