/* Configure the Calib Pinout (RTC_CALIB) Selection (1Hz or 512Hz).  */
void RTC_CalibOutputConfig(RTC_CalibOutput_TypeDef RTC_CalibOutput)
/* Configure the Calib Pinout (RTC_CALIB) Selection (1Hz or 512Hz).  */
void RTC_CalibOutputConfig(RTC_CalibOutput_TypeDef RTC_CalibOutput)
{
  assert_param(IS_RTC_CALOUTPUT_SELECT(RTC_CalibOutput));
  RTC_WriteProtectionCmd(DISABLE);
  if (RTC_CalibOutput != RTC_CalibOutput_512Hz)
  {
    RTC->CR3 |= (uint8_t)RTC_CR3_COSEL;
  }
  else
  {
    RTC->CR3 &= (uint8_t)~RTC_CR3_COSEL;
  }
  RTC_WriteProtectionCmd(ENABLE);
}