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 @@ #define TARGET_TREE /* this target is using the target tree system */ /* For Rolo and boot loader */ -#define MODEL_NUMBER 12 +#define MODEL_NUMBER 16 /* define this if you have recording possibility */ /*#define HAVE_RECORDING 1*/ /* TODO: add support for this */ @@ -82,11 +82,11 @@ #define BATTERY_SCALE_FACTOR 5865 /* Hardware controlled charging? FIXME */ -//#define CONFIG_CHARGING CHARGING_SIMPLE +#define CONFIG_CHARGING CHARGING_SIMPLE /* define this if the hardware can be powered off while charging */ /* TODO: should this be set for the H10? */ -//#define HAVE_POWEROFF_WHILE_CHARGING +#define HAVE_POWEROFF_WHILE_CHARGING /* The start address index for ROM builds */ #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 @@ * ****************************************************************************/ +#include +#include "cpu.h" + void power_init(void) { } @@ -24,3 +27,10 @@ void power_init(void) void power_off(void) { } + +bool charger_inserted(void) +{ + if(GPIOB_INPUT_VAL & 0x10) + return true; + return false; +}