/* param base IRTC peripheral base address param cloOut select clock to use for output  */
void IRTC_ConfigClockOut(RTC_Type *base, irtc_clockout_sel_t clkOut)
/* param base IRTC peripheral base address param cloOut select clock to use for output  */
void IRTC_ConfigClockOut(RTC_Type *base, irtc_clockout_sel_t clkOut)
{
    uint16_t ctrlVal = base->CTRL;
    ctrlVal &= (uint16_t)(~RTC_CTRL_CLKOUT_MASK);
    ctrlVal |= RTC_CTRL_CLKOUT((uint16_t)clkOut);
    if (clkOut == kIRTC_ClkoutCoarse1Hz)
    {
        ctrlVal |= RTC_CTRL_COMP_EN_MASK;
    }
    else if (clkOut == kIRTC_ClkoutFine1Hz)
    {
        ctrlVal |= RTC_CTRL_FINEEN_MASK;
    }
    else
    {
    }
    base->CTRL = ctrlVal;
}