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 "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 configuration structure type. More...
 
struct  i2c_conf_t
 I2C configuration options. More...
 

Macros

#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.
 
#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.
 

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 */