Mercurial > public > hwos_code
comparison src/adc_lightsensor.asm @ 654:75e90cd0c2c3
hwOS sport 10.77 release
author | heinrichsweikamp |
---|---|
date | Thu, 14 Mar 2024 16:56:46 +0100 |
parents | bc214815deb2 |
children |
comparison
equal
deleted
inserted
replaced
653:8bcd138ab744 | 654:75e90cd0c2c3 |
---|---|
1 ;============================================================================= | 1 ;============================================================================= |
2 ; | 2 ; |
3 ; File adc_lightsensor.asm * combined next generation V3.11.1 | 3 ; File adc_lightsensor.asm * combined next generation V3.11.1 |
4 ; | 4 ; |
5 ; | 5 ; |
6 ; Copyright (c) 2011, JD Gascuel, HeinrichsWeikamp, all right reserved. | 6 ; Copyright (c) 2011, JD Gascuel, heinrichs weikamp gmbh, all right reserved. |
7 ;============================================================================= | 7 ;============================================================================= |
8 ; HISTORY | 8 ; HISTORY |
9 ; 2011-08-08 : [mH] moving from OSTC code | 9 ; 2011-08-08 : [mH] moving from OSTC code |
10 | 10 |
11 #include "hwos.inc" | 11 #include "hwos.inc" |
93 bra charge_cc_active ; NO | 93 bra charge_cc_active ; NO |
94 bsf cc_active ; YES - set CC charging status | 94 bsf cc_active ; YES - set CC charging status |
95 bsf cv_active ; - set CV charging status | 95 bsf cv_active ; - set CV charging status |
96 bsf LEDr ; - indicate charging | 96 bsf LEDr ; - indicate charging |
97 call lt2942_charge_done ; - reset accumulating registers to 0xFFFF | 97 call lt2942_charge_done ; - reset accumulating registers to 0xFFFF |
98 btfsc lock_cycle_counter ; cycle counted already? | |
99 bra charge_cv_active2 ; Yes, skip | |
100 banksel charge_cycles | |
101 INCI charge_cycles ; increase charge_cycles counter by one | |
102 banksel common | |
103 bsf lock_cycle_counter ; lock cycle counter | |
104 charge_cv_active2: | |
98 WAITMS d'10' ; - wait 10 ms | 105 WAITMS d'10' ; - wait 10 ms |
99 bcf LEDr ; - indicate charging | 106 bcf LEDr ; - indicate charging |
100 bsf get_bat_volt_counter,0 ; - set counter to 1 | 107 bsf get_bat_volt_counter,0 ; - set counter to 1 |
101 return ; - done | 108 return ; - done |
102 | 109 |