board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2020 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "cpu.h"
20 #include "board_common.h"
21 #include "periph/gpio.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
31 #define LED0_PIN GPIO_PIN(1, 15)
32 #define LED1_PIN GPIO_PIN(1, 10)
33 
34 #define LED_PORT (NRF_P1)
35 #define LED0_MASK (1 << 15)
36 #define LED1_MASK (1 << 10)
37 #define LED_MASK (LED0_MASK | LED1_MASK)
38 
39 #define LED0_ON (LED_PORT->OUTSET = LED0_MASK)
40 #define LED0_OFF (LED_PORT->OUTCLR = LED0_MASK)
41 #define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK)
42 
43 #define LED1_ON (LED_PORT->OUTSET = LED1_MASK)
44 #define LED1_OFF (LED_PORT->OUTCLR = LED1_MASK)
45 #define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK)
52 #define BTN0_PIN GPIO_PIN(1, 2)
53 #define BTN0_MODE GPIO_IN_PU
60 #define MTD_0 mtd_dev_get(0)
67 #ifndef WS281X_PARAM_PIN
71 #define WS281X_PARAM_PIN GPIO_PIN(0, 16)
72 #endif
73 #ifndef WS281X_PARAM_NUMOF
74 #define WS281X_PARAM_NUMOF (1U)
75 #endif
78 #ifdef __cplusplus
79 }
80 #endif
81 
Low-level GPIO peripheral driver interface definitions.