summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/as3525
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-10-30 22:12:58 -0400
committerMichael Sevakis <jethead71@rockbox.org>2017-10-30 22:12:58 -0400
commit8ef33f479e8dc95811e503a49306b9e56dd84cb1 (patch)
tree10ef2ac22b92c62034d7bf1a124bf26902a1e6a7 /firmware/target/arm/as3525
parentf728559bf951b515be39d61f3ffd0eaae64b2b0d (diff)
downloadrockbox-8ef33f479e8dc95811e503a49306b9e56dd84cb1.tar.gz
rockbox-8ef33f479e8dc95811e503a49306b9e56dd84cb1.tar.bz2
rockbox-8ef33f479e8dc95811e503a49306b9e56dd84cb1.zip
AMS: Convert ascodec_endofch() to use bit mod function's return value.
It cleans up the code and it was the initial inspiring reason to change them. Change-Id: I299499117b8a12d93d13d6563683bab89ab80555
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 */