We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c775cb7 commit 4cc0b4aCopy full SHA for 4cc0b4a
gd32e10x/cmsis/gd/gd32e10x/include/gd32e10x.h
@@ -57,7 +57,15 @@ OF SUCH DAMAGE.
57
#define HXTAL_VALUE ((uint32_t)25000000) /*!< value of the external oscillator in Hz */
58
#define HXTAL_VALUE_25M HXTAL_VALUE
59
#else
60
- #error "Please select the target board type used in your application (in gd32e10x.h file)"
+ /* get external oscillator from KCONFIG */
61
+ #define HXTAL_VALUE CONFIG_GD32_HXTAL_VALUE
62
+ #if HXTAL_VALUE == 8000000
63
+ #define HXTAL_VALUE_8M HXTAL_VALUE
64
+ #elif HXTAL_VALUE == 25000000
65
+ #define HXTAL_VALUE_25M HXTAL_VALUE
66
+ #else
67
+ #error "GD32E10X lib only support 8M and 25M oscillator (HXTAL)"
68
+ #endif
69
#endif
70
#endif /* high speed crystal oscillator value */
71
0 commit comments