#ifndef DCCD_HANDBRAKE_H_
#define DCCD_HANDBRAKE_H_

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

namespace dccd {

/**** Public definitions ****/
class Handbrake
{
	public:		
	Handbrake(void);
	~Handbrake(void);
	
	void init(dccd::DccdHw* dccd_hw);
	
	uint16_t latch_time;
	uint8_t is_active;
		
	uint8_t process(void);
	void cfg_debounce(uint16_t dbnc_time);
	
	#ifdef TESTING
	protected:
	#endif
	dccd::DccdHw* hardware;
	uint8_t hbrake_latch;
	uint16_t start_ts;
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* DCCD_HANDBRAKE_H_ */