/* main function 
, V1.0.0, firmware for GD32F1x0(x=3,5) , V2.0.0, firmware for GD32F1x0(x=3,5,7,9) , V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) */
int main(void)
/* main function 
, V1.0.0, firmware for GD32F1x0(x=3,5) , V2.0.0, firmware for GD32F1x0(x=3,5,7,9) , V3.0.0, firmware update for GD32F1x0(x=3,5,7,9) */
int main(void)
{
    gd_eval_ledinit(LED1);
    gd_eval_ledinit(LED2);
    gd_eval_ledon(LED1);
    gd_eval_ledon(LED2);
    systick_config();
    if (RESET != rcu_flag_get(RCU_FLAG_WWDGTRST)){
        gd_eval_ledon(LED1);
        rcu_reset_flag_clear();
        while(1);
    }else{
        delay_1ms(150);
        gd_eval_ledoff(LED1);
    }
    rcu_periph_clock_enable(RCU_WWDGT);
    wwdgt_config(127,80,WWDGT_CFG_PSC_DIV8);
    wwdgt_enable();
    while (1){
        gd_eval_ledtoggle(LED2);
        delay_1ms(25);
        wwdgt_counter_update(127);
    }
}