/* Converts a 2 digit decimal to BCD format.  */
static uint8_t RTC_ByteToBcd2(uint8_t Value)
/* Converts a 2 digit decimal to BCD format.  */
static uint8_t RTC_ByteToBcd2(uint8_t Value)
{
  uint8_t bcdhigh = 0;
  while (Value >= 10)
  {
    bcdhigh++;
    Value -= 10;
  }
  return  ((uint8_t)(bcdhigh << 4) | Value);
}