#ifndef DIGITAL_IN_H_
#define DIGITAL_IN_H_

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

namespace bsp {

/**** Public definitions ****/
class DigitalIn
{	
	public:
	DigitalIn(void);
	~DigitalIn(void);
	
	void init(uint8_t gpio_ch, uint8_t inverted);
	
	uint8_t last_read;
	
	uint8_t read(void);
	
	#ifndef TESTING
	protected:
	#endif
	uint8_t gpio_ch;
	uint8_t is_inverted;
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* DIGITAL_IN_H_ */