#ifndef PWM_OUT_H_
#define PWM_OUT_H_

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

namespace bsp {

/**** Public definitions ****/
class PwmOut
{
	public:
	PwmOut(void);
	~PwmOut(void);
	
	void init(uint8_t pwm_ch, uint8_t max_dc);
	
	void write(uint16_t numerator);
	void write(uint8_t percent);
	uint16_t get_set_duty(void);
	
	#ifndef TESTING
	protected:
	#endif
	uint8_t pwm_ch;
	uint16_t last_duty;
	uint16_t max_dc;
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* PWM_OUT_H_ */