summaryrefslogtreecommitdiff
path: root/include/adc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/adc.h')
-rw-r--r--include/adc.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/adc.h b/include/adc.h
index fe1296cc3b..646298ca76 100644
--- a/include/adc.h
+++ b/include/adc.h
@@ -9,24 +9,24 @@
#define __CROS_EC_ADC_H
#include "common.h"
-#include "board.h"
-/* Data structure to define ADC channels. */
-struct adc_t
-{
- const char* name;
- int sequencer;
- int factor_mul;
- int factor_div;
- int shift;
- int channel;
- int flag;
-};
-
-/* Read ADC channel. */
+/**
+ * Read an ADC channel.
+ *
+ * @param ch Channel to read
+ *
+ * @return The scaled ADC value, or ADC_READ_ERROR if error.
+ */
int adc_read_channel(enum adc_channel ch);
-/* Read all ADC channels. Return non-zero on error. */
+/**
+ * Read all ADC channels.
+ *
+ * @param data Destination array for channel data; must be
+ * ADC_CH_COUNT elements long.
+ *
+ * @return EC_SUCCESS, or non-zero on error.
+ */
int adc_read_all_channels(int *data);
#endif /* __CROS_EC_ADC_H */