#define NUM_USBCHARGE_IDENTIFY_TIMES ((USBCHARGE_IDENTIFY_TIMES * 1000) / TIMER_MS_COUNTS) //³äµçÂú״̬³ÖÐøʱ¼ä³¤¶È
#define BAT_2V5_VALUE 2500
-#define BATT_MAX_VOL_VALUE 8284 // 4180 //ÂúµçʱµÄµç³Øµçѹ
-#define BATT_ZERO_VOL_VALUE 6800 // 3500 //¹Ø»úʱµÄµç³Øµçѹ
-#define BATT_NOMAL_VOL_VALUE 7600 // 3800
-//¶¨ÒåADC²ÉÑù·Öѹµç×裬ÒÔʵ¼ÊֵΪ׼£¬µ¥Î»K
-#define BAT_PULL_UP_R 300 ////200
-
-#define BAT_PULL_DOWN_R 100// 200
-#define adc_to_voltage(adc_val) ((adc_val * BAT_2V5_VALUE * (BAT_PULL_UP_R + BAT_PULL_DOWN_R)) / (1024 * BAT_PULL_DOWN_R))
#define BATT_NUM 52
#define BATT_FILENAME "/data/bat_last_capacity.dat"
#ifdef CONFIG_BATTERY_RK30_VOL3V8
+#define BATT_MAX_VOL_VALUE 4120 //ÂúµçʱµÄµç³Øµçѹ
+#define BATT_ZERO_VOL_VALUE 3400 //¹Ø»úʱµÄµç³Øµçѹ
+#define BATT_NOMAL_VOL_VALUE 3800
+
+//¶¨ÒåADC²ÉÑù·Öѹµç×裬ÒÔʵ¼ÊֵΪ׼£¬µ¥Î»K
+
+#define BAT_PULL_UP_R 200
+
+#define BAT_PULL_DOWN_R 200
+
static struct batt_vol_cal batt_table[BATT_NUM] = {
{0,3400,3520},{1,3420,3525},{2,3420,3575},{3,3475,3600},{5,3505,3620},{7,3525,3644},
{9,3540,3662},{11,3557,3670},{13,3570,3684},{15,3580,3700},{17,3610,3715},
/*******************************************************************************/
#else
+#define BATT_MAX_VOL_VALUE 8284 //ÂúµçʱµÄµç³Øµçѹ
+#define BATT_ZERO_VOL_VALUE 6800 //¹Ø»úʱµÄµç³Øµçѹ
+#define BATT_NOMAL_VOL_VALUE 7600
+
+//¶¨ÒåADC²ÉÑù·Öѹµç×裬ÒÔʵ¼ÊֵΪ׼£¬µ¥Î»K
+
+#define BAT_PULL_UP_R 300
+
+#define BAT_PULL_DOWN_R 100
+
static struct batt_vol_cal batt_table[BATT_NUM] = {
{0,6800,7400}, {1,6840,7440}, {2,6880,7480}, {3,6950,7450}, {5,7010,7510}, {7,7050,7550},
{9,7080,7580}, {11,7104,7604}, {13,7140,7640}, {15,7160,7660}, {17,7220,7720},
};
#endif
+
+#define adc_to_voltage(adc_val) ((adc_val * BAT_2V5_VALUE * (BAT_PULL_UP_R + BAT_PULL_DOWN_R)) / (1024 * BAT_PULL_DOWN_R))
+
/********************************************************************************/
extern int dwc_vbus_status(void);