#ifndef HALFBRIDGE_H_
#define HALFBRIDGE_H_

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

namespace board {

/**** Public definitions ****/
class Hafbridge
{
	protected:
	uint8_t pwm_ch;
	uint8_t gpio_ch;
	uint8_t last_duty;
	uint8_t enabled;
	uint8_t max_dc;
	
	public:
	Hafbridge(uint8_t hs_pwm_ch, uint8_t ls_gpio_ch, uint8_t max_dc);
	~Hafbridge(void);
	
	void write(uint8_t duty);
	void enable(void);
	void disable(void);
	uint8_t get_set_duty(void);
	uint8_t is_enabled(void);
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* HALFBRIDGE_H_ */