#ifndef DCCD_COIL_REG_H_
#define DCCD_COIL_REG_H_

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

namespace dccd {

/**** Public definitions ****/
class CoilReg
{
	public:	
	CoilReg(void);
	~CoilReg(void);
	
	void init(dccd::DccdHw* dccd_hw);
	
	uint16_t lock_current;
	uint16_t ref_resistance;
	uint16_t cc_max_resistance;
	uint16_t cc_min_resistance;
	uint8_t disable_protection;
	
	int8_t target_force;
	
	void process(void);
	uint8_t read_act_force(void);
	void cfg_set_cv_mode(void);
	void cfg_set_cc_mode(void);
	uint8_t is_fault(void);

	#ifdef TESTING
	protected:
	#endif
	dccd::DccdHw* hardware;
	int8_t set_force;
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* DCCD_COIL_REG_H_ */