ctr_mcu/snake_trunk/adc.h

49 lines
751 B
C

#ifndef __adc__
#define __adc__
#include "jhl_defs.h"
///////////////////////////////////////
// ANI2 P22
#define ADC_SEL_AMB_BRIT 0x02
/*
// ANI3 P23
#define ADC_SEL_GYRO_YAW 0x03
// ANI4 P24
#define ADC_SEL_GYRO_PITCH 0x04
// ANI5 P25
#define ADC_SEL_GYRO_ROLL 0x05
*/
// ANI6 P26
#define ADC_SEL_3D 0x06
// ANI7 P27
#define ADC_SEL_VOL 0x07
// ANI8 P150
#define ADC_SEL_BATT_TEMP 0x08
// ANI9 P151
#define ADC_SEL_BATT_DET 0x09
///////////////////////////////////////
#define CODEC_REG_VOL 0x13
///////////////////////////////////////
extern u8 vol_polling;
extern u8 vol_level_twl;
///////////////////////////////////////
u8 get_adc( u8 ch );
void vol_reset();
#endif