summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/as3525
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525')
-rw-r--r--firmware/target/arm/as3525/ascodec-as3525.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/firmware/target/arm/as3525/ascodec-as3525.c b/firmware/target/arm/as3525/ascodec-as3525.c
index e144f07ed4..1bd07c57b1 100644
--- a/firmware/target/arm/as3525/ascodec-as3525.c
+++ b/firmware/target/arm/as3525/ascodec-as3525.c
@@ -545,14 +545,7 @@ void ascodec_wait_adc_finished(void)
/* read sticky end-of-charge bit and clear it */
bool ascodec_endofch(void)
{
- int oldlevel = disable_irq_save();
-
- bool ret = ascodec_enrd0_shadow & CHG_ENDOFCH;
- ascodec_enrd0_shadow &= ~CHG_ENDOFCH; /* clear interrupt */
-
- restore_irq(oldlevel);
-
- return ret;
+ return bitclr32(&ascodec_enrd0_shadow, CHG_ENDOFCH) & CHG_ENDOFCH;
}
/* read the presence state of the charger */