summaryrefslogtreecommitdiff
path: root/firmware/target
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target')
-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)
545/* read sticky end-of-charge bit and clear it */ 545/* read sticky end-of-charge bit and clear it */
546bool ascodec_endofch(void) 546bool ascodec_endofch(void)
547{ 547{
548 int oldlevel = disable_irq_save(); 548 return bitclr32(&ascodec_enrd0_shadow, CHG_ENDOFCH) & CHG_ENDOFCH;
549
550 bool ret = ascodec_enrd0_shadow & CHG_ENDOFCH;
551 ascodec_enrd0_shadow &= ~CHG_ENDOFCH; /* clear interrupt */
552
553 restore_irq(oldlevel);
554
555 return ret;
556} 549}
557 550
558/* read the presence state of the charger */ 551/* read the presence state of the charger */