1 /*! 2 \file system_gd32vf103.h 3 \brief RISC-V Device Peripheral Access Layer Header File for 4 GD32VF103 Device Series 5 6 \version 2019-06-05, V1.0.0, firmware for GD32VF103 7 \version 2020-08-04, V1.1.0, firmware for GD32VF103 8 */ 9 10 /* 11 Copyright (c) 2020, GigaDevice Semiconductor Inc. 12 13 Redistribution and use in source and binary forms, with or without modification, 14 are permitted provided that the following conditions are met: 15 16 1. Redistributions of source code must retain the above copyright notice, this 17 list of conditions and the following disclaimer. 18 2. Redistributions in binary form must reproduce the above copyright notice, 19 this list of conditions and the following disclaimer in the documentation 20 and/or other materials provided with the distribution. 21 3. Neither the name of the copyright holder nor the names of its contributors 22 may be used to endorse or promote products derived from this software without 23 specific prior written permission. 24 25 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 26 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 27 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 28 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 29 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 30 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 31 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 32 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 33 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 34 OF SUCH DAMAGE. 35 */ 36 37 /* This file refers the RISC-V standard, some adjustments are made according to GigaDevice chips */ 38 39 #ifndef SYSTEM_GD32VF103_H 40 #define SYSTEM_GD32VF103_H 41 42 #ifdef __cplusplus 43 extern "C" { 44 #endif 45 46 #include <stdint.h> 47 48 #if defined (__ICCRISCV__) 49 #include "compiler.h" 50 #endif 51 52 /* system clock frequency (core clock) */ 53 extern uint32_t SystemCoreClock; 54 55 /* function declarations */ 56 /* initialize the system and update the SystemCoreClock variable */ 57 extern void SystemInit(void); 58 /* update the SystemCoreClock with current core clock retrieved from cpu registers */ 59 extern void SystemCoreClockUpdate(void); 60 61 #ifdef __cplusplus 62 } 63 #endif 64 65 #endif /* SYSTEM_GD32VF103_H */ 66