FS#8961 - Anti-Aliased Fonts.
[kugel-rb.git] / firmware / target / arm / imx31 / gigabeat-s / adc-target.h
blob00027e05df435ac7fd86bc66148bffd14ae17e30
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2006 by Barry Wardell
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
21 #ifndef _ADC_TARGET_H_
22 #define _ADC_TARGET_H_
24 /* 16 channels in groups of 8 - each conversion converts 8 channels in
25 * a group of 8 inputs */
26 #define NUM_ADC_CHANNELS 16
28 #define ADC_BATTERY 0 /* Battery Voltage (BATT) */
29 #define ADC_UNUSED1 1 /* Battery Current (BATT-BATTISNS) */
30 #define ADC_APPLICATION_SUPPLY 2 /* Application Supply (BP) */
31 #define ADC_CHARGER_VOLTAGE 3 /* Charger Voltage (CHRGRAW) */
32 #define ADC_CHARGER_CURRENT 4 /* Charger Current (CHRGISNSP-CHRGISNSN) */
33 #define ADC_BATTERY_TEMP 5 /* General Purpose ADIN5 / Battery Pack Thermistor */
34 #define ADC_UNUSED6 6 /* General Purpose ADIN6 / Backup Voltage (LICELL) */
35 #define ADC_UNUSED7 7 /* General Purpose ADIN7 / UID / Die Temperature */
36 #define ADC_HPREMOTE 8 /* General-purpose ADIN8 (Remote control) */
37 #define ADC_UNUSED9 9 /* General-purpose ADIN9 */
38 #define ADC_UNUSED10 10 /* General-purpose ADIN10 */
39 #define ADC_UNUSED11 11 /* General-purpose ADIN11 */
40 #define ADC_UNUSED12 12 /* General-purpose TSX1/Touch screen X-plate 1 */
41 #define ADC_UNUSED13 13 /* General-purpose TSX2/Touch screen X-plate 2 */
42 #define ADC_UNUSED14 14 /* General-purpose TSY1/Touch screen Y-plate 1 */
43 #define ADC_UNUSED15 15 /* General-purpose TSY2/Touch screen Y-plate 2 */
46 #define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */
47 #define ADC_READ_ERROR 0xFFFF
49 void adc_done(void);
50 /* Enable conversion of specified channel (if switchoff is possible) */
51 bool adc_enable_channel(int channel, bool enable);
53 /* Implemented in powermgmt-imx31.c */
54 int battery_adc_charge_current(void);
55 int battery_adc_temp(void);
56 unsigned int application_supply_adc_voltage(void);
57 unsigned int chrgraw_adc_voltage(void);
58 unsigned int cccv_regulator_dissipation(void);
60 #endif