CPU specific definitions for internal peripheral handling. More...
CPU specific definitions for internal peripheral handling.
Definition in file periph_cpu.h.
#include "kernel_defines.h"
#include "mutex.h"
#include "cpu.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 "em_rtc.h"
Go to the source code of this file.
Data Structures | |
struct | clk_mux_t |
Clock mux configuration. More... | |
struct | clk_div_t |
Clock divider configuration. More... | |
struct | adc_conf_t |
ADC device configuration. More... | |
struct | adc_chan_conf_t |
ADC channel configuration. More... | |
struct | i2c_conf_t |
I2C configuration structure. 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 device 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 | 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 | CONFIG_EFM32_XTIMER_USE_LETIMER 0 |
Use LETIMER as the base timer for XTIMER. | |
#define | PROVIDES_PM_OFF |
CPU provides own pm_off() function. | |
#define | PROVIDES_PM_LAYERED_OFF |
CPU provides own pm_off() function. | |
#define | PM_NUM_MODES (3U) |
Number of usable power modes. | |
Enumerations | |
enum | |
Available ports on the EFM32. More... | |
#define | CPUID_LEN (8U) |
Length of CPU ID in octets. | |
#define | CLOCK_CORECLOCK SystemCoreClock |
CPU Frequency Define. | |
Real time counter configuration | |
#define | RTT_MAX_FREQUENCY (32768U) /* in Hz */ |
#define | RTT_MIN_FREQUENCY (1U) /* in Hz */ |
#define | RTT_CLOCK_FREQUENCY (32768U) /* in Hz, LFCLK*/ |
#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 |
#define | LETIMER_MAX_VALUE _LETIMER_TOP_MASK |
max timer value of LETIMER peripheral | |
#define | TIMER_MAX_VALUE _TIMER_TOP_MASK |
max timer value of TIMER peripheral | |
Available power modes | |
#define | EFM32_PM_MODE_EM3 (0U) |
CPU sleeps, peripherals in EM3 domain are active. | |
#define | EFM32_PM_MODE_EM2 (1U) |
CPU sleeps, peripherals in EM2 + EM3 domain are active. | |
#define | EFM32_PM_MODE_EM1 (2U) |
CPU sleeps, all peripherals are active. | |
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) |
USB device definitions | |
#define | USBDEV_NUM_ENDPOINTS 7 |
Number of USB OTG FS endpoints including EP0. | |
#define ADC_MODE | ( | x, | |
y | |||
) | ((y << 4) | x) |
Internal macro for combining ADC resolution (x) with number of shifts (y).
Definition at line 352 of file periph_cpu.h.
#define ADC_MODE_UNDEF | ( | x | ) | (ADC_MODE(x, 15)) |
Internal define to note that resolution is not supported.
Definition at line 357 of file periph_cpu.h.
#define CLOCK_CORECLOCK SystemCoreClock |
CPU Frequency Define.
Definition at line 76 of file periph_cpu.h.
#define CONFIG_EFM32_XTIMER_USE_LETIMER 0 |
Use LETIMER as the base timer for XTIMER.
Definition at line 576 of file periph_cpu.h.
#define CPUID_LEN (8U) |
Length of CPU ID in octets.
Definition at line 71 of file periph_cpu.h.
#define EFM32_PM_MODE_EM1 (2U) |
CPU sleeps, all peripherals are active.
Definition at line 685 of file periph_cpu.h.
#define EFM32_PM_MODE_EM2 (1U) |
CPU sleeps, peripherals in EM2 + EM3 domain are active.
Definition at line 684 of file periph_cpu.h.
#define EFM32_PM_MODE_EM3 (0U) |
CPU sleeps, peripherals in EM3 domain are active.
Definition at line 683 of file periph_cpu.h.
#define GPIO_MODE | ( | x, | |
y | |||
) | ((x << 1) | y) |
Internal macro for combining pin mode (x) and pull-up/down (y).
Definition at line 152 of file periph_cpu.h.
#define GPIO_PIN | ( | x, | |
y | |||
) | ((gpio_t) ((x << 4) | y)) |
Mandatory function for defining a GPIO pins.
Definition at line 147 of file periph_cpu.h.
#define GPIO_UNDEF (0xffffffff) |
Definition of a fitting UNDEF value.
Definition at line 142 of file periph_cpu.h.
#define HAVE_GPIO_T |
Define a custom type for GPIO pins.
Definition at line 135 of file periph_cpu.h.
#define HAVE_HWCRYPTO_AES128 |
Override hardware crypto supported methods.
Definition at line 403 of file periph_cpu.h.
#define LETIMER_MAX_VALUE _LETIMER_TOP_MASK |
max timer value of LETIMER peripheral
Definition at line 568 of file periph_cpu.h.
#define NWDT_TIME_LOWER_LIMIT ((1U << (3U + wdogPeriod_9)) + 1U) |
Definition at line 694 of file periph_cpu.h.
#define NWDT_TIME_UPPER_LIMIT ((1U << (3U + wdogPeriod_256k)) + 1U) |
Definition at line 695 of file periph_cpu.h.
#define PERIPH_I2C_NEED_READ_REG |
Declare needed generic I2C functions.
Definition at line 448 of file periph_cpu.h.
#define PERIPH_I2C_NEED_WRITE_REG |
Definition at line 449 of file periph_cpu.h.
#define PERIPH_SPI_NEEDS_INIT_CS |
Declare needed generic SPI functions.
Definition at line 534 of file periph_cpu.h.
#define PERIPH_SPI_NEEDS_TRANSFER_BYTE |
Definition at line 535 of file periph_cpu.h.
#define PERIPH_SPI_NEEDS_TRANSFER_REG |
Definition at line 536 of file periph_cpu.h.
#define PERIPH_SPI_NEEDS_TRANSFER_REGS |
Definition at line 537 of file periph_cpu.h.
#define PM_NUM_MODES (3U) |
Number of usable power modes.
Definition at line 677 of file periph_cpu.h.
#define PROVIDES_PM_LAYERED_OFF |
CPU provides own pm_off() function.
Definition at line 672 of file periph_cpu.h.
#define PROVIDES_PM_OFF |
CPU provides own pm_off() function.
Definition at line 667 of file periph_cpu.h.
#define RTT_CLOCK_FREQUENCY (32768U) /* in Hz, LFCLK*/ |
Definition at line 127 of file periph_cpu.h.
#define RTT_MAX_FREQUENCY (32768U) /* in Hz */ |
Definition at line 125 of file periph_cpu.h.
#define RTT_MIN_FREQUENCY (1U) /* in Hz */ |
Definition at line 126 of file periph_cpu.h.
#define TIMER_MAX_VALUE _TIMER_TOP_MASK |
max timer value of TIMER peripheral
Definition at line 569 of file periph_cpu.h.
#define USBDEV_NUM_ENDPOINTS 7 |
Number of USB OTG FS endpoints including EP0.
Definition at line 709 of file periph_cpu.h.
#define WDT_CLOCK_HZ (1000U) |
Definition at line 692 of file periph_cpu.h.
#define WDT_HAS_STOP (1U) |
Definition at line 702 of file periph_cpu.h.
typedef uint32_t gpio_t |
Definition at line 136 of file periph_cpu.h.
anonymous enum |
Available ports on the EFM32.
Definition at line 157 of file periph_cpu.h.