/* toggle the led every 500ms 
, 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) */
void led_spark(void)
/* toggle the led every 500ms 
, 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) */
void led_spark(void)
{
    static __IO uint32_t timingdelaylocal = 0;
    if(timingdelaylocal) {
        if(timingdelaylocal < 500) {
            gd_eval_ledon(LED2);
        } else {
            gd_eval_ledoff(LED2);
        }
        timingdelaylocal--;
    } else {
        timingdelaylocal = 1000;
    }
}