/* LCD Light up or shut off Battery Indicator.  */
void LCD_Battery(LCD_TypeDef *lcd, int batteryLevel)
/* LCD Light up or shut off Battery Indicator.  */
void LCD_Battery(LCD_TypeDef *lcd, int batteryLevel)
{
  uint32_t com, bitvalue;
  int      i, on;
  for (i = 0; i < 4; i++)
  {
    if (i < batteryLevel)
    {
      on = 1;
    }
    else
    {
      on = 0;
    }
    com      = EFMDisplay.Battery.com[i];
    bitvalue = 1 << EFMDisplay.Battery.bit[i];
    if (on)
    {
      LCD_enableSegment(lcd, com, bitvalue);
    }
    else
    {
      LCD_disableSegment(lcd, com, bitvalue);
    }
  }
}