Code for interfacing with the TI "gas gauge" battery monitoring chip