board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017-2020 Bas Stottelaar <basstottelaar@gmail.com>
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
21 #include "cpu.h"
22 #include "periph_conf.h"
23 #include "periph/adc.h"
24 #include "periph/gpio.h"
25 #include "periph/spi.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
38 #if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
39 #define XTIMER_DEV (TIMER_DEV(1))
40 #define XTIMER_HZ (32768UL)
41 #define XTIMER_WIDTH (16)
42 #else
43 #define XTIMER_DEV (TIMER_DEV(0))
44 #define XTIMER_HZ (250000UL)
45 #define XTIMER_WIDTH (16)
46 #endif
47 #define XTIMER_CHAN (0)
54 #define LED0_PIN GPIO_PIN(PA, 1)
55 #define LED1_PIN GPIO_PIN(PB, 13)
62 #define LED0_ON gpio_set(LED0_PIN)
63 #define LED0_OFF gpio_clear(LED0_PIN)
64 #define LED0_TOGGLE gpio_toggle(LED0_PIN)
65 #define LED1_ON gpio_set(LED1_PIN)
66 #define LED1_OFF gpio_clear(LED1_PIN)
67 #define LED1_TOGGLE gpio_toggle(LED1_PIN)
76 #define CORETEMP_ADC ADC_LINE(0)
85 #define IKEA_TRADFRI_NOR_PAGE_SIZE (256)
86 #define IKEA_TRADFRI_NOR_PAGES_PER_SECTOR (16)
87 #define IKEA_TRADFRI_NOR_SECTOR_COUNT (64)
88 #define IKEA_TRADFRI_NOR_FLAGS (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
89 #define IKEA_TRADFRI_NOR_SPI_DEV SPI_DEV(0)
90 #define IKEA_TRADFRI_NOR_SPI_CLK SPI_CLK_1MHZ
91 #define IKEA_TRADFRI_NOR_SPI_CS GPIO_PIN(PB, 11)
92 #define IKEA_TRADFRI_NOR_SPI_MODE SPI_MODE_0
93 #define IKEA_TRADFRI_NOR_EN GPIO_PIN(PF, 3)
100 #define MTD_0 mtd_dev_get(0)
103 #ifdef __cplusplus
104 }
105 #endif
106 
Low-level ADC peripheral driver interface definitions.
Peripheral MCU configuration for the Zigduino board.
Low-level GPIO peripheral driver interface definitions.
Low-level SPI peripheral driver interface definition.