summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8702/ipod6g/pmu-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/s5l8702/ipod6g/pmu-target.h')
-rw-r--r--firmware/target/arm/s5l8702/ipod6g/pmu-target.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/firmware/target/arm/s5l8702/ipod6g/pmu-target.h b/firmware/target/arm/s5l8702/ipod6g/pmu-target.h
new file mode 100644
index 0000000000..a8c7851d97
--- /dev/null
+++ b/firmware/target/arm/s5l8702/ipod6g/pmu-target.h
@@ -0,0 +1,46 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id: pmu-target.h 24721 2010-02-17 15:54:48Z theseven $
9 *
10 * Copyright © 2009 Michael Sparmann
11 *
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.
16 *
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
19 *
20 ****************************************************************************/
21
22#ifndef __PMU_TARGET_H__
23#define __PMU_TARGET_H__
24
25#include <stdbool.h>
26#include "config.h"
27
28unsigned char pmu_read(int address);
29int pmu_write(int address, unsigned char val);
30int pmu_read_multiple(int address, int count, unsigned char* buffer);
31int pmu_write_multiple(int address, int count, unsigned char* buffer);
32int pmu_read_adc(unsigned int adc);
33int pmu_read_battery_voltage(void);
34int pmu_read_battery_current(void);
35void pmu_init(void);
36void pmu_ldo_on_in_standby(unsigned int ldo, int onoff);
37void pmu_ldo_set_voltage(unsigned int ldo, unsigned char voltage);
38void pmu_ldo_power_on(unsigned int ldo);
39void pmu_ldo_power_off(unsigned int ldo);
40void pmu_set_wake_condition(unsigned char condition);
41void pmu_enter_standby(void);
42void pmu_read_rtc(unsigned char* buffer);
43void pmu_write_rtc(unsigned char* buffer);
44void pmu_hdd_power(bool on);
45
46#endif