Correct BATTERY_CAPACITY configuration
In the BQ27441_Extended_Configuration example lipo.setCapacity(BATTERY_CAPACITY) command executed AFTER entering config mode(lipo.enterConfig()), while in the BQ27441_Basic example it executed WITHOUT entering config mode. Is it correct?
both are correct. setCapacity will call enterConfig as long as enterConfig has not been previously called (without parameters or with true as parameter). However if you call enterConfig with no parameters, then call exitConfig, then at somepoint call setCapacity or other config functions without calling enterConfig first they will fail. Alternately call enterConfig(false), exitConfig then you can call setCapacity without calling enterConfig.