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

CPU specific definitions for internal peripheral handling. More...

Detailed Description

CPU specific definitions for internal peripheral handling.

Author
Ken Rabold

Definition in file periph_cpu.h.

#include <inttypes.h>
#include "periph_cpu_common.h"
#include "cpu.h"
+ Include dependency graph for periph_cpu.h:

Go to the source code of this file.

Data Structures

struct  uart_conf_t
 UART device configuration. More...
 
struct  spi_conf_t
 SPI device configuration. More...
 
struct  i2c_conf_t
 I2C configuration structure. More...
 

Macros

#define PERIPH_TIMER_PROVIDES_SET
 Prevent shared timer functions from being used.
 
#define WDT_INTR_PRIORITY   (PLIC_NUM_PRIORITIES)
 WDT interrupt priority: use highest priority.
 
#define WDT_HAS_STOP   (1)
 WDT can be stopped.
 
#define CPUID_LEN   (12U)
 Length of the CPU_ID in octets.
 
#define GPIO_UNDEF   (0xff)
 Definition of a fitting UNDEF value.
 
#define GPIO_PIN(x, y)   (x | y)
 Define a CPU specific GPIO pin generator macro.
 
#define GPIO_INTR_PRIORITY   (3)
 GPIO interrupt priority.
 
#define UART_ISR_PRIO   (2)
 UART interrupt priority.
 

This CPU makes use of the following shared SPI functions

#define PERIPH_SPI_NEEDS_TRANSFER_BYTE   1
 
#define PERIPH_SPI_NEEDS_TRANSFER_REG   1
 
#define PERIPH_SPI_NEEDS_TRANSFER_REGS   1
 

Use the shared I2C functions

#define PERIPH_I2C_NEED_READ_REG
 Use read reg function from periph common.
 
#define PERIPH_I2C_NEED_WRITE_REG
 Use write reg function from periph common.
 
#define PERIPH_I2C_NEED_READ_REGS
 Use read regs function from periph common.
 
#define PERIPH_I2C_NEED_WRITE_REGS
 Use write regs function from periph common.
 

WDT upper and lower bound times in ms

#define NWDT_TIME_LOWER_LIMIT   (1)
 
#define NWDT_TIME_UPPER_LIMIT   ((UINT32_MAX >> 15) * MS_PER_SEC + 1)
 

RTT/RTC configuration

#define RTT_INTR_PRIORITY   (2)
 
#define RTT_MAX_VALUE   (0xffffffff)
 
#define RTT_CLOCK_FREQUENCY   (32768U) /* in Hz */
 
#define RTT_MAX_FREQUENCY   (RTT_CLOCK_FREQUENCY) /* in Hz */
 
#define RTT_MIN_FREQUENCY   (1U) /* in Hz */
 
#define RTT_FREQUENCY   (RTT_MAX_FREQUENCY) /* in Hz */
 
void fe310_clock_init (void)
 Initialization of the clock.
 

Macro Definition Documentation

◆ CPUID_LEN

#define CPUID_LEN   (12U)

Length of the CPU_ID in octets.

Definition at line 42 of file periph_cpu.h.

◆ GPIO_INTR_PRIORITY

#define GPIO_INTR_PRIORITY   (3)

GPIO interrupt priority.

Definition at line 57 of file periph_cpu.h.

◆ GPIO_PIN

#define GPIO_PIN (   x,
 
)    (x | y)

Define a CPU specific GPIO pin generator macro.

Definition at line 52 of file periph_cpu.h.

◆ GPIO_UNDEF

#define GPIO_UNDEF   (0xff)

Definition of a fitting UNDEF value.

Definition at line 47 of file periph_cpu.h.

◆ NWDT_TIME_LOWER_LIMIT

#define NWDT_TIME_LOWER_LIMIT   (1)

Definition at line 139 of file periph_cpu.h.

◆ NWDT_TIME_UPPER_LIMIT

#define NWDT_TIME_UPPER_LIMIT   ((UINT32_MAX >> 15) * MS_PER_SEC + 1)

Definition at line 144 of file periph_cpu.h.

◆ PERIPH_I2C_NEED_READ_REG

#define PERIPH_I2C_NEED_READ_REG

Use read reg function from periph common.

Definition at line 103 of file periph_cpu.h.

◆ PERIPH_I2C_NEED_READ_REGS

#define PERIPH_I2C_NEED_READ_REGS

Use read regs function from periph common.

Definition at line 107 of file periph_cpu.h.

◆ PERIPH_I2C_NEED_WRITE_REG

#define PERIPH_I2C_NEED_WRITE_REG

Use write reg function from periph common.

Definition at line 105 of file periph_cpu.h.

◆ PERIPH_I2C_NEED_WRITE_REGS

#define PERIPH_I2C_NEED_WRITE_REGS

Use write regs function from periph common.

Definition at line 109 of file periph_cpu.h.

◆ PERIPH_SPI_NEEDS_TRANSFER_BYTE

#define PERIPH_SPI_NEEDS_TRANSFER_BYTE   1

Definition at line 78 of file periph_cpu.h.

◆ PERIPH_SPI_NEEDS_TRANSFER_REG

#define PERIPH_SPI_NEEDS_TRANSFER_REG   1

Definition at line 79 of file periph_cpu.h.

◆ PERIPH_SPI_NEEDS_TRANSFER_REGS

#define PERIPH_SPI_NEEDS_TRANSFER_REGS   1

Definition at line 80 of file periph_cpu.h.

◆ PERIPH_TIMER_PROVIDES_SET

#define PERIPH_TIMER_PROVIDES_SET

Prevent shared timer functions from being used.

Definition at line 96 of file periph_cpu.h.

◆ RTT_CLOCK_FREQUENCY

#define RTT_CLOCK_FREQUENCY   (32768U) /* in Hz */

Definition at line 165 of file periph_cpu.h.

◆ RTT_FREQUENCY

#define RTT_FREQUENCY   (RTT_MAX_FREQUENCY) /* in Hz */

Definition at line 170 of file periph_cpu.h.

◆ RTT_INTR_PRIORITY

#define RTT_INTR_PRIORITY   (2)

Definition at line 162 of file periph_cpu.h.

◆ RTT_MAX_FREQUENCY

#define RTT_MAX_FREQUENCY   (RTT_CLOCK_FREQUENCY) /* in Hz */

Definition at line 166 of file periph_cpu.h.

◆ RTT_MAX_VALUE

#define RTT_MAX_VALUE   (0xffffffff)

Definition at line 164 of file periph_cpu.h.

◆ RTT_MIN_FREQUENCY

#define RTT_MIN_FREQUENCY   (1U) /* in Hz */

Definition at line 167 of file periph_cpu.h.

◆ UART_ISR_PRIO

#define UART_ISR_PRIO   (2)

UART interrupt priority.

Definition at line 72 of file periph_cpu.h.

◆ WDT_HAS_STOP

#define WDT_HAS_STOP   (1)

WDT can be stopped.

Definition at line 155 of file periph_cpu.h.

◆ WDT_INTR_PRIORITY

#define WDT_INTR_PRIORITY   (PLIC_NUM_PRIORITIES)

WDT interrupt priority: use highest priority.

Definition at line 150 of file periph_cpu.h.