/* unlock the FMC bank0 operation this function can be used for all GD32F10x devices. for GD32F10x_MD and GD32F10x_HD, this function unlocks bank0. for GD32F10x_XD and GD32F10x_CL with flash no more than 512KB, it is equivalent to fmc_unlock function.  */
void fmc_bank0_unlock(void)
/* unlock the FMC bank0 operation this function can be used for all GD32F10x devices. for GD32F10x_MD and GD32F10x_HD, this function unlocks bank0. for GD32F10x_XD and GD32F10x_CL with flash no more than 512KB, it is equivalent to fmc_unlock function.  */
void fmc_bank0_unlock(void)
{
    if((RESET != (FMC_CTL0 & FMC_CTL0_LK))){
        FMC_KEY0 = UNLOCK_KEY0;
        FMC_KEY0 = UNLOCK_KEY1;
    }
}