Loading...
Searching...
No Matches
periph_conf.h File Reference

Board specific definitions for the SeeedStudio GD32 RISC-V board. More...

Detailed Description

Board specific definitions for the SeeedStudio GD32 RISC-V board.

Author
Koen Zandberg koen@.nosp@m.berg.nosp@m.zand..nosp@m.net
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file periph_conf.h.

#include "macros/units.h"
#include "periph_cpu.h"
#include "periph_common_conf.h"
#include "cfg_i2c_default.h"
#include "cfg_spi_default.h"
#include "cfg_timer_default.h"
#include "cfg_uart_default.h"
#include "cfg_usbdev_default.h"
+ Include dependency graph for periph_conf.h:

Go to the source code of this file.

#define CONFIG_BOARD_HAS_HXTAL   1
 The board provides a high frequency oscillator.
 
#define CONFIG_BOARD_HAS_LXTAL   1
 The board provides a low frequency oscillator.
 
#define CONFIG_CLOCK_HXTAL   MHZ(8)
 HXTAL frequency.
 
#define SPI_DEV_1_USED   1
 Enable SPI_DEV(1) by default for the connected Flash.
 
#define I2C_DEV_1_USED   1
 Enable I2C_DEV(1) by default.
 

ADC configuration

#define ADC_NUMOF   ARRAY_SIZE(adc_config)
 
static const adc_conf_t adc_config []
 

PWM configuration

#define PWM_NUMOF   ARRAY_SIZE(pwm_config)
 
static const pwm_conf_t pwm_config []
 

Macro Definition Documentation

◆ ADC_NUMOF

#define ADC_NUMOF   ARRAY_SIZE(adc_config)

Definition at line 79 of file periph_conf.h.

◆ CONFIG_BOARD_HAS_HXTAL

#define CONFIG_BOARD_HAS_HXTAL   1

The board provides a high frequency oscillator.

Definition at line 27 of file periph_conf.h.

◆ CONFIG_BOARD_HAS_LXTAL

#define CONFIG_BOARD_HAS_LXTAL   1

The board provides a low frequency oscillator.

Definition at line 31 of file periph_conf.h.

◆ CONFIG_CLOCK_HXTAL

#define CONFIG_CLOCK_HXTAL   MHZ(8)

HXTAL frequency.

Definition at line 35 of file periph_conf.h.

◆ I2C_DEV_1_USED

#define I2C_DEV_1_USED   1

Enable I2C_DEV(1) by default.

Definition at line 43 of file periph_conf.h.

◆ PWM_NUMOF

#define PWM_NUMOF   ARRAY_SIZE(pwm_config)

Definition at line 117 of file periph_conf.h.

◆ SPI_DEV_1_USED

#define SPI_DEV_1_USED   1

Enable SPI_DEV(1) by default for the connected Flash.

Definition at line 39 of file periph_conf.h.

Variable Documentation

◆ adc_config

const adc_conf_t adc_config[]
static
Initial value:
= {
{ .pin = GPIO_PIN(PORT_A, 1), .dev = 0, .chan = 1 },
{ .pin = GPIO_PIN(PORT_A, 2), .dev = 0, .chan = 2 },
{ .pin = GPIO_PIN(PORT_A, 3), .dev = 0, .chan = 3 },
{ .pin = GPIO_PIN(PORT_C, 0), .dev = 0, .chan = 10 },
{ .pin = GPIO_PIN(PORT_C, 1), .dev = 0, .chan = 11 },
{ .pin = GPIO_PIN(PORT_C, 2), .dev = 0, .chan = 12 },
{ .pin = GPIO_PIN(PORT_C, 3), .dev = 0, .chan = 13 },
{ .pin = GPIO_PIN(PORT_C, 4), .dev = 0, .chan = 14 },
{ .pin = GPIO_PIN(PORT_C, 5), .dev = 0, .chan = 15 },
{ .pin = GPIO_UNDEF, .dev = 0, .chan = 16 },
{ .pin = GPIO_UNDEF, .dev = 0, .chan = 17 },
}
@ PORT_C
port C
Definition periph_cpu.h:49
@ PORT_A
port A
Definition periph_cpu.h:47
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
#define GPIO_UNDEF
Definition of a fitting UNDEF value.

Definition at line 63 of file periph_conf.h.

◆ pwm_config

const pwm_conf_t pwm_config[]
static
Initial value:
= {
{
.dev = TIMER2,
.rcu_mask = RCU_APB1EN_TIMER2EN_Msk,
.chan = {
{ .pin = GPIO_PIN(PORT_B, 0), .cc_chan = 2 },
{ .pin = GPIO_PIN(PORT_B, 1), .cc_chan = 3 },
{ .pin = GPIO_UNDEF, .cc_chan = 0 },
{ .pin = GPIO_UNDEF, .cc_chan = 1 },
},
.bus = APB1,
},
{
.dev = TIMER3,
.rcu_mask = RCU_APB1EN_TIMER3EN_Msk,
.chan = {
{ .pin = GPIO_PIN(PORT_B, 8), .cc_chan = 2 },
{ .pin = GPIO_PIN(PORT_B, 9), .cc_chan = 3 },
{ .pin = GPIO_UNDEF, .cc_chan = 0 },
{ .pin = GPIO_UNDEF, .cc_chan = 1 },
},
.bus = APB1,
},
}
@ PORT_B
port B
Definition periph_cpu.h:48
@ GPIO_AF_OUT_PP
alternate function output - push-pull
Definition periph_cpu.h:167
@ APB1
Advanced Peripheral Bus 1
Definition periph_cpu.h:79

Definition at line 86 of file periph_conf.h.