Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015-2020 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "cpu.h"
20#include "periph_conf.h"
21#include "periph/gpio.h"
22#include "periph/spi.h"
23#include "periph/timer.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
36#if IS_ACTIVE(CONFIG_EFM32_ZTIMER_USE_LETIMER)
37# define CONFIG_ZTIMER_USEC_DEV (TIMER_DEV(1))
38# define CONFIG_ZTIMER_USEC_BASE_FREQ (32768UL)
39# define CONFIG_ZTIMER_USEC_WIDTH (16)
40# define CONFIG_ZTIMER_USEC_ADJUST_SET (37)
41# define CONFIG_ZTIMER_USEC_ADJUST_SLEEP (37)
42#else
43# define CONFIG_ZTIMER_USEC_DEV (TIMER_DEV(0))
44# define CONFIG_ZTIMER_USEC_BASE_FREQ (250000UL)
45# define CONFIG_ZTIMER_USEC_WIDTH (16)
46# define CONFIG_ZTIMER_USEC_ADJUST_SET (24)
47# define CONFIG_ZTIMER_USEC_ADJUST_SLEEP (24)
48#endif
50
55#define PB0_PIN GPIO_PIN(PD, 15)
56#define PB1_PIN GPIO_PIN(PD, 13)
57#define PB2_PIN GPIO_PIN(PB, 11)
59
64#define LED0_PIN GPIO_PIN(PF, 2)
65#define LED1_PIN GPIO_PIN(PF, 3)
67
74#define CORETEMP_ADC ADC_LINE(0)
76
81#define LED0_ON gpio_set(LED0_PIN)
82#define LED0_OFF gpio_clear(LED0_PIN)
83#define LED0_TOGGLE gpio_toggle(LED0_PIN)
84#define LED1_ON gpio_set(LED1_PIN)
85#define LED1_OFF gpio_clear(LED1_PIN)
86#define LED1_TOGGLE gpio_toggle(LED1_PIN)
88
89#ifdef __cplusplus
90}
91#endif
92
Configuration of CPU peripherals for the E180-ZG120B-TB Test Board.
Low-level timer peripheral driver interface definitions.
Low-level GPIO peripheral driver interface definitions.
Low-level SPI peripheral driver interface definition.