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 
21 #ifndef BOARD_H
22 #define BOARD_H
23 
24 #include "cpu.h"
25 #include "periph_conf.h"
26 
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31 
36 #define LED0_PIN GPIO_PIN(PORT_D, 6)
37 #define LED1_PIN GPIO_PIN(PORT_D, 4)
38 #define LED2_PIN GPIO_PIN(PORT_A, 4)
39 
40 #define LED0_MASK (1 << 6)
41 #define LED1_MASK (1 << 4)
42 #define LED2_MASK (1 << 4)
43 
44 #define LED0_ON (GPIOD->PCOR = LED0_MASK)
45 #define LED0_OFF (GPIOD->PSOR = LED0_MASK)
46 #define LED0_TOGGLE (GPIOD->PTOR = LED0_MASK)
47 
48 #define LED1_ON (GPIOD->PCOR = LED1_MASK)
49 #define LED1_OFF (GPIOD->PSOR = LED1_MASK)
50 #define LED1_TOGGLE (GPIOD->PTOR = LED1_MASK)
51 
52 #define LED2_ON (GPIOA->PCOR = LED2_MASK)
53 #define LED2_OFF (GPIOA->PSOR = LED2_MASK)
54 #define LED2_TOGGLE (GPIOA->PTOR = LED2_MASK)
55 
61 #define BTN0_PORT PORTD
62 #define BTN0_PIN GPIO_PIN(PORT_D, 1)
63 #define BTN0_MODE GPIO_IN_PU
64 
70 #define BTN1_PORT PORTC
71 #define BTN1_PIN GPIO_PIN(PORT_C, 6)
72 #define BTN1_MODE GPIO_IN
73 
81 #define KW2XRF_PARAM_SPI SPI_DEV(1)
82 #define KW2XRF_PARAM_SPI_CLK (SPI_CLK_10MHZ)
83 #define KW2XRF_PARAM_CS GPIO_PIN(KW2XDRF_PORT, KW2XDRF_PCS0_PIN)
84 #define KW2XRF_PARAM_INT GPIO_PIN(KW2XDRF_PORT, KW2XDRF_IRQ_PIN)
85 #define KW2XRF_SHARED_SPI (0)
86 
93 #define TMP00X_PARAM_ADDR (0x41)
94 
99 void board_init(void);
100 
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif /* BOARD_H */
106 
periph_conf.h
board_init
void board_init(void)
Board level initialization.