/* Checks if the Backup DRx registers values are correct or not.  */
uint8_t CheckBackupReg(uint16_t FirstBackupData)
/* Checks if the Backup DRx registers values are correct or not.  */
uint8_t CheckBackupReg(uint16_t FirstBackupData)
{
  uint32_t index = 0;
  for (index = 0; index < BKP_DR_NUMBER; index++)
  {
    if (BKP_ReadBackupRegister(BKPDataReg[index]) != (FirstBackupData + (index * 0x5A)))
    {
      return (index + 1);
    }
  }
  return 0;
}