You can check the magnitude of the current on the current-sense resistor (i.e., register 6C:0A, or 00A) to determine if the battery is charging or discharging: When the value is larger than a certain value (the smallest charging current, for example, 10mA), the battery is charging. When it is smaller than a certain value (smallest discharging current, for example, -10mA), it is discharging.