diff options
-rw-r--r-- | firmware/export/config-e200.h | 6 | ||||
-rw-r--r-- | firmware/target/arm/sandisk/sansa-e200/power-e200.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h index 1bbdd6021e..e055373567 100644 --- a/firmware/export/config-e200.h +++ b/firmware/export/config-e200.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #define TARGET_TREE /* this target is using the target tree system */ | 4 | #define TARGET_TREE /* this target is using the target tree system */ |
5 | 5 | ||
6 | /* For Rolo and boot loader */ | 6 | /* For Rolo and boot loader */ |
7 | #define MODEL_NUMBER 12 | 7 | #define MODEL_NUMBER 16 |
8 | 8 | ||
9 | /* define this if you have recording possibility */ | 9 | /* define this if you have recording possibility */ |
10 | /*#define HAVE_RECORDING 1*/ /* TODO: add support for this */ | 10 | /*#define HAVE_RECORDING 1*/ /* TODO: add support for this */ |
@@ -82,11 +82,11 @@ | |||
82 | #define BATTERY_SCALE_FACTOR 5865 | 82 | #define BATTERY_SCALE_FACTOR 5865 |
83 | 83 | ||
84 | /* Hardware controlled charging? FIXME */ | 84 | /* Hardware controlled charging? FIXME */ |
85 | //#define CONFIG_CHARGING CHARGING_SIMPLE | 85 | #define CONFIG_CHARGING CHARGING_SIMPLE |
86 | 86 | ||
87 | /* define this if the hardware can be powered off while charging */ | 87 | /* define this if the hardware can be powered off while charging */ |
88 | /* TODO: should this be set for the H10? */ | 88 | /* TODO: should this be set for the H10? */ |
89 | //#define HAVE_POWEROFF_WHILE_CHARGING | 89 | #define HAVE_POWEROFF_WHILE_CHARGING |
90 | 90 | ||
91 | /* The start address index for ROM builds */ | 91 | /* The start address index for ROM builds */ |
92 | #define ROM_START 0x00000000 | 92 | #define ROM_START 0x00000000 |
diff --git a/firmware/target/arm/sandisk/sansa-e200/power-e200.c b/firmware/target/arm/sandisk/sansa-e200/power-e200.c index f1ce7e27e6..b9022974d1 100644 --- a/firmware/target/arm/sandisk/sansa-e200/power-e200.c +++ b/firmware/target/arm/sandisk/sansa-e200/power-e200.c | |||
@@ -17,6 +17,9 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | 19 | ||
20 | #include <stdbool.h> | ||
21 | #include "cpu.h" | ||
22 | |||
20 | void power_init(void) | 23 | void power_init(void) |
21 | { | 24 | { |
22 | } | 25 | } |
@@ -24,3 +27,10 @@ void power_init(void) | |||
24 | void power_off(void) | 27 | void power_off(void) |
25 | { | 28 | { |
26 | } | 29 | } |
30 | |||
31 | bool charger_inserted(void) | ||
32 | { | ||
33 | if(GPIOB_INPUT_VAL & 0x10) | ||
34 | return true; | ||
35 | return false; | ||
36 | } | ||