1
0
Fork 0
forked from len0rd/rockbox

Charger detection for Sansa

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11710 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Ankers 2006-12-10 22:58:59 +00:00
parent f98fd72fe7
commit a5852f6855
2 changed files with 13 additions and 3 deletions

View file

@ -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

View file

@ -17,6 +17,9 @@
*
****************************************************************************/
#include <stdbool.h>
#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;
}