summaryrefslogtreecommitdiff
path: root/firmware/export/as3514.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/as3514.h')
-rw-r--r--firmware/export/as3514.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h
index 2bbdc2ed66..f3c5c616eb 100644
--- a/firmware/export/as3514.h
+++ b/firmware/export/as3514.h
@@ -22,6 +22,7 @@
22#ifndef _AS3514_H 22#ifndef _AS3514_H
23#define _AS3514_H 23#define _AS3514_H
24 24
25#include "config.h"
25#include <stdbool.h> 26#include <stdbool.h>
26 27
27extern int tenthdb2master(int db); 28extern int tenthdb2master(int db);
@@ -80,4 +81,30 @@ extern void audiohw_set_sample_rate(int sampling_control);
80#define VOLUME_MIN -735 81#define VOLUME_MIN -735
81#define VOLUME_MAX 60 82#define VOLUME_MAX 60
82 83
84/* ADC channels */
85#define NUM_ADC_CHANNELS 13
86
87#define ADC_BVDD 0 /* Battery voltage of 4V LiIo accumulator */
88#define ADC_RTCSUP 1 /* RTC backup battery voltage */
89#define ADC_UVDD 2 /* USB host voltage */
90#define ADC_CHG_IN 3 /* Charger input voltage */
91#define ADC_CVDD 4 /* Charger pump output voltage */
92#define ADC_BATTEMP 5 /* Battery charging temperature */
93#define ADC_MICSUP1 6 /* Voltage on MicSup1 for remote control
94 or external voltage measurement */
95#define ADC_MICSUP2 7 /* Voltage on MicSup1 for remote control
96 or external voltage measurement */
97#define ADC_VBE1 8 /* Measuring junction temperature @ 2uA */
98#define ADC_VBE2 9 /* Measuring junction temperature @ 1uA */
99#define ADC_I_MICSUP1 10 /* Current of MicSup1 for remote control detection */
100#define ADC_I_MICSUP2 11 /* Current of MicSup2 for remote control detection */
101#define ADC_VBAT 12 /* Single cell battery voltage */
102
103#if defined(SANSA_E200) || defined(SANSA_C200) || defined(PHILIPS_SA9200) \
104 || CONFIG_CPU == AS3525
105#define AS3514_I2C_ADDR 0x46
106#else
107#error Unknown target!
108#endif
109
83#endif /* _AS3514_H */ 110#endif /* _AS3514_H */