periph_cpu.h File Reference

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

Detailed Description

CPU specific definitions for internal peripheral handling.

Author
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de
Bas Stottelaar basst.nosp@m.otte.nosp@m.laar@.nosp@m.gmai.nosp@m.l.com

Definition in file periph_cpu.h.

#include "kernel_defines.h"
#include "mutex.h"
#include "cpu_conf.h"
#include "em_adc.h"
#include "em_cmu.h"
#include "em_device.h"
#include "em_gpio.h"
#include "em_timer.h"
#include "em_usart.h"
#include "em_wdog.h"
+ Include dependency graph for periph_cpu.h:

Go to the source code of this file.

Data Structures

struct  adc_conf_t
 ADC device configuration. More...
 
struct  adc_chan_conf_t
 ADC channel configuration. More...
 
struct  i2c_conf_t
 I2C configuration options. More...
 
struct  pwm_chan_conf_t
 PWM channel configuration. More...
 
struct  pwm_conf_t
 PWM device configuration. More...
 
struct  spi_dev_t
 SPI device configuration. More...
 
struct  timer_dev_t
 Define timer configuration values. More...
 
struct  timer_conf_t
 Timer configuration. More...
 
struct  uart_conf_t
 UART device configuration. More...
 

Macros

#define GPIO_UNDEF   (0xffffffff)
 Definition of a fitting UNDEF value.
 
#define GPIO_PIN(x, y)   ((gpio_t) ((x << 4) | y))
 Mandatory function for defining a GPIO pins.
 
#define GPIO_MODE(x, y)   ((x << 1) | y)
 Internal macro for combining pin mode (x) and pull-up/down (y).
 
#define CONFIG_EFM32_XTIMER_USE_LETIMER   0
 Use LETIMER as the base timer for XTIMER.
 
#define PROVIDES_PM_LAYERED_OFF
 CPU provides own pm_off() function.
 
#define PM_NUM_MODES   (2U)
 Number of usable power modes.
 

Enumerations

enum  
 Available ports on the EFM32.
 
#define ADC_MODE(x, y)   ((y << 4) | x)
 Internal macro for combining ADC resolution (x) with number of shifts (y).
 
#define ADC_MODE_UNDEF(x)   (ADC_MODE(x, 15))
 Internal define to note that resolution is not supported.
 
#define CPUID_LEN   (8U)
 Length of CPU ID in octets.
 
#define CLOCK_CORECLOCK   SystemCoreClock
 CPU Frequency Define.
 
#define HAVE_GPIO_T
 Define a custom type for GPIO pins.
 
typedef uint32_t gpio_t
 
#define HAVE_HWCRYPTO_AES128
 Override hardware crypto supported methods.
 
#define PERIPH_I2C_NEED_READ_REG
 Declare needed generic I2C functions.
 
#define PERIPH_I2C_NEED_WRITE_REG
 
#define PERIPH_SPI_NEEDS_INIT_CS
 Declare needed generic SPI functions.
 
#define PERIPH_SPI_NEEDS_TRANSFER_BYTE
 
#define PERIPH_SPI_NEEDS_TRANSFER_REG
 
#define PERIPH_SPI_NEEDS_TRANSFER_REGS
 

Watchdog timer (WDT) configuration

#define WDT_CLOCK_HZ   (1000U)
 
#define NWDT_TIME_LOWER_LIMIT   ((1U << (3U + wdogPeriod_9)) + 1U)
 
#define NWDT_TIME_UPPER_LIMIT   ((1U << (3U + wdogPeriod_256k)) + 1U)
 
#define WDT_HAS_STOP   (1U)