Fix checking for CONFIG_CHARGING
Change-Id: I53b9a129679fd7b322770025106ef92033226d2a
This commit is contained in:
parent
e599810ffa
commit
ce90c0481a
4 changed files with 37 additions and 38 deletions
|
@ -111,7 +111,7 @@
|
|||
#endif
|
||||
#include "appevents.h"
|
||||
|
||||
#if defined(HAVE_AS3514) && defined(CONFIG_CHARGING)
|
||||
#if defined(HAVE_AS3514) && CONFIG_CHARGING
|
||||
#include "ascodec.h"
|
||||
#endif
|
||||
|
||||
|
@ -1107,8 +1107,7 @@ static bool view_battery(void)
|
|||
/* Conversion disabled */
|
||||
lcd_puts(0, line++, "T Battery: ?");
|
||||
}
|
||||
|
||||
#elif defined(HAVE_AS3514) && defined(CONFIG_CHARGING)
|
||||
#elif defined(HAVE_AS3514) && CONFIG_CHARGING
|
||||
static const char * const chrgstate_strings[] =
|
||||
{
|
||||
[CHARGE_STATE_DISABLED - CHARGE_STATE_DISABLED]= "Disabled",
|
||||
|
|
|
@ -45,7 +45,7 @@ int ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data)
|
|||
|
||||
void ascodec_wait_adc_finished(void);
|
||||
|
||||
#ifdef CONFIG_CHARGING
|
||||
#if CONFIG_CHARGING
|
||||
bool ascodec_endofch(void);
|
||||
bool ascodec_chg_status(void);
|
||||
void ascodec_monitor_endofch(void);
|
||||
|
|
|
@ -49,7 +49,7 @@ enum charge_state_type
|
|||
/* tells what the charger is doing */
|
||||
extern enum charge_state_type charge_state;
|
||||
|
||||
#ifdef CONFIG_CHARGING
|
||||
#if CONFIG_CHARGING
|
||||
/*
|
||||
* Flag that the charger has been plugged in/removed: this is set for exactly
|
||||
* one time through the power loop when the charger has been plugged in.
|
||||
|
|
|
@ -297,7 +297,7 @@ void ascodec_init(void)
|
|||
|
||||
/* Generate irq for usb+charge status change */
|
||||
ascodec_write(AS3514_IRQ_ENRD0,
|
||||
#ifdef CONFIG_CHARGING /* m200v4 can't charge */
|
||||
#if CONFIG_CHARGING /* m200v4 can't charge */
|
||||
IRQ_CHGSTAT | IRQ_ENDOFCH |
|
||||
#endif
|
||||
IRQ_USBSTAT);
|
||||
|
@ -530,7 +530,7 @@ void ascodec_wait_adc_finished(void)
|
|||
semaphore_wait(&adc_done_sem, TIMEOUT_BLOCK);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CHARGING
|
||||
#if CONFIG_CHARGING
|
||||
bool ascodec_endofch(void)
|
||||
{
|
||||
bool ret = ascodec_enrd0_shadow & CHG_ENDOFCH;
|
||||
|
|
Loading…
Reference in a new issue