23 #ifndef CONFIG_BOARD_HAS_HXTAL
24 #define CONFIG_BOARD_HAS_HXTAL 1
27 #ifndef CONFIG_BOARD_HAS_LXTAL
28 #define CONFIG_BOARD_HAS_LXTAL 1
31 #ifndef CONFIG_CLOCK_HXTAL
32 #define CONFIG_CLOCK_HXTAL MHZ(8)
35 #ifndef I2C_DEV_1_USED
36 #define I2C_DEV_1_USED 1
39 #include "periph_cpu.h"
42 #include "cfg_spi_default.h"
43 #include "cfg_uart_default.h"
44 #include "cfg_usbdev_default.h"
68 .rcu_mask = RCU_APB1EN_I2C1EN_Msk,
73 #define I2C_NUMOF ARRAY_SIZE(i2c_config)
93 #define ADC_NUMOF ARRAY_SIZE(adc_config)
104 .rcu_mask = RCU_APB2EN_TIMER0EN_Msk,
106 .irqn = TIMER0_Channel_IRQn
111 .rcu_mask = RCU_APB1EN_TIMER1EN_Msk,
119 .rcu_mask = RCU_APB1EN_TIMER4EN_Msk,
125 #define TIMER_0_IRQN TIMER0_Channel_IRQn
126 #define TIMER_1_IRQN TIMER1_IRQn
127 #define TIMER_2_IRQN TIMER4_IRQn
129 #define TIMER_NUMOF ARRAY_SIZE(timer_config)
139 .rcu_mask = RCU_APB1EN_TIMER2EN_Msk,
152 .rcu_mask = RCU_APB1EN_TIMER3EN_Msk,
165 #define PWM_NUMOF ARRAY_SIZE(pwm_config)
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
#define GPIO_UNDEF
Definition of a fitting UNDEF value.
static const timer_conf_t timer_config[]
All timers on board.
static const i2c_conf_t i2c_config[]
PB10/PB11 (D15/D14) as I2C for Arduino UNO compatibility.
static const adc_conf_t adc_config[]
ADC configuration.
static const pwm_conf_t pwm_config[]
Actual PWM configuration.
@ GPIO_AF_OUT_PP
alternate function output - push-pull
@ APB1
Advanced Peripheral Bus 1
@ APB2
Advanced Peripheral Bus 2
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Common peripheral configuration for GD32VF103 boards.
ADC device configuration.
gpio_t pin
pin connected to the channel
I2C configuration structure.
TWI_t * dev
Pointer to hardware module registers.
PWM device configuration.
mini_timer_t * dev
Timer used.
Timer device configuration.
TC0_t * dev
Pointer to the used as Timer device.