diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2012-01-07 22:32:52 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2012-01-07 22:32:52 +0000 |
commit | 19fba5fb30efaed540478457fb52c0200a748e59 (patch) | |
tree | a303f65341b3f0dd16f4f716d8875861e4666f83 /firmware/target/sh | |
parent | 66149b454bfcff32ea6bb564b8d49fabc5f020d7 (diff) | |
download | rockbox-19fba5fb30efaed540478457fb52c0200a748e59.tar.gz rockbox-19fba5fb30efaed540478457fb52c0200a748e59.zip |
powermgmt-target.h: move prototypes to powermgmt.h
Implement empty stubs if needed instead of empty static inline
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31617 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/sh')
-rw-r--r-- | firmware/target/sh/archos/recorder/powermgmt-recorder.c | 8 | ||||
-rw-r--r-- | firmware/target/sh/archos/recorder/powermgmt-target.h | 14 |
2 files changed, 6 insertions, 16 deletions
diff --git a/firmware/target/sh/archos/recorder/powermgmt-recorder.c b/firmware/target/sh/archos/recorder/powermgmt-recorder.c index 0bce1585cd..1e78b8d155 100644 --- a/firmware/target/sh/archos/recorder/powermgmt-recorder.c +++ b/firmware/target/sh/archos/recorder/powermgmt-recorder.c | |||
@@ -65,6 +65,10 @@ int _battery_voltage(void) | |||
65 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; | 65 | return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; |
66 | } | 66 | } |
67 | 67 | ||
68 | void powermgmt_init_target(void) | ||
69 | { | ||
70 | } | ||
71 | |||
68 | /** Charger control **/ | 72 | /** Charger control **/ |
69 | #ifdef CHARGING_DEBUG_FILE | 73 | #ifdef CHARGING_DEBUG_FILE |
70 | #include "file.h" | 74 | #include "file.h" |
@@ -483,12 +487,12 @@ void charging_algorithm_step(void) | |||
483 | charger_enable(trickle_sec > 0); | 487 | charger_enable(trickle_sec > 0); |
484 | } | 488 | } |
485 | 489 | ||
486 | #ifdef CHARGING_DEBUG_FILE | ||
487 | void charging_algorithm_close(void) | 490 | void charging_algorithm_close(void) |
488 | { | 491 | { |
492 | #ifdef CHARGING_DEBUG_FILE | ||
489 | debug_file_close(); | 493 | debug_file_close(); |
490 | } | ||
491 | #endif /* CHARGING_DEBUG_FILE */ | 494 | #endif /* CHARGING_DEBUG_FILE */ |
495 | } | ||
492 | 496 | ||
493 | /* Returns true if the unit is charging the batteries. */ | 497 | /* Returns true if the unit is charging the batteries. */ |
494 | bool charging_state(void) | 498 | bool charging_state(void) |
diff --git a/firmware/target/sh/archos/recorder/powermgmt-target.h b/firmware/target/sh/archos/recorder/powermgmt-target.h index 7792c05185..6b68d05bd4 100644 --- a/firmware/target/sh/archos/recorder/powermgmt-target.h +++ b/firmware/target/sh/archos/recorder/powermgmt-target.h | |||
@@ -86,18 +86,4 @@ bool charger_enabled(void); | |||
86 | /* Battery filter lengths in samples */ | 86 | /* Battery filter lengths in samples */ |
87 | #define BATT_AVE_SAMPLES 32 | 87 | #define BATT_AVE_SAMPLES 32 |
88 | 88 | ||
89 | /* No init to do */ | ||
90 | #if !(CONFIG_PLATFORM & PLATFORM_HOSTED) | ||
91 | static inline void powermgmt_init_target(void) {} | ||
92 | #endif | ||
93 | void charging_algorithm_step(void); | ||
94 | |||
95 | #ifdef CHARGING_DEBUG_FILE | ||
96 | /* Need to flush and close debug file */ | ||
97 | void charging_algorithm_close(void); | ||
98 | #else | ||
99 | /* No poweroff operation to do */ | ||
100 | static inline void charging_algorithm_close(void) {} | ||
101 | #endif | ||
102 | |||
103 | #endif /* POWERMGMT_TARGET_H */ | 89 | #endif /* POWERMGMT_TARGET_H */ |