diff options
Diffstat (limited to 'firmware/target/arm/olympus/mrobe-500/power-mr500.c')
-rw-r--r-- | firmware/target/arm/olympus/mrobe-500/power-mr500.c | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/firmware/target/arm/olympus/mrobe-500/power-mr500.c b/firmware/target/arm/olympus/mrobe-500/power-mr500.c new file mode 100644 index 0000000000..28fe6a297a --- /dev/null +++ b/firmware/target/arm/olympus/mrobe-500/power-mr500.c | |||
@@ -0,0 +1,93 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id: $ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Karl Kurbjun | ||
11 | * | ||
12 | * All files in this archive are subject to the GNU General Public License. | ||
13 | * See the file COPYING in the source tree root for full license agreement. | ||
14 | * | ||
15 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
16 | * KIND, either express or implied. | ||
17 | * | ||
18 | ****************************************************************************/ | ||
19 | |||
20 | #include "config.h" | ||
21 | #include "cpu.h" | ||
22 | #include <stdbool.h> | ||
23 | #include "kernel.h" | ||
24 | #include "system.h" | ||
25 | #include "power.h" | ||
26 | #include "pcf50606.h" | ||
27 | #include "backlight.h" | ||
28 | #include "backlight-target.h" | ||
29 | |||
30 | #ifndef SIMULATOR | ||
31 | |||
32 | void power_init(void) | ||
33 | { | ||
34 | /* Initialize IDE power pin */ | ||
35 | ide_power_enable(true); | ||
36 | /* Charger detect */ | ||
37 | } | ||
38 | |||
39 | bool charger_inserted(void) | ||
40 | { | ||
41 | return false; | ||
42 | } | ||
43 | |||
44 | /* Returns true if the unit is charging the batteries. */ | ||
45 | bool charging_state(void) { | ||
46 | return false; | ||
47 | } | ||
48 | |||
49 | void ide_power_enable(bool on) | ||
50 | { | ||
51 | if (on) | ||
52 | return; | ||
53 | else | ||
54 | return; | ||
55 | } | ||
56 | |||
57 | bool ide_powered(void) | ||
58 | { | ||
59 | return true; | ||
60 | } | ||
61 | |||
62 | void power_off(void) | ||
63 | { | ||
64 | /* turn off backlight and wait for 1 second */ | ||
65 | __backlight_off(); | ||
66 | sleep(HZ); | ||
67 | /* set SLEEP bit to on in CLKCON to turn off */ | ||
68 | // CLKCON |=(1<<3); | ||
69 | } | ||
70 | |||
71 | #else /* SIMULATOR */ | ||
72 | |||
73 | bool charger_inserted(void) | ||
74 | { | ||
75 | return false; | ||
76 | } | ||
77 | |||
78 | void charger_enable(bool on) | ||
79 | { | ||
80 | (void)on; | ||
81 | } | ||
82 | |||
83 | void power_off(void) | ||
84 | { | ||
85 | } | ||
86 | |||
87 | void ide_power_enable(bool on) | ||
88 | { | ||
89 | (void)on; | ||
90 | } | ||
91 | |||
92 | #endif /* SIMULATOR */ | ||
93 | |||