20 #ifndef CONFIG_BOARD_HAS_HXTAL 
   21 #define CONFIG_BOARD_HAS_HXTAL  1    
   24 #ifndef CONFIG_BOARD_HAS_LXTAL 
   25 #define CONFIG_BOARD_HAS_LXTAL  1    
   28 #ifndef CONFIG_CLOCK_HXTAL 
   29 #define CONFIG_CLOCK_HXTAL      MHZ(8)       
   32 #ifndef I2C_DEV_1_USED 
   33 #define I2C_DEV_1_USED          1    
   36 #include "periph_cpu.h" 
   39 #include "cfg_spi_default.h" 
   40 #include "cfg_uart_default.h" 
   41 #include "cfg_usbdev_default.h" 
   65         .rcu_mask       = RCU_APB1EN_I2C1EN_Msk,
 
   70 #define I2C_NUMOF   ARRAY_SIZE(i2c_config) 
   90 #define ADC_NUMOF           ARRAY_SIZE(adc_config) 
  101         .rcu_mask = RCU_APB2EN_TIMER0EN_Msk,
 
  103         .irqn     = TIMER0_Channel_IRQn
 
  108         .rcu_mask = RCU_APB1EN_TIMER1EN_Msk,
 
  116         .rcu_mask = RCU_APB1EN_TIMER4EN_Msk,
 
  122 #define TIMER_0_IRQN        TIMER0_Channel_IRQn 
  123 #define TIMER_1_IRQN        TIMER1_IRQn 
  124 #define TIMER_2_IRQN        TIMER4_IRQn 
  126 #define TIMER_NUMOF         ARRAY_SIZE(timer_config) 
  136         .rcu_mask = RCU_APB1EN_TIMER2EN_Msk,
 
  149         .rcu_mask = RCU_APB1EN_TIMER3EN_Msk,
 
  162 #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.