system_gd32vf103.h 2.5 KB

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