Mercurial > public > hwos_code
comparison src/i2c.asm @ 655:c7b7b8a358cd
hwOS tech 3.22 release
| author | heinrichsweikamp |
|---|---|
| date | Mon, 29 Apr 2024 13:05:18 +0200 |
| parents | 75e90cd0c2c3 |
| children | 8af5aefbcdaf |
comparison
equal
deleted
inserted
replaced
| 654:75e90cd0c2c3 | 655:c7b7b8a358cd |
|---|---|
| 1042 | 1042 |
| 1043 ;----------------------------------------------------------------------------- | 1043 ;----------------------------------------------------------------------------- |
| 1044 ; Helper Function - Initialize Gauge IC again after an UVLO Event | 1044 ; Helper Function - Initialize Gauge IC again after an UVLO Event |
| 1045 ; | 1045 ; |
| 1046 lt2942_init_again: | 1046 lt2942_init_again: |
| 1047 rcall I2CReset | |
| 1047 movlw 0x02 ; point to accumulated charge registers | 1048 movlw 0x02 ; point to accumulated charge registers |
| 1048 rcall I2C_TX_GAUGE ; send byte to the LT2942 gauge IC | 1049 rcall I2C_TX_GAUGE ; send byte to the LT2942 gauge IC |
| 1049 movff battery_accumulated_charge+1,SSP1BUF ; data byte | 1050 movff battery_accumulated_charge+1,SSP1BUF ; data byte |
| 1050 rcall WaitMSSP ; wait for TX to complete | 1051 rcall WaitMSSP ; wait for TX to complete |
| 1051 rcall I2C_Check_ACK ; check for acknowledge by receiver | 1052 rcall I2C_Check_ACK ; check for acknowledge by receiver |
