board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Inria
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 
19 #ifndef BOARD_H
20 #define BOARD_H
21 
22 #include "board_common.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #define LED0_PIN GPIO_PIN(0, 30)
33 #define LED1_PIN GPIO_PIN(0, 14)
34 #define LED2_PIN GPIO_PIN(0, 22)
35 #define LED3_PIN GPIO_PIN(0, 31)
37 #define LED_PORT (NRF_P0)
38 #define LED0_MASK (1 << 30)
39 #define LED1_MASK (1 << 14)
40 #define LED2_MASK (1 << 22)
41 #define LED3_MASK (1 << 31)
42 #define LED_MASK (LED0_MASK | LED1_MASK | LED2_MASK | LED3_MASK)
43 
44 #define LED0_ON (LED_PORT->OUTCLR = LED0_MASK)
45 #define LED0_OFF (LED_PORT->OUTSET = LED0_MASK)
46 #define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK)
47 
48 #define LED1_ON (LED_PORT->OUTCLR = LED1_MASK)
49 #define LED1_OFF (LED_PORT->OUTSET = LED1_MASK)
50 #define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK)
51 
52 #define LED2_ON (LED_PORT->OUTCLR = LED2_MASK)
53 #define LED2_OFF (LED_PORT->OUTSET = LED2_MASK)
54 #define LED2_TOGGLE (LED_PORT->OUT ^= LED2_MASK)
55 
56 #define LED3_ON (LED_PORT->OUTCLR = LED3_MASK)
57 #define LED3_OFF (LED_PORT->OUTSET = LED3_MASK)
58 #define LED3_TOGGLE (LED_PORT->OUT ^= LED3_MASK)
59 
65 #define BTN0_PIN GPIO_PIN(0, 2)
66 #define BTN0_MODE GPIO_IN_PU
67 
73 #define LIS2DH12_PARAM_INT_PIN1 GPIO_PIN(0, 25)
74 
80 #define DW1000_PARAM_SPI SPI_DEV(1)
81 #define DW1000_PARAM_CS_PIN GPIO_PIN(0, 17)
82 #define DW1000_PARAM_INT_PIN GPIO_PIN(0, 19)
83 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* BOARD_H */
90