Index: firmware/App/Drivers/Battery.c =================================================================== diff -u -re8ca208215236d28f5db7c2deb5500facb0cc481 -r88868fb5e8f2fcc82f50a952be700863f3cbe19c --- firmware/App/Drivers/Battery.c (.../Battery.c) (revision e8ca208215236d28f5db7c2deb5500facb0cc481) +++ firmware/App/Drivers/Battery.c (.../Battery.c) (revision 88868fb5e8f2fcc82f50a952be700863f3cbe19c) @@ -212,6 +212,27 @@ /*********************************************************************//** * @brief + * The isACPowerLost function determines whether A/C power loss has been + * detected. + * @details Inputs: none + * @details Outputs: none + * @return TRUE if A/C power loss condition is in effect, FALSE if not + *************************************************************************/ +BOOL isACPowerLost( void ) +{ + BOOL result = TRUE; + + if ( ( FALSE == isAlarmConditionDetected( ALARM_ID_HD_AC_POWER_LOST ) ) && + ( FALSE == isAlarmConditionDetected( ALARM_ID_HD_AC_POWER_LOST_IN_TREATMENT ) ) ) + { + result = FALSE; + } + + return result; +} + +/*********************************************************************//** + * @brief * The getBatteryRemainingCapacity_mWh function returns the latest battery * remaining capacity (in mWh). * @details Inputs: batteryRemCapacity_mWh