Files
OpenCellular/include/adc.h
David Hendricks af9532d6fe Add forward declarations in ADC and temp_sensor headers
This is a trivial patch to fix compilation for boards that are not
based on LM4 (e.g. Discovery).

Signed-off-by: David Hendricks <dhendrix@chromium.org>

TEST=Compiled for Discovery
BUG=None

Change-Id: Ia1f29c61ff4a1f65fe65c43a8e58def7d1217ab2
2012-02-06 13:36:19 -08:00

37 lines
683 B
C

/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* ADC interface for Chrome EC */
#ifndef __CROS_EC_ADC_H
#define __CROS_EC_ADC_H
#include "common.h"
#include "board.h"
#include "gpio.h"
/* forward declaration */
enum adc_channel;
/* 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;
};
/* Initializes the module. */
int adc_init(void);
/* Read ADC channel. */
int adc_read_channel(enum adc_channel ch);
#endif /* __CROS_EC_ADC_H */