diff options
author | Nils Wallménius <nils@rockbox.org> | 2007-08-12 19:49:03 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2007-08-12 19:49:03 +0000 |
commit | f28da1a35a6403b153f93f66e3d96e485f89c363 (patch) | |
tree | 760d0c286a65042e18e2165ff555be0d40e80558 /firmware/export/powermgmt.h | |
parent | 90c40b7fea0275e212addf3ae6ac6979f5b4585b (diff) | |
download | rockbox-f28da1a35a6403b153f93f66e3d96e485f89c363.tar.gz rockbox-f28da1a35a6403b153f93f66e3d96e485f89c363.zip |
Enable a lot more features for simulators and add stubs where necessary, simulators should now work with identical lng and voice files as the respective target
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14299 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/powermgmt.h')
-rw-r--r-- | firmware/export/powermgmt.h | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/firmware/export/powermgmt.h b/firmware/export/powermgmt.h index 77764b5a31..4bdaa4387d 100644 --- a/firmware/export/powermgmt.h +++ b/firmware/export/powermgmt.h | |||
@@ -26,6 +26,34 @@ | |||
26 | #define CHARGE_END_LONGD 50 /* stop when N minutes have passed with | 26 | #define CHARGE_END_LONGD 50 /* stop when N minutes have passed with |
27 | * avg delta being < -0.02 V */ | 27 | * avg delta being < -0.02 V */ |
28 | 28 | ||
29 | #if CONFIG_CHARGING >= CHARGING_MONITOR | ||
30 | typedef enum { /* sorted by increasing charging current */ | ||
31 | DISCHARGING = 0, | ||
32 | TRICKLE, /* Can occur for CONFIG_CHARGING >= CHARGING_MONITOR */ | ||
33 | TOPOFF, /* Can occur for CONFIG_CHARGING == CHARGING_CONTROL */ | ||
34 | CHARGING /* Can occur for all CONFIG_CHARGING options */ | ||
35 | } charge_state_type; | ||
36 | |||
37 | /* tells what the charger is doing */ | ||
38 | extern charge_state_type charge_state; | ||
39 | #endif /* CONFIG_CHARGING >= CHARGING_MONITOR */ | ||
40 | |||
41 | #ifdef CONFIG_CHARGING | ||
42 | /* | ||
43 | * Flag that the charger has been plugged in/removed: this is set for exactly | ||
44 | * one time through the power loop when the charger has been plugged in. | ||
45 | */ | ||
46 | typedef enum { | ||
47 | NO_CHARGER, | ||
48 | CHARGER_UNPLUGGED, /* transient state */ | ||
49 | CHARGER_PLUGGED, /* transient state */ | ||
50 | CHARGER | ||
51 | } charger_input_state_type; | ||
52 | |||
53 | /* tells the state of the charge input */ | ||
54 | extern charger_input_state_type charger_input_state; | ||
55 | #endif | ||
56 | |||
29 | #ifndef SIMULATOR | 57 | #ifndef SIMULATOR |
30 | 58 | ||
31 | #if CONFIG_CHARGING == CHARGING_CONTROL | 59 | #if CONFIG_CHARGING == CHARGING_CONTROL |
@@ -61,34 +89,6 @@ extern int trickle_sec; /* trickle charge: How many seconds per minute | |||
61 | 89 | ||
62 | #endif /* CONFIG_CHARGING == CHARGING_CONTROL */ | 90 | #endif /* CONFIG_CHARGING == CHARGING_CONTROL */ |
63 | 91 | ||
64 | #if CONFIG_CHARGING >= CHARGING_MONITOR | ||
65 | typedef enum { /* sorted by increasing charging current */ | ||
66 | DISCHARGING = 0, | ||
67 | TRICKLE, /* Can occur for CONFIG_CHARGING >= CHARGING_MONITOR */ | ||
68 | TOPOFF, /* Can occur for CONFIG_CHARGING == CHARGING_CONTROL */ | ||
69 | CHARGING /* Can occur for all CONFIG_CHARGING options */ | ||
70 | } charge_state_type; | ||
71 | |||
72 | /* tells what the charger is doing */ | ||
73 | extern charge_state_type charge_state; | ||
74 | #endif /* CONFIG_CHARGING >= CHARGING_MONITOR */ | ||
75 | |||
76 | #ifdef CONFIG_CHARGING | ||
77 | /* | ||
78 | * Flag that the charger has been plugged in/removed: this is set for exactly | ||
79 | * one time through the power loop when the charger has been plugged in. | ||
80 | */ | ||
81 | typedef enum { | ||
82 | NO_CHARGER, | ||
83 | CHARGER_UNPLUGGED, /* transient state */ | ||
84 | CHARGER_PLUGGED, /* transient state */ | ||
85 | CHARGER | ||
86 | } charger_input_state_type; | ||
87 | |||
88 | /* tells the state of the charge input */ | ||
89 | extern charger_input_state_type charger_input_state; | ||
90 | #endif | ||
91 | |||
92 | #ifdef HAVE_MMC /* Values for Ondio */ | 92 | #ifdef HAVE_MMC /* Values for Ondio */ |
93 | # define CURRENT_NORMAL 95 /* average, nearly proportional to 1/U */ | 93 | # define CURRENT_NORMAL 95 /* average, nearly proportional to 1/U */ |
94 | # define CURRENT_USB 1 /* host powered in USB mode; avoid zero-div */ | 94 | # define CURRENT_USB 1 /* host powered in USB mode; avoid zero-div */ |