This class provides APIs to all of the registers of the TI BQ24295 battery charger chip, as used on the u-blox C030 board. This class is not required to charge a battery connected to the C030 board, charging will begin automatically when a battery is connected. This class is only required if the user wishes to monitor the charger's state or change the charger's settings. The caller should instantiate an I2C interface and pass this to init(), which will initialise the chip and place it into its lowest power state. The chip may then be configured using the API calls. Once the chip is configured, battery charging can be enabled. If battery charging is disabled the chip will once more be put into its lowest power state.

Dependents:   example-battery-charger-bq24295 example-C030-out-of-box-demo example-C030-out-of-box-demo Amit

Revision:
2:f0bbe0269d67
Parent:
1:ed57b6ca43ab
Child:
3:340d65a1a133
--- a/battery_charger_bq24295.h	Mon Apr 10 11:04:15 2017 +0100
+++ b/battery_charger_bq24295.h	Tue Apr 11 09:56:38 2017 +0000
@@ -22,21 +22,21 @@
  * This file defines the API to the TI BQ24295 battery charger chip.
  */
 
-// ----------------------------------------------------------------
-// COMPILE-TIME MACROS
-// ----------------------------------------------------------------
+/* ----------------------------------------------------------------
+ * COMPILE-TIME MACROS
+ * -------------------------------------------------------------- */
 
-/// Device I2C address.
+/** Device I2C address. */
 #define BATTERY_CHARGER_BQ24295_ADDRESS 0x6B
 
-// ----------------------------------------------------------------
-// CLASSES
-// ----------------------------------------------------------------
+/* ----------------------------------------------------------------
+ * CLASSES
+ * -------------------------------------------------------------- */
 
-/// BQ27441 battery charger driver.
+/** BQ27441 battery charger driver. */
 class BatteryChargerBq24295 {
 public:
-    /// Charger state.
+    /** Charger state. */
     typedef enum {
         CHARGER_STATE_UNKNOWN,
         CHARGER_STATE_DISABLED,
@@ -48,7 +48,7 @@
         MAX_NUM_CHARGER_STATES
     } ChargerState;
 
-    /// Charger faults as a bitmap that matches the chip REG09 definitions
+    /** Charger faults as a bitmap that matches the chip REG09 definitions. */
     typedef enum {
         CHARGER_FAULT_NONE = 0x00,
         CHARGER_FAULT_THERMISTOR_TOO_HOT = 0x01,
@@ -63,356 +63,414 @@
         MAX_NUM_CHARGER_FAULTS
     } ChargerFault;
 
-    /// Constructor.
+    /** Constructor. */
     BatteryChargerBq24295(void);
-    /// Destructor.
+    /** Destructor. */
     ~BatteryChargerBq24295(void);
 
-    /// Initialise the BQ24295 chip.
-    // After initialisation the chip will be put into its lowest
-    // power state and should be configured if the default settings
-    // are not satisfactory.  Once the chip is correctly configured,
-    // charging should be enabled.
-    // \param pI2c a pointer to the I2C instance to use.
-    //\ param address 7-bit I2C address of the battery charger chip.
-    // \return true if successful, otherwise false.
+    /** Initialise the BQ24295 chip.
+    * After initialisation the chip will be put into its lowest
+    * power state and should be configured if the default settings
+    * are not satisfactory.  Once the chip is correctly configured,
+    * charging should be enabled.
+    * @param pI2c a pointer to the I2C instance to use.
+    * @param address 7-bit I2C address of the battery charger chip.
+    * @return true if successful, otherwise false.
+    */
     bool init (I2C * pI2c, uint8_t address = BATTERY_CHARGER_BQ24295_ADDRESS);
 
-    /// Get the charger state.
-    // \return the charge state.
+    /** Get the charger state.
+    * @return the charge state.
+    */
     ChargerState getChargerState(void);
 
-    /// Get whether external power is present or not.
-    // \return true if external power is present, otherwise false.
+    /** Get whether external power is present or not.
+    * @return true if external power is present, otherwise false.
+    */
     bool isExternalPowerPresent(void);
 
-    /// Enable charging.
-    // Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Enable charging.
+    * Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool enableCharging (void);
 
-    /// Disable charging.
-    // Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Disable charging.
+    * Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool disableCharging (void);
 
-    /// Get the state of charging (enabled or disabled).
-    // \return true if charging is enabled, otherwise false.
+    /** Get the state of charging (enabled or disabled).
+    * @return true if charging is enabled, otherwise false.
+    */
     bool isChargingEnabled (void);
 
-    /// Enable OTG charging.
-    // Default is enabled.
-    // \return true if successful, otherwise false.
+    /** Enable OTG charging.
+    * Default is enabled.
+    * @return true if successful, otherwise false.
+    */
     bool enableOtg (void);
 
-    /// Disable OTG charging.
-    // Default is enabled.
-    // \return true if successful, otherwise false.
+    /** Disable OTG charging.
+    * Default is enabled.
+    * @return true if successful, otherwise false.
+    */
     bool disableOtg (void);
 
-    /// Determine whether OTG charging is enabled or not.
-    // \return true if OTG charging is enabled, otherwise false.
+    /** Determine whether OTG charging is enabled or not.
+    * @return true if OTG charging is enabled, otherwise false.
+    */
     bool isOtgEnabled (void);
 
-    /// Set the system voltage (the voltage which the
-    // chip will attempt to maintain the system at).
-    // \param voltageMV the voltage limit, in milliVolts.
-    //        Range is 3000 mV to 3700 mV, default 3500 mV.
-    // \return true if successful, otherwise false.
+    /** Set the system voltage (the voltage which the
+    * chip will attempt to maintain the system at).
+    * @param voltageMV the voltage limit, in milliVolts.
+    *        Range is 3000 mV to 3700 mV, default 3500 mV.
+    * @return true if successful, otherwise false.
+    */
     bool setSystemVoltage (int32_t voltageMV);
 
-    /// Get the system voltage.
-    // \param pVoltageMV a place to put the system voltage limit.
-    // \return true if successful, otherwise false.
+    /** Get the system voltage.
+    * @param pVoltageMV a place to put the system voltage limit.
+    * @return true if successful, otherwise false.
+    */
     bool getSystemVoltage (int32_t *pVoltageMV);
 
-    /// Set the fast charging current limit.
-    // \param currentMA the fast charging current limit, in milliAmps.
-    //        Range is 512 mA to 3008 mA, default 1024 mA.
-    // \return true if successful, otherwise false.
+    /** Set the fast charging current limit.
+    * @param currentMA the fast charging current limit, in milliAmps.
+    *        Range is 512 mA to 3008 mA, default 1024 mA.
+    * @return true if successful, otherwise false.
+    */
     bool setFastChargingCurrentLimit (int32_t currentMA);
 
-    /// Get the fast charging current limit.
-    // \param pCurrentMA a place to put the fast charging current limit.
-    // \return true if successful, otherwise false.
+    /** Get the fast charging current limit.
+    * @param pCurrentMA a place to put the fast charging current limit.
+    * @return true if successful, otherwise false.
+    */
     bool getFastChargingCurrentLimit (int32_t *pCurrentMA);
 
-    /// Set the fast charging safety timer.
-    // \param timerHours the charging safety timer value.
-    //        Use a value of 0 to indicate that the timer should be disabled.
-    //        Timer values will be translated to the nearest (lower) value
-    //        out of 5, 8, 12, and 20 hours, default 12 hours.
-    // \return true if successful, otherwise false.
+    /** Set the fast charging safety timer.
+    * @param timerHours the charging safety timer value.
+    *        Use a value of 0 to indicate that the timer should be disabled.
+    *        Timer values will be translated to the nearest (lower) value
+    *        out of 5, 8, 12, and 20 hours, default 12 hours.
+    * @return true if successful, otherwise false.
+    */
     bool setFastChargingSafetyTimer (int32_t timerHours);
 
-    /// Get the fast charging safety timer value.
-    // \param pTimerHours a place to put the charging safety timer value.
-    //        Returned value is zero if the fast charging safety timer is disabled.
-    // \return true if charging termination is enabled, otherwise false.
+    /** Get the fast charging safety timer value.
+    * @param pTimerHours a place to put the charging safety timer value.
+    *        Returned value is zero if the fast charging safety timer is disabled.
+    * @return true if charging termination is enabled, otherwise false.
+    */
     bool getFastChargingSafetyTimer (int32_t *pTimerHours);
 
-    /// Set ICHG/IPRECH margin (see section 8.3.3.5 of the chip data sheet).
-    // Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Set ICHG/IPRECH margin (see section 8.3.3.5 of the chip data sheet).
+    * Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool enableIcghIprechMargin (void);
 
-    /// Clear the ICHG/IPRECH margin (see section 8.3.3.5 of the chip data sheet).
-    // Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Clear the ICHG/IPRECH margin (see section 8.3.3.5 of the chip data sheet).
+    * Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool disableIcghIprechMargin (void);
     
-    /// Check if the ICHG/IPRECH margin is set (see section 8.3.3.5 of
-    //  the chip data sheet).
-    // \return true if the ICHG/IPRECH margin is enabled, otherwise false.
+    /** Check if the ICHG/IPRECH margin is set (see section 8.3.3.5 of
+    *  the chip data sheet).
+    * @return true if the ICHG/IPRECH margin is enabled, otherwise false.
+    */
     bool isIcghIprechMarginEnabled (void);
     
-    /// Set the charging termination current.
-    // \param currentMA the charging termination current, in milliAmps.
-    //        Range is 128 mA to 2048 mA, default is 256 mA.
-    // \return true if successful, otherwise false.
+    /** Set the charging termination current.
+    * @param currentMA the charging termination current, in milliAmps.
+    *        Range is 128 mA to 2048 mA, default is 256 mA.
+    * @return true if successful, otherwise false.
+    */
     bool setChargingTerminationCurrent (int32_t currentMA);
 
-    /// Get the charging termination current.
-    // \param pCurrentMA a place to put the charging termination current.
-    // \return true if successful, otherwise false.
+    /** Get the charging termination current.
+    * @param pCurrentMA a place to put the charging termination current.
+    * @return true if successful, otherwise false.
+    */
     bool getChargingTerminationCurrent (int32_t *pCurrentMA);
 
-    /// Enable charging termination.
-    // Default is enabled.
-    // \return true if successful, otherwise false.
+    /** Enable charging termination.
+    * Default is enabled.
+    * @return true if successful, otherwise false.
+    */
     bool enableChargingTermination (void);
 
-    /// Disable charging termination.
-    // Default is enabled.
-    // \return true if successful, otherwise false.
+    /** Disable charging termination.
+    * Default is enabled.
+    * @return true if successful, otherwise false.
+    */
     bool disableChargingTermination (void);
 
-    /// Get the state of charging termination (enabled or disabled).
-    // \return true if charging termination is enabled, otherwise false.
+    /** Get the state of charging termination (enabled or disabled).
+    * @return true if charging termination is enabled, otherwise false.
+    */
     bool isChargingTerminationEnabled (void);
 
-    /// Set the pre-charging current limit.
-    // \param currentMA the pre-charging current limit, in milliAmps.
-    //        Range is 128 mA to 2048 mA, default is 256 mA.
-    // \return true if successful, otherwise false.
+    /** Set the pre-charging current limit.
+    * @param currentMA the pre-charging current limit, in milliAmps.
+    *        Range is 128 mA to 2048 mA, default is 256 mA.
+    * @return true if successful, otherwise false.
+    */
     bool setPrechargingCurrentLimit (int32_t currentMA);
 
-    /// Get the pre-charging current limit.
-    // \param pCurrentMA a place to put the pre-charging current limit.
-    // \return true if successful, otherwise false.
+    /** Get the pre-charging current limit.
+    * @param pCurrentMA a place to put the pre-charging current limit.
+    * @return true if successful, otherwise false.
+    */
     bool getPrechargingCurrentLimit (int32_t *pCurrentMA);
 
-    /// Set the charging voltage limit.
-    // \param voltageMV the charging voltage limit, in milliVolts.
-    //        Range is 3504 mV to 4400 mV, default is 4208 mV.
-    // \return true if successful, otherwise false.
+    /** Set the charging voltage limit.
+    * @param voltageMV the charging voltage limit, in milliVolts.
+    *        Range is 3504 mV to 4400 mV, default is 4208 mV.
+    * @return true if successful, otherwise false.
+    */
     bool setChargingVoltageLimit (int32_t voltageMV);
 
-    /// Get the charging voltage limit.
-    // \param pVoltageMV a place to put the charging voltage limit,
-    //        in milliVolts.
-    // \return true if successful, otherwise false.
+    /** Get the charging voltage limit.
+    * @param pVoltageMV a place to put the charging voltage limit,
+    *        in milliVolts.
+    * @return true if successful, otherwise false.
+    */
     bool getChargingVoltageLimit (int32_t *pVoltageMV);
 
-    /// Set the pre-charge to fast-charge voltage threshold.
-    // \param voltageMV the threshold, in milliVolts.
-    //        Values will be translated to the nearest (highest)
-    //        voltage out of 2800 mV and 3000 mV, default is 3000 mV.
-    // \return true if successful, otherwise false.
+    /** Set the pre-charge to fast-charge voltage threshold.
+    * @param voltageMV the threshold, in milliVolts.
+    *        Values will be translated to the nearest (highest)
+    *        voltage out of 2800 mV and 3000 mV, default is 3000 mV.
+    * @return true if successful, otherwise false.
+    */
     bool setFastChargingVoltageThreshold (int32_t voltageMV);
 
-    /// Get the pre-charge to fast-charge voltage threshold.
-    // \param pVoltageMV a place to put the threshold, in milliVolts.
-    // \return true if successful, otherwise false.
+    /** Get the pre-charge to fast-charge voltage threshold.
+    * @param pVoltageMV a place to put the threshold, in milliVolts.
+    * @return true if successful, otherwise false.
+    */
     bool getFastChargingVoltageThreshold (int32_t *pVoltageMV);
 
-    /// Set the recharging voltage threshold.
-    // \param voltageMV the recharging voltage threshold, in milliVolts.
-    //        Values will be translated to the nearest (highest)
-    //        voltage out of 100 mV and 300 mV, default is 100 mV.
-    // \return true if successful, otherwise false.
+    /** Set the recharging voltage threshold.
+    * @param voltageMV the recharging voltage threshold, in milliVolts.
+    *        Values will be translated to the nearest (highest)
+    *        voltage out of 100 mV and 300 mV, default is 100 mV.
+    * @return true if successful, otherwise false.
+    */
     bool setRechargingVoltageThreshold (int32_t voltageMV);
 
-    /// Get the recharging voltage threshold.
-    // \param pVoltageMV a place to put the charging voltage threshold, in milliVolts.
-    // \return true if successful, otherwise false.
+    /** Get the recharging voltage threshold.
+    * @param pVoltageMV a place to put the charging voltage threshold, in milliVolts.
+    * @return true if successful, otherwise false.
+    */
     bool getRechargingVoltageThreshold (int32_t *pVoltageMV);
 
-    /// Set the boost voltage.
-    // \param voltageMV the boost voltage, in milliVolts.
-    //        Range is 4550 mV to 5510 mV, default is 5126 mV.
-    // \return true if successful, otherwise false.
+    /** Set the boost voltage.
+    * @param voltageMV the boost voltage, in milliVolts.
+    *        Range is 4550 mV to 5510 mV, default is 5126 mV.
+    * @return true if successful, otherwise false.
+    */
     bool setBoostVoltage (int32_t voltageMV);
 
-    /// Get the boost voltage.
-    // \param pVoltageMV a place to put the boost voltage, in milliVolts.
-    // \return true if successful, otherwise false.
+    /** Get the boost voltage.
+    * @param pVoltageMV a place to put the boost voltage, in milliVolts.
+    * @return true if successful, otherwise false.
+    */
     bool getBoostVoltage (int32_t *pVoltageMV);
 
-    /// Set the boost mode upper temperature limit.
-    // \param temperatureC the temperature in C.
-    //        Values will be translated to the nearest (lower)
-    //        of 55 C, 60 C and 65 C (disabled by default).
-    // \return true if successful, otherwise false.
+    /** Set the boost mode upper temperature limit.
+    * @param temperatureC the temperature in C.
+    *        Values will be translated to the nearest (lower)
+    *        of 55 C, 60 C and 65 C (disabled by default).
+    * @return true if successful, otherwise false.
+    */
     bool setBoostUpperTemperatureLimit (int32_t temperatureC);
 
-    /// Get the boost mode upper temperature limit.
-    // If the boost mode upper temperature limit is not
-    // enabled then pTemperatureC will remain untouched and false
-    // will be returned.
-    // \param pTemperatureC a place to put the temperature.
-    // \return true if successful and a limit was set, otherwise false.
+    /** Get the boost mode upper temperature limit.
+    * If the boost mode upper temperature limit is not
+    * enabled then pTemperatureC will remain untouched and false
+    * will be returned.
+    * @param pTemperatureC a place to put the temperature.
+    * @return true if successful and a limit was set, otherwise false.
+    */
     bool getBoostUpperTemperatureLimit (int32_t *pTemperatureC);
     
-    /// Check whether the boost mode upper temperature limit is enabled.
-    // \return true if successful, otherwise false.
+    /** Check whether the boost mode upper temperature limit is enabled.
+    * @return true if successful, otherwise false.
+    */
     bool isBoostUpperTemperatureLimitEnabled (void);
 
-    /// Disable the boost mode upper temperature limit.
-    // Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Disable the boost mode upper temperature limit.
+    * Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool disableBoostUpperTemperatureLimit (void);
 
-    /// Set the boost mode low temperature limit.
-    // \param temperatureC the temperature in C.
-    //        Values will be translated to the nearest (higher)
-    //        of -10 C and -20 C, default is -10 C.
-    // \return true if successful, otherwise false.
+    /** Set the boost mode low temperature limit.
+    * @param temperatureC the temperature in C.
+    *        Values will be translated to the nearest (higher)
+    *        of -10 C and -20 C, default is -10 C.
+    * @return true if successful, otherwise false.
+    */
     bool setBoostLowerTemperatureLimit (int32_t temperatureC);
 
-    /// Get the boost mode low temperature limit.
-    // \param pTemperatureC a place to put the temperature.
-    // \return true if successful, otherwise false.
+    /** Get the boost mode low temperature limit.
+    * @param pTemperatureC a place to put the temperature.
+    * @return true if successful, otherwise false.
+    */
     bool getBoostLowerTemperatureLimit (int32_t *pTemperatureC);
     
-    /// Set the input voltage limit.  If the input falls below
-    // this level then charging will be ramped down.  The limit
-    // does not take effect until enableInputLimits() is called
-    // (default setting is disabled).
-    // \param voltageMV the input voltage limit, in milliVolts.
-    //        Range is 3880 mV to 5080 mV, default is 4760 mV.
-    // \return true if successful, otherwise false.
+    /** Set the input voltage limit.  If the input falls below
+    * this level then charging will be ramped down.  The limit
+    * does not take effect until enableInputLimits() is called
+    * (default setting is disabled).
+    * @param voltageMV the input voltage limit, in milliVolts.
+    *        Range is 3880 mV to 5080 mV, default is 4760 mV.
+    * @return true if successful, otherwise false.
+    */
     bool setInputVoltageLimit (int32_t voltageMV);
 
-    /// Get the input voltage limit.
-    // \param pVoltageMV a place to put the input voltage limit.
-    // \return true if successful, otherwise false.
+    /** Get the input voltage limit.
+    * @param pVoltageMV a place to put the input voltage limit.
+    * @return true if successful, otherwise false.
+    */
     bool getInputVoltageLimit (int32_t *pVoltageMV);
 
-    /// Set the input current limit.  If the current drawn
-    // goes above this limit then charging will be ramped down.
-    // The limit does not take effect until enableInputLimits()
-    // is called (default setting is disabled).
-    // \param currentMA the input current limit, in milliAmps.
-    //        Range is 100 mA to 3000 mA, default depends upon
-    //        hardware configuration, see section 8.3.1.4.3 of
-    //        the data sheet.
-    // \return true if successful, otherwise false.
+    /** Set the input current limit.  If the current drawn
+    * goes above this limit then charging will be ramped down.
+    * The limit does not take effect until enableInputLimits()
+    * is called (default setting is disabled).
+    * @param currentMA the input current limit, in milliAmps.
+    *        Range is 100 mA to 3000 mA, default depends upon
+    *        hardware configuration, see section 8.3.1.4.3 of
+    *        the data sheet.
+    * @return true if successful, otherwise false.
+    */
     bool setInputCurrentLimit (int32_t currentMA);
 
-    /// Get the input current limit.
-    // \param pCurrentMA a place to put the input current limit.
-    // \return true if successful, otherwise false.
+    /** Get the input current limit.
+    * @param pCurrentMA a place to put the input current limit.
+    * @return true if successful, otherwise false.
+    */
     bool getInputCurrentLimit (int32_t *pCurrentMA);
 
-    /// Enable input voltage and current limits.
-    // Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Enable input voltage and current limits.
+    * Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool enableInputLimits (void);
 
-    /// Remove any input voltage or current limits.
-    // Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Remove any input voltage or current limits.
+    * Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool disableInputLimits (void);
 
-    /// Check whether input limits are enabled.
-    // \return true if input limits are enabled, otherwise false.
+    /** Check whether input limits are enabled.
+    * @return true if input limits are enabled, otherwise false.
+    */
     bool areInputLimitsEnabled (void);
 
-    /// Set the thermal regulation threshold for the chip.
-    // \param temperatureC the temperature in C.
-    //        Values will be translated to the nearest (lower)
-    //        of 60 C, 80 C, 100 C and 120 C, default 120 C.
-    // \return true if successful, otherwise false.
+    /** Set the thermal regulation threshold for the chip.
+    * @param temperatureC the temperature in C.
+    *        Values will be translated to the nearest (lower)
+    *        of 60 C, 80 C, 100 C and 120 C, default 120 C.
+    * @return true if successful, otherwise false.
+    */
     bool setChipThermalRegulationThreshold (int32_t temperatureC);
 
-    /// Get the thermal regulation threshold for the chip.
-    // \param pTemperatureC a place to put the temperature.
-    // \return true if successful, otherwise false.
+    /** Get the thermal regulation threshold for the chip.
+    * @param pTemperatureC a place to put the temperature.
+    * @return true if successful, otherwise false.
+    */
     bool getChipThermalRegulationThreshold (int32_t *pTemperatureC);
     
-    /// Get the charger faults.
-    // Note: as with all the other API functions here, this should
-    // not be called from an interrupt function as the comms with the
-    // chip over I2C will take too long.
-    // \return a bit-map of that can be tested against ChargerFault.
+    /** Get the charger faults.
+    * Note: as with all the other API functions here, this should
+    * not be called from an interrupt function as the comms with the
+    * chip over I2C will take too long.
+    * @return a bit-map of that can be tested against ChargerFault.
+    */
     char getChargerFaults(void);
     
-    /// Enable shipping mode.
-    // In shipping mode the battery is disconnected from the system
-    // to avoid leakage.  Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Enable shipping mode.
+    * In shipping mode the battery is disconnected from the system
+    * to avoid leakage.  Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool enableShippingMode (void);
 
-    /// Disable shipping mode.
-    // In shipping mode the battery is disconnected from the system
-    // to avoid leakage.  Default is disabled.
-    // \return true if successful, otherwise false.
+    /** Disable shipping mode.
+    * In shipping mode the battery is disconnected from the system
+    * to avoid leakage.  Default is disabled.
+    * @return true if successful, otherwise false.
+    */
     bool disableShippingMode (void);
 
-    /// Check whether shipping mode is enabled.
-    // \return true if input limits are enabled, otherwise false.
+    /** Check whether shipping mode is enabled.
+    * @return true if input limits are enabled, otherwise false.
+    */
     bool isShippingModeEnabled (void);
 
-    /// Advanced function to read a register on the chip.
-    // \param address the address to read from.
-    // \param pValue a place to put the returned value.
-    // \return true if successful, otherwise false.
+    /** Advanced function to read a register on the chip.
+    * @param address the address to read from.
+    * @param pValue a place to put the returned value.
+    * @return true if successful, otherwise false.
+    */
     bool advancedGet(char address, char *pValue);
 
-    /// Advanced function to set a register on the chip.
-    // \param address the address to write to.
-    // \param value the value to write.
-    // \return true if successful, otherwise false.
+    /** Advanced function to set a register on the chip.
+    * @param address the address to write to.
+    * @param value the value to write.
+    * @return true if successful, otherwise false.
+    */
     bool advancedSet(char address, char value);
 
 protected:
-    /// Pointer to the I2C interface.
+    /** Pointer to the I2C interface. */
     I2C * gpI2c;
-    /// The address of the device.
+    /** The address of the device. */
     uint8_t gAddress;
-    /// Flag to indicate device is ready
+    /** Flag to indicate device is ready */
     bool gReady;
 
-    /// Read a register.
-    // Note: gpI2c should be locked before this is called.
-    // \param address the address to read from.
-    // \param pValue a place to put the returned value.
-    // \return true if successful, otherwise false.
+    /** Read a register.
+    * Note: gpI2c should be locked before this is called.
+    * @param address the address to read from.
+    * @param pValue a place to put the returned value.
+    * @return true if successful, otherwise false.
+    */
     bool getRegister(char address, char *pValue);
 
-    /// Set a register.
-    // Note: gpI2c should be locked before this is called.
-    // \param address the address to write to.
-    // \param value the value to write.
-    // \return true if successful, otherwise false.
+    /** Set a register.
+    * Note: gpI2c should be locked before this is called.
+    * @param address the address to write to.
+    * @param value the value to write.
+    * @return true if successful, otherwise false.
+    */
     bool setRegister(char address, char value);
 
-    /// Set a mask of bits in a register.
-    // Note: gpI2c should be locked before this is called.
-    // \param address the address to write to.
-    // \param mask the mask of bits to set.
-    // \return true if successful, otherwise false.
+    /** Set a mask of bits in a register.
+    * Note: gpI2c should be locked before this is called.
+    * @param address the address to write to.
+    * @param mask the mask of bits to set.
+    * @return true if successful, otherwise false.
+    */
     bool setRegisterBits(char address, char mask);
 
-    /// Clear a mask of bits in a register.
-    // Note: gpI2c should be locked before this is called.
-    // \param address the address to write to.
-    // \param mask the mask of bits to clear.
-    // \return true if successful, otherwise false.
+    /** Clear a mask of bits in a register.
+    * Note: gpI2c should be locked before this is called.
+    * @param address the address to write to.
+    * @param mask the mask of bits to clear.
+    * @return true if successful, otherwise false.
+    */
     bool clearRegisterBits(char address, char mask);
 };
 
 #endif
 
-// End Of File
+/* End Of File */