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

Board specific definitions for the Sipeed Longan Nano board. More...

Detailed Description

Board specific definitions for the Sipeed Longan Nano board.

Author
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   0
 Disable SPI_DEV(1) by default for the non-TFT version.
 
#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 []
 

DAC configuration

#define DAC_NUMOF   ARRAY_SIZE(dac_config)
 
static const dac_conf_t dac_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 92 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 25 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 29 of file periph_conf.h.

◆ CONFIG_CLOCK_HXTAL

#define CONFIG_CLOCK_HXTAL   MHZ(8)

HXTAL frequency.

Definition at line 33 of file periph_conf.h.

◆ DAC_NUMOF

#define DAC_NUMOF   ARRAY_SIZE(dac_config)

Definition at line 106 of file periph_conf.h.

◆ I2C_DEV_1_USED

#define I2C_DEV_1_USED   1

Enable I2C_DEV(1) by default.

Definition at line 45 of file periph_conf.h.

◆ PWM_NUMOF

#define PWM_NUMOF   ARRAY_SIZE(pwm_config)

Definition at line 144 of file periph_conf.h.

◆ SPI_DEV_1_USED

#define SPI_DEV_1_USED   0

Disable SPI_DEV(1) by default for the non-TFT version.

Definition at line 40 of file periph_conf.h.

Variable Documentation

◆ adc_config

const adc_conf_t adc_config[]
static
Initial value:
= {
{ .pin = GPIO_PIN(PORT_A, 0), .dev = 0, .chan = 0 },
{ .pin = GPIO_PIN(PORT_A, 3), .dev = 0, .chan = 3 },
{ .pin = GPIO_UNDEF, .dev = 0, .chan = 16 },
{ .pin = GPIO_UNDEF, .dev = 0, .chan = 17 },
{ .pin = GPIO_PIN(PORT_A, 4), .dev = 0, .chan = 4 },
{ .pin = GPIO_PIN(PORT_B, 0), .dev = 0, .chan = 8 },
{ .pin = GPIO_PIN(PORT_B, 1), .dev = 0, .chan = 9 },
{ .pin = GPIO_PIN(PORT_A, 6), .dev = 0, .chan = 6 },
{ .pin = GPIO_PIN(PORT_A, 7), .dev = 0, .chan = 7 },
{ .pin = GPIO_PIN(PORT_A, 5), .dev = 0, .chan = 5 },
}
@ PORT_B
port B
Definition periph_cpu.h:48
@ 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 65 of file periph_conf.h.

◆ dac_config

const dac_conf_t dac_config[]
static
Initial value:
= {
{ .pin = GPIO_PIN(PORT_A, 4), .chan = 0 },
{ .pin = GPIO_PIN(PORT_A, 5), .chan = 1 },
}

Definition at line 99 of file periph_conf.h.

◆ pwm_config

const pwm_conf_t pwm_config[]
static
Initial value:
= {
{
.dev = TIMER4,
.rcu_mask = RCU_APB1EN_TIMER4EN_Msk,
.chan = {
{ .pin = GPIO_PIN(PORT_A, 1), .cc_chan = 1 },
{ .pin = GPIO_PIN(PORT_A, 2), .cc_chan = 2 },
{ .pin = GPIO_UNDEF, .cc_chan = 0 },
{ .pin = GPIO_UNDEF, .cc_chan = 3 },
},
.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,
},
}
@ 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 113 of file periph_conf.h.