/* Configures the RTC output for the output pin (RTC_ALARM output).  */
void RTC_OutputConfig(RTC_Output_TypeDef RTC_Output, RTC_OutputPolarity_TypeDef RTC_OutputPolarity)
/* Configures the RTC output for the output pin (RTC_ALARM output).  */
void RTC_OutputConfig(RTC_Output_TypeDef RTC_Output, RTC_OutputPolarity_TypeDef RTC_OutputPolarity)
{
  assert_param(IS_RTC_OUTPUT_SEL(RTC_Output));
  assert_param(IS_RTC_OUTPUT_POL(RTC_OutputPolarity));
  RTC_WriteProtectionCmd(DISABLE);
  RTC->CR3 &= (uint8_t)~(RTC_CR3_OSEL | RTC_CR3_POL);
  RTC->CR3 |= (uint8_t)((uint8_t)RTC_Output | (uint8_t)RTC_OutputPolarity);
  RTC_WriteProtectionCmd(ENABLE);
}