#ifndef UDCCD_BOARD_H_
#define UDCCD_BOARD_H_

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

#include "ain.h"
#include "ain_lpf.h"
#include "din.h"
#include "dout.h"
#include "pwm_out.h"

namespace bsp {

/**** Public definitions ****/
class Board
{	
	public:
	typedef struct {
		uint8_t pwm_f_khz;
		uint8_t od_common_is_pwm;
	} boardCfg_t;
	
	Board(void);
	~Board(void);
	
	void init(boardCfg_t* cfg);
	
	AnalogIn out_voltage;
	AnalogIn out_current;
	AnalogIn battery_voltage;
	AnalogIn battery_current;
	AnalogIn ain1;
	AnalogIn ain2;
	
	DigitalIn din1;
	DigitalIn din2;
	DigitalIn din3;
	DigitalIn din4;
	DigitalIn hvdin1;
	DigitalIn hvdin2;
	DigitalIn hvdin3;
	
	DigitalOut hvdin3_pull;	
	DigitalOut freq_pull;
	
	DigitalOut od1;
	DigitalOut od2;
	DigitalOut od3;
	DigitalOut od4;
	DigitalOut od5;
	DigitalOut od6;
	PwmOut od_pwm;
	
	PwmOut out_pwm;
	DigitalOut out_low;
	
	Memory nvmem;
	
	void read(void);

	#ifndef TESTING
	protected:
	#endif
};

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

#ifdef TESTING
#endif

} //namespace

#endif /* UDCCD_BOARD_H_ */