#ifndef FUSE_H_
#define FUSE_H_

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

namespace hw {

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

class Fuse
{
	protected:
	bsp::AnalogIn* ain_ch;
	uint16_t oc_counter;
	uint16_t cooldown_counter;
	
	public:
	Fuse(bsp::AnalogIn* ain_ch);
	~Fuse(void);
	
	uint16_t hold_current;
	uint16_t trip_cycles;
	uint8_t warning;
	uint8_t fault;
	uint16_t cooldown_cycles;
	uint8_t retry_cnt;
	
	void update(void);
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* POTENTIOMETER_H_ */