#ifndef _GPADC_H_
#define _GPADC_H_

#include "ARMCM0.h"

#define GPADC_CH_MAX	11

typedef enum{
	ONESHOT_MODE,
	AVE_MODE,
}GPADC_MODE;

typedef enum _ADCGP_CHX_{
  ADCGP_CH0    = 0x00,
  ADCGP_CH1,
	ADCGP_CH2,
	ADCGP_CH3,
	ADCGP_CH4,
	ADCGP_CH5,
	ADCGP_CH6,
	ADCGP_CH7,
	ADCGP_CH8,
	ADCGP_CH9,
	ADCGP_CH10,
}ADCGP_CHX;

extern void GPADC_Init(ADCGP_CHX ch,GPADC_MODE adc_mode);
extern void GPADC_start(void (*p_callback)(uint16_t adc));
extern void GPADC_stop(void);
extern void GPADC_channel_sel(uint8_t ch);
extern uint16_t GPADC_get_value(void);

#endif

