#ifndef DIGITAL_OUTPUT_H_
#define DIGITAL_OUTPUT_H_

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

namespace board {

/**** Public definitions ****/
const int8_t DOUT_LOW  = 0;
const int8_t DOUT_HIGH = 1;
const int8_t DOUT_HIZ = -1;

class DigitalOut
{
	protected:
	uint8_t gpio_ch;
	uint8_t invert;
	int8_t last_set;
	
	public:
	DigitalOut(uint8_t gpio_ch, uint8_t inverted);
	~DigitalOut(void);
	
	void write(int8_t level);
	int8_t get_set_level(void);
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* DIGITAL_OUTPUT_H_ */