1 /* 2 * Copyright (c) 2021 Tokita, Hiroshi <tokita.hiroshi@gmail.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/init.h> 8 #include <zephyr/irq.h> 9 10 #include <gd32vf103.h> 11 gigadevice_gd32v_soc_init(void)12static int gigadevice_gd32v_soc_init(void) 13 { 14 uint32_t key; 15 16 17 key = irq_lock(); 18 19 SystemInit(); 20 21 irq_unlock(key); 22 23 return 0; 24 } 25 26 SYS_INIT(gigadevice_gd32v_soc_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT); 27