board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Freie Universität Berlin
3  * Copyright (C) 2015 PHYTEC Messtechnik GmbH
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser General
6  * Public License v2.1. See the file LICENSE in the top level directory for more
7  * details.
8  */
9 
10 #pragma once
11 
23 #include "cpu.h"
24 #include "periph_conf.h"
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
35 #define LED0_PIN GPIO_PIN(PORT_D, 6)
36 #define LED1_PIN GPIO_PIN(PORT_D, 4)
37 #define LED2_PIN GPIO_PIN(PORT_A, 4)
38 
39 #define LED0_MASK (1 << 6)
40 #define LED1_MASK (1 << 4)
41 #define LED2_MASK (1 << 4)
42 
43 #define LED0_ON (GPIOD->PCOR = LED0_MASK)
44 #define LED0_OFF (GPIOD->PSOR = LED0_MASK)
45 #define LED0_TOGGLE (GPIOD->PTOR = LED0_MASK)
46 
47 #define LED1_ON (GPIOD->PCOR = LED1_MASK)
48 #define LED1_OFF (GPIOD->PSOR = LED1_MASK)
49 #define LED1_TOGGLE (GPIOD->PTOR = LED1_MASK)
50 
51 #define LED2_ON (GPIOA->PCOR = LED2_MASK)
52 #define LED2_OFF (GPIOA->PSOR = LED2_MASK)
53 #define LED2_TOGGLE (GPIOA->PTOR = LED2_MASK)
60 #define BTN0_PIN GPIO_PIN(PORT_D, 1)
61 #define BTN0_MODE GPIO_IN_PU
68 #define BTN1_PORT PORTC
69 #define BTN1_PIN GPIO_PIN(PORT_C, 6)
70 #define BTN1_MODE GPIO_IN
79 #define KW2XRF_PARAM_SPI SPI_DEV(1)
80 #define KW2XRF_PARAM_SPI_CLK (SPI_CLK_10MHZ)
81 #define KW2XRF_PARAM_CS GPIO_PIN(KW2XDRF_PORT, KW2XDRF_PCS0_PIN)
82 #define KW2XRF_PARAM_INT GPIO_PIN(KW2XDRF_PORT, KW2XDRF_IRQ_PIN)
83 #define KW2XRF_PARAM_RESET GPIO_PIN(KW2XDRF_IRQ_PIN, KW2XDRF_RST_PIN)
84 #define KW2XRF_SHARED_SPI (0)
92 #define TMP00X_PARAM_ADDR (0x41)
95 #ifdef __cplusplus
96 }
97 #endif
98 
Peripheral MCU configuration for the Zigduino board.