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

Peripheral specific definitions for the HiFive1b RISC-V board. More...

Detailed Description

Peripheral specific definitions for the HiFive1b RISC-V board.

Author
Ken Rabold
Alexandre Abadie alexa.nosp@m.ndre.nosp@m..abad.nosp@m.ie@i.nosp@m.nria..nosp@m.fr

Definition in file periph_conf.h.

#include "kernel_defines.h"
#include "macros/units.h"
#include "periph_cpu.h"
#include "clk_conf.h"
+ Include dependency graph for periph_conf.h:

Go to the source code of this file.

Timer configuration

#define TIMER_NUMOF   (1)
 

UART configuration

#define UART_NUMOF   ARRAY_SIZE(uart_config)
 
static const uart_conf_t uart_config []
 

SPI device configuration

#define SPI_NUMOF   ARRAY_SIZE(spi_config)
 
static const spi_conf_t spi_config []
 

PWM configuration

#define PWM_NUMOF   (3)
 

I2C configuration

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)
 
static const i2c_conf_t i2c_config []
 

Macro Definition Documentation

◆ I2C_NUMOF

#define I2C_NUMOF   ARRAY_SIZE(i2c_config)

Definition at line 101 of file periph_conf.h.

◆ PWM_NUMOF

#define PWM_NUMOF   (3)

Definition at line 85 of file periph_conf.h.

◆ SPI_NUMOF

#define SPI_NUMOF   ARRAY_SIZE(spi_config)

Definition at line 77 of file periph_conf.h.

◆ TIMER_NUMOF

#define TIMER_NUMOF   (1)

Definition at line 38 of file periph_conf.h.

◆ UART_NUMOF

#define UART_NUMOF   ARRAY_SIZE(uart_config)

Definition at line 60 of file periph_conf.h.

Variable Documentation

◆ i2c_config

const i2c_conf_t i2c_config[]
static
Initial value:
= {
{
.addr = I2C0_CTRL_ADDR,
.scl = GPIO_PIN(0, 13),
.sda = GPIO_PIN(0, 12),
.speed = I2C_SPEED_NORMAL,
},
}
#define GPIO_PIN(x, y)
Define a CPU specific GPIO pin generator macro.
Definition periph_cpu.h:46
@ I2C_SPEED_NORMAL
normal mode: ~100 kbit/s
Definition periph_cpu.h:278

Definition at line 92 of file periph_conf.h.

◆ spi_config

const spi_conf_t spi_config[]
static
Initial value:
= {
{
.addr = SPI1_CTRL_ADDR,
.mosi = GPIO_PIN(0, 3),
.miso = GPIO_PIN(0, 4),
.sclk = GPIO_PIN(0, 5),
},
}

Definition at line 68 of file periph_conf.h.

◆ uart_config

const uart_conf_t uart_config[]
static
Initial value:
= {
{
.addr = UART0_CTRL_ADDR,
.rx = GPIO_PIN(0, 16),
.tx = GPIO_PIN(0, 17),
.isr_num = INT_UART0_BASE,
},
{
.addr = UART1_CTRL_ADDR,
.rx = GPIO_PIN(0, 23),
.tx = GPIO_PIN(0, 18),
.isr_num = INT_UART1_BASE,
},
}

Definition at line 45 of file periph_conf.h.