Tyler Sisk / battery-gauge-bq27441

Dependents:   rcCar

Fork of battery-gauge-bq27441 by u-blox

Committer:
rob.meades@u-blox.com
Date:
Mon Apr 10 11:18:51 2017 +0100
Revision:
1:566163f17cde
Child:
2:93310a83401a
Add files to repo, removing temp.txt placeholder.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rob.meades@u-blox.com 1:566163f17cde 1 /* mbed Microcontroller Library
rob.meades@u-blox.com 1:566163f17cde 2 * Copyright (c) 2017 u-blox
rob.meades@u-blox.com 1:566163f17cde 3 *
rob.meades@u-blox.com 1:566163f17cde 4 * Licensed under the Apache License, Version 2.0 (the "License");
rob.meades@u-blox.com 1:566163f17cde 5 * you may not use this file except in compliance with the License.
rob.meades@u-blox.com 1:566163f17cde 6 * You may obtain a copy of the License at
rob.meades@u-blox.com 1:566163f17cde 7 *
rob.meades@u-blox.com 1:566163f17cde 8 * http://www.apache.org/licenses/LICENSE-2.0
rob.meades@u-blox.com 1:566163f17cde 9 *
rob.meades@u-blox.com 1:566163f17cde 10 * Unless required by applicable law or agreed to in writing, software
rob.meades@u-blox.com 1:566163f17cde 11 * distributed under the License is distributed on an "AS IS" BASIS,
rob.meades@u-blox.com 1:566163f17cde 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
rob.meades@u-blox.com 1:566163f17cde 13 * See the License for the specific language governing permissions and
rob.meades@u-blox.com 1:566163f17cde 14 * limitations under the License.
rob.meades@u-blox.com 1:566163f17cde 15 */
rob.meades@u-blox.com 1:566163f17cde 16
rob.meades@u-blox.com 1:566163f17cde 17 #ifndef BATTERY_GAUGE_BQ27441_H
rob.meades@u-blox.com 1:566163f17cde 18 #define BATTERY_GAUGE_BQ27441_H
rob.meades@u-blox.com 1:566163f17cde 19
rob.meades@u-blox.com 1:566163f17cde 20 /**
rob.meades@u-blox.com 1:566163f17cde 21 * @file battery_gauge_bq27441.h
rob.meades@u-blox.com 1:566163f17cde 22 * This file defines the API to the TI BQ27441 battery gauge chip.
rob.meades@u-blox.com 1:566163f17cde 23 */
rob.meades@u-blox.com 1:566163f17cde 24
rob.meades@u-blox.com 1:566163f17cde 25 // ----------------------------------------------------------------
rob.meades@u-blox.com 1:566163f17cde 26 // COMPILE-TIME MACROS
rob.meades@u-blox.com 1:566163f17cde 27 // ----------------------------------------------------------------
rob.meades@u-blox.com 1:566163f17cde 28
rob.meades@u-blox.com 1:566163f17cde 29 /// Device I2C address.
rob.meades@u-blox.com 1:566163f17cde 30 #define BATTERY_GAUGE_BQ27441_ADDRESS 0x55
rob.meades@u-blox.com 1:566163f17cde 31
rob.meades@u-blox.com 1:566163f17cde 32 /// The default seal code.
rob.meades@u-blox.com 1:566163f17cde 33 #define SEAL_CODE_DEFAULT 0x8000
rob.meades@u-blox.com 1:566163f17cde 34
rob.meades@u-blox.com 1:566163f17cde 35 // ----------------------------------------------------------------
rob.meades@u-blox.com 1:566163f17cde 36 // CLASSES
rob.meades@u-blox.com 1:566163f17cde 37 // ----------------------------------------------------------------
rob.meades@u-blox.com 1:566163f17cde 38
rob.meades@u-blox.com 1:566163f17cde 39 /// BQ27441 battery gauge driver.
rob.meades@u-blox.com 1:566163f17cde 40 class BatteryGaugeBq27441 {
rob.meades@u-blox.com 1:566163f17cde 41 public:
rob.meades@u-blox.com 1:566163f17cde 42
rob.meades@u-blox.com 1:566163f17cde 43 /// Constructor.
rob.meades@u-blox.com 1:566163f17cde 44 BatteryGaugeBq27441(void);
rob.meades@u-blox.com 1:566163f17cde 45 /// Destructor.
rob.meades@u-blox.com 1:566163f17cde 46 ~BatteryGaugeBq27441(void);
rob.meades@u-blox.com 1:566163f17cde 47
rob.meades@u-blox.com 1:566163f17cde 48 /// Initialise the BQ27441 chip. Once initialised
rob.meades@u-blox.com 1:566163f17cde 49 // the chip is put into its lowest power state. Any API call
rob.meades@u-blox.com 1:566163f17cde 50 // will awaken the chip from this state and then return it once
rob.meades@u-blox.com 1:566163f17cde 51 // more to the lowest possible power state.
rob.meades@u-blox.com 1:566163f17cde 52 // \param pI2c a pointer to the I2C instance to use.
rob.meades@u-blox.com 1:566163f17cde 53 //\ param address 7-bit I2C address of the battery gauge chip.
rob.meades@u-blox.com 1:566163f17cde 54 // \param sealCode the 16 bit seal code that will unseal the device if it is sealed.
rob.meades@u-blox.com 1:566163f17cde 55 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 56 bool init (I2C * pI2c, uint8_t address = BATTERY_GAUGE_BQ27441_ADDRESS, uint16_t sealCode = SEAL_CODE_DEFAULT);
rob.meades@u-blox.com 1:566163f17cde 57
rob.meades@u-blox.com 1:566163f17cde 58 /// Switch on the battery gauge. Battery gauging must be switched on
rob.meades@u-blox.com 1:566163f17cde 59 // for the battery capacity and percentage readings to be valid. The
rob.meades@u-blox.com 1:566163f17cde 60 // chip will consume more when battery gauging is switched on.
rob.meades@u-blox.com 1:566163f17cde 61 // \param isSlow set this to true to save power if the battery current is not fluctuating very much.
rob.meades@u-blox.com 1:566163f17cde 62 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 63 bool enableGauge (bool isSlow = false);
rob.meades@u-blox.com 1:566163f17cde 64
rob.meades@u-blox.com 1:566163f17cde 65 /// Switch off the battery gauge.
rob.meades@u-blox.com 1:566163f17cde 66 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 67 bool disableGauge (void);
rob.meades@u-blox.com 1:566163f17cde 68
rob.meades@u-blox.com 1:566163f17cde 69 /// Determine whether a battery has been detected or not.
rob.meades@u-blox.com 1:566163f17cde 70 // \return true if a battery has been detected, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 71 bool isBatteryDetected (void);
rob.meades@u-blox.com 1:566163f17cde 72
rob.meades@u-blox.com 1:566163f17cde 73 /// Read the temperature of the BQ27441 chip.
rob.meades@u-blox.com 1:566163f17cde 74 // If battery gauging is off this function will take ~1 second
rob.meades@u-blox.com 1:566163f17cde 75 // to return while the ADCs are activated and the reading is taken.
rob.meades@u-blox.com 1:566163f17cde 76 // If battery gauging is on, the last temperature reading taken
rob.meades@u-blox.com 1:566163f17cde 77 // will be returned without delay.
rob.meades@u-blox.com 1:566163f17cde 78 // \param pTemperatureC place to put the temperature reading.
rob.meades@u-blox.com 1:566163f17cde 79 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 80 bool getTemperature (int32_t *pTemperatureC);
rob.meades@u-blox.com 1:566163f17cde 81
rob.meades@u-blox.com 1:566163f17cde 82 /// Read the voltage of the battery.
rob.meades@u-blox.com 1:566163f17cde 83 // If battery gauging is off this function will take ~1 second
rob.meades@u-blox.com 1:566163f17cde 84 // to return while the ADCs are activated and the reading is taken.
rob.meades@u-blox.com 1:566163f17cde 85 // If battery gauging is on, the last voltage reading taken
rob.meades@u-blox.com 1:566163f17cde 86 // will be returned without delay.
rob.meades@u-blox.com 1:566163f17cde 87 // \param pVoltageMV place to put the voltage reading.
rob.meades@u-blox.com 1:566163f17cde 88 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 89 bool getVoltage (int32_t *pVoltageMV);
rob.meades@u-blox.com 1:566163f17cde 90
rob.meades@u-blox.com 1:566163f17cde 91 /// Read the current flowing from the battery.
rob.meades@u-blox.com 1:566163f17cde 92 // If battery gauging is off this function will take ~1 second
rob.meades@u-blox.com 1:566163f17cde 93 // to return while the ADCs are activated and the reading is taken.
rob.meades@u-blox.com 1:566163f17cde 94 // If battery gauging is on, the last current reading taken
rob.meades@u-blox.com 1:566163f17cde 95 // will be returned without delay.
rob.meades@u-blox.com 1:566163f17cde 96 // \param pCurrentMA place to put the current reading.
rob.meades@u-blox.com 1:566163f17cde 97 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 98 bool getCurrent (int32_t *pCurrentMA);
rob.meades@u-blox.com 1:566163f17cde 99
rob.meades@u-blox.com 1:566163f17cde 100 /// Read the remaining available battery energy.
rob.meades@u-blox.com 1:566163f17cde 101 // The battery capacity reading will only be valid if
rob.meades@u-blox.com 1:566163f17cde 102 // battery gauging is switched on.
rob.meades@u-blox.com 1:566163f17cde 103 // \param pCapacityMAh place to put the capacity reading.
rob.meades@u-blox.com 1:566163f17cde 104 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 105 bool getRemainingCapacity (int32_t *pCapacityMAh);
rob.meades@u-blox.com 1:566163f17cde 106
rob.meades@u-blox.com 1:566163f17cde 107 /// Read the state of charge of the battery as a percentage.
rob.meades@u-blox.com 1:566163f17cde 108 // The remaining percentage will only be valid if battery
rob.meades@u-blox.com 1:566163f17cde 109 // gauging is switched on.
rob.meades@u-blox.com 1:566163f17cde 110 // \param pBatteryPercent place to put the reading.
rob.meades@u-blox.com 1:566163f17cde 111 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 112 bool getRemainingPercentage (int32_t *pBatteryPercent);
rob.meades@u-blox.com 1:566163f17cde 113
rob.meades@u-blox.com 1:566163f17cde 114 /// An advanced function to read configuration data from the BQ27441 chip memory.
rob.meades@u-blox.com 1:566163f17cde 115 // Please refer to the TI BQ27441 technical reference manual for details of classId,
rob.meades@u-blox.com 1:566163f17cde 116 // offset, the meanings of the data structures and their lengths.
rob.meades@u-blox.com 1:566163f17cde 117 // Note: the chip handles the data for each sub-class in 32 byte blocks and the offset/
rob.meades@u-blox.com 1:566163f17cde 118 // length combination used must respect this. For instance:
rob.meades@u-blox.com 1:566163f17cde 119 //
rob.meades@u-blox.com 1:566163f17cde 120 // Sub-class N (length 87 bytes)
rob.meades@u-blox.com 1:566163f17cde 121 // bytes 0 to 31 bytes 32 to 63 bytes 64 to 86
rob.meades@u-blox.com 1:566163f17cde 122 // -------------------------------- -------------------------------- -----------------------
rob.meades@u-blox.com 1:566163f17cde 123 // | Data Block 0 || xx Data Block 1 yy ||zz Data Block 2 |
rob.meades@u-blox.com 1:566163f17cde 124 // -------------------------------- -------------------------------- -----------------------
rob.meades@u-blox.com 1:566163f17cde 125 //
rob.meades@u-blox.com 1:566163f17cde 126 // To read item xx, 2 bytes long at offset 36, one would specify an offset of 36 and a length
rob.meades@u-blox.com 1:566163f17cde 127 // of 2. To read both xx and yy at the same time (yy being 2 bytes long at offset 56),
rob.meades@u-blox.com 1:566163f17cde 128 // one could specify an offset of 36 and a length of 21. However, one could not read xx, yy
rob.meades@u-blox.com 1:566163f17cde 129 // and zz at the same time, or yy and zz at the same time, since they fall into different blocks;
rob.meades@u-blox.com 1:566163f17cde 130 // two separate reads are required.
rob.meades@u-blox.com 1:566163f17cde 131 // \param subClassId the sub-class ID of the block.
rob.meades@u-blox.com 1:566163f17cde 132 // \param offset the offset of the data within the class.
rob.meades@u-blox.com 1:566163f17cde 133 // \param length the amount of data to read.
rob.meades@u-blox.com 1:566163f17cde 134 // \param pData a place to put the read data.
rob.meades@u-blox.com 1:566163f17cde 135 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 136 bool advancedGetConfig(uint8_t subClassId, int32_t offset, int32_t length, char * pData);
rob.meades@u-blox.com 1:566163f17cde 137
rob.meades@u-blox.com 1:566163f17cde 138 /// An advanced function to write configuration data to the BQ27441 chip memory.
rob.meades@u-blox.com 1:566163f17cde 139 // Please refer to the TI BQ27441 technical reference manual for details of classId,
rob.meades@u-blox.com 1:566163f17cde 140 // offset, the meanings of the data structures and their lengths. See also the note above
rob.meades@u-blox.com 1:566163f17cde 141 // advancedGetConfig() about how to use offset and length. If this function is used to
rob.meades@u-blox.com 1:566163f17cde 142 // change the seal code for the chip then init() should be called once more to
rob.meades@u-blox.com 1:566163f17cde 143 // update the seal code used by this driver.
rob.meades@u-blox.com 1:566163f17cde 144 // \param subClassId the sub-class ID of the block.
rob.meades@u-blox.com 1:566163f17cde 145 // \param offset the offset of the data within the class.
rob.meades@u-blox.com 1:566163f17cde 146 // \param length the length of the data to be written.
rob.meades@u-blox.com 1:566163f17cde 147 // \param pData a pointer to the data to be written.
rob.meades@u-blox.com 1:566163f17cde 148 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 149 bool advancedSetConfig(uint8_t subClassId, int32_t offset, int32_t length, const char * pData);
rob.meades@u-blox.com 1:566163f17cde 150
rob.meades@u-blox.com 1:566163f17cde 151 /// Send a control word (see section 4.1 of the BQ27441 technical reference manual).
rob.meades@u-blox.com 1:566163f17cde 152 // \param controlWord the control word to send.
rob.meades@u-blox.com 1:566163f17cde 153 // \param pDataReturned a place to put the word of data that could be returned,
rob.meades@u-blox.com 1:566163f17cde 154 // depending on which control word is used (may be NULL).
rob.meades@u-blox.com 1:566163f17cde 155 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 156 bool advancedSendControlWord (uint16_t controlWord, uint16_t *pDataReturned);
rob.meades@u-blox.com 1:566163f17cde 157
rob.meades@u-blox.com 1:566163f17cde 158 /// Read two bytes starting at a given address on the chip.
rob.meades@u-blox.com 1:566163f17cde 159 // See sections 4.2 to 4.20 of the BQ27441 technical reference manual for the list
rob.meades@u-blox.com 1:566163f17cde 160 // of addresses.
rob.meades@u-blox.com 1:566163f17cde 161 // \param address the start address to read from. For instance, for temperature this is 0x02.
rob.meades@u-blox.com 1:566163f17cde 162 // \param pDataReturned a place to put the word of data returned.
rob.meades@u-blox.com 1:566163f17cde 163 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 164 bool advancedGet (uint8_t address, uint16_t *pDataReturned);
rob.meades@u-blox.com 1:566163f17cde 165
rob.meades@u-blox.com 1:566163f17cde 166 /// Check if the chip is SEALED or UNSEALED.
rob.meades@u-blox.com 1:566163f17cde 167 // \return true if it is SEALED, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 168 bool advancedIsSealed(void);
rob.meades@u-blox.com 1:566163f17cde 169
rob.meades@u-blox.com 1:566163f17cde 170 /// Put the chip into SEALED mode. SEALED mode is
rob.meades@u-blox.com 1:566163f17cde 171 // used to prevent accidental writes to the chip when it
rob.meades@u-blox.com 1:566163f17cde 172 // is in a production device. All of the functions in this
rob.meades@u-blox.com 1:566163f17cde 173 // class are able to work with a SEALED chip, provided the
rob.meades@u-blox.com 1:566163f17cde 174 // correct seal code is provided to the init() function.
rob.meades@u-blox.com 1:566163f17cde 175 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 176 bool advancedSeal(void);
rob.meades@u-blox.com 1:566163f17cde 177
rob.meades@u-blox.com 1:566163f17cde 178 /// Send the seal code to the chip to unseal it.
rob.meades@u-blox.com 1:566163f17cde 179 // \param sealCode the 16 bit seal code that will unseal the chip if it is sealed.
rob.meades@u-blox.com 1:566163f17cde 180 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 181 bool advancedUnseal(uint16_t sealCode = SEAL_CODE_DEFAULT);
rob.meades@u-blox.com 1:566163f17cde 182
rob.meades@u-blox.com 1:566163f17cde 183 /// Do a hard reset of the chip, reinitialising RAM data to defaults from ROM.
rob.meades@u-blox.com 1:566163f17cde 184 // Note: the SEALED/UNSEALED status of the chip is unaffected.
rob.meades@u-blox.com 1:566163f17cde 185 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 186 bool advancedReset(void);
rob.meades@u-blox.com 1:566163f17cde 187
rob.meades@u-blox.com 1:566163f17cde 188 protected:
rob.meades@u-blox.com 1:566163f17cde 189 /// Pointer to the I2C interface.
rob.meades@u-blox.com 1:566163f17cde 190 I2C * gpI2c;
rob.meades@u-blox.com 1:566163f17cde 191 /// The address of the device.
rob.meades@u-blox.com 1:566163f17cde 192 uint8_t gAddress;
rob.meades@u-blox.com 1:566163f17cde 193 /// The seal code for the device.
rob.meades@u-blox.com 1:566163f17cde 194 uint16_t gSealCode;
rob.meades@u-blox.com 1:566163f17cde 195 /// Flag to indicate device is ready.
rob.meades@u-blox.com 1:566163f17cde 196 bool gReady;
rob.meades@u-blox.com 1:566163f17cde 197 /// Flag to indicate that monitor mode is active.
rob.meades@u-blox.com 1:566163f17cde 198 bool gGaugeOn;
rob.meades@u-blox.com 1:566163f17cde 199
rob.meades@u-blox.com 1:566163f17cde 200 /// Read two bytes starting at a given address.
rob.meades@u-blox.com 1:566163f17cde 201 // Note: gpI2c should be locked before this is called.
rob.meades@u-blox.com 1:566163f17cde 202 // \param registerAddress the register address to start reading from.
rob.meades@u-blox.com 1:566163f17cde 203 // \param pBytes place to put the two bytes.
rob.meades@u-blox.com 1:566163f17cde 204 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 205 bool getTwoBytes (uint8_t registerAddress, uint16_t *pBytes);
rob.meades@u-blox.com 1:566163f17cde 206
rob.meades@u-blox.com 1:566163f17cde 207 /// Compute the checksum of a block of memory in the chip.
rob.meades@u-blox.com 1:566163f17cde 208 // \param pData a pointer to the 32 byte data block.
rob.meades@u-blox.com 1:566163f17cde 209 // \return the checksum value.
rob.meades@u-blox.com 1:566163f17cde 210 uint8_t computeChecksum(const char * pData);
rob.meades@u-blox.com 1:566163f17cde 211
rob.meades@u-blox.com 1:566163f17cde 212 /// Read data of a given length and class ID.
rob.meades@u-blox.com 1:566163f17cde 213 // Note: gpI2c should be locked before this is called.
rob.meades@u-blox.com 1:566163f17cde 214 // \param subClassId the sub-class ID of the block.
rob.meades@u-blox.com 1:566163f17cde 215 // \param offset the offset of the data within the class.
rob.meades@u-blox.com 1:566163f17cde 216 // \param pData a place to put the read data.
rob.meades@u-blox.com 1:566163f17cde 217 // \param length the size of the place to put the data block.
rob.meades@u-blox.com 1:566163f17cde 218 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 219 bool readExtendedData(uint8_t subClassId, int32_t offset, int32_t length, char * pData);
rob.meades@u-blox.com 1:566163f17cde 220
rob.meades@u-blox.com 1:566163f17cde 221 /// Write an extended data block.
rob.meades@u-blox.com 1:566163f17cde 222 // Note: gpI2c should be locked before this is called.
rob.meades@u-blox.com 1:566163f17cde 223 // \param subClassId the sub-class ID of the block.
rob.meades@u-blox.com 1:566163f17cde 224 // \param offset the offset of the data within the class.
rob.meades@u-blox.com 1:566163f17cde 225 // \param pData a pointer to the data to be written.
rob.meades@u-blox.com 1:566163f17cde 226 // \param length the size of the data to be written.
rob.meades@u-blox.com 1:566163f17cde 227 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 228 bool writeExtendedData(uint8_t subClassId, int32_t offset, int32_t length, const char * pData);
rob.meades@u-blox.com 1:566163f17cde 229
rob.meades@u-blox.com 1:566163f17cde 230 /// Check if the chip is SEALED or UNSEALED.
rob.meades@u-blox.com 1:566163f17cde 231 // Note: gpI2c should be locked before this is called.
rob.meades@u-blox.com 1:566163f17cde 232 // \return true if it is SEALED, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 233 bool isSealed(void);
rob.meades@u-blox.com 1:566163f17cde 234
rob.meades@u-blox.com 1:566163f17cde 235 /// Put the chip into SEALED mode.
rob.meades@u-blox.com 1:566163f17cde 236 // Note: gpI2c should be locked before this is called.
rob.meades@u-blox.com 1:566163f17cde 237 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 238 bool seal(void);
rob.meades@u-blox.com 1:566163f17cde 239
rob.meades@u-blox.com 1:566163f17cde 240 /// Unseal the chip.
rob.meades@u-blox.com 1:566163f17cde 241 // Note: gpI2c should be locked before this is called.
rob.meades@u-blox.com 1:566163f17cde 242 // \param sealCode the 16 bit seal code that will unseal the chip if it is sealed.
rob.meades@u-blox.com 1:566163f17cde 243 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 244 bool unseal(uint16_t sealCode);
rob.meades@u-blox.com 1:566163f17cde 245
rob.meades@u-blox.com 1:566163f17cde 246 /// Make sure that the chip is awake and has taken a reading.
rob.meades@u-blox.com 1:566163f17cde 247 // Note: the function does its own locking of gpI2C so that it isn't
rob.meades@u-blox.com 1:566163f17cde 248 // held for the entire time we wait for ADC readings to complete.
rob.meades@u-blox.com 1:566163f17cde 249 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 250 bool makeAdcReading(void);
rob.meades@u-blox.com 1:566163f17cde 251
rob.meades@u-blox.com 1:566163f17cde 252 /// Set Hibernate mode.
rob.meades@u-blox.com 1:566163f17cde 253 // Note: gpI2c should be locked before this is called.
rob.meades@u-blox.com 1:566163f17cde 254 // \return true if successful, otherwise false.
rob.meades@u-blox.com 1:566163f17cde 255 bool setHibernate(void);
rob.meades@u-blox.com 1:566163f17cde 256 };
rob.meades@u-blox.com 1:566163f17cde 257
rob.meades@u-blox.com 1:566163f17cde 258 #endif
rob.meades@u-blox.com 1:566163f17cde 259
rob.meades@u-blox.com 1:566163f17cde 260 // End Of File