/*!
 * @file        main.c
 *
 * @brief       Main program body
 *
 * @version     V2.5
 *
 * @date        2024-08-08
 *
 * @attention
 *
 *  Copyright (C) 2020-2022 Geehy Semiconductor
 *
 *  You may not use this file except in compliance with the
 *  GEEHY COPYRIGHT NOTICE (GEEHY SOFTWARE PACKAGE LICENSE).
 *
 *  The program is only for reference, which is distributed in the hope
 *  that it will be useful and instructional for customers to develop
 *  their software. Unless required by applicable law or agreed to in
 *  writing, the program is distributed on an "AS IS" BASIS, WITHOUT
 *  ANY WARRANTY OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the GEEHY SOFTWARE PACKAGE LICENSE for the governing permissions
 *  and limitations under the License.
 */
#include "include.h"
#include "rtc_calendar.h"

/*!
 * @brief       Main program,RTC
 * when time == set_alarm();do rtc_isr();
 *  when clock == RTC_X24MDIV8_SOURCE;the error of 1 day(24 hours)is 8.2 second.
 * @param       None
 *
 * @retval      None
 *
 */

int main(void)
{
    printf("Hello GW3323 RTC !\n");
    bsp_sys_init();                     /*System initialization*/
    set_sys_clk(SYS_160M);

    rtc_calendar_init();

    while (1)
    {
         rtc_calendar_example();
    }
    return 0;
}
