Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2018 Freie Universität Berlin
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
#include "cpu.h"
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
28
#define LED0_PIN GPIO_PIN(0, 17)
29
#define LED1_PIN GPIO_PIN(0, 19)
30
31
/* as a shortcut, we include the two CS pins into the LED_MASK, this will make
32
* sure both pins are initialized as output and set during board initialization.
33
* This is needed so that the BMX280 and LIS2DH12 device drivers do not
34
* interfere... */
35
#define CS_PIN_MASK ((1 << 3) | (1 << 8))
36
37
#define LED_PORT NRF_P0
38
#define LED0_MASK (1 << 17)
39
#define LED1_MASK (1 << 19)
40
41
/* mask used in the common board.c file to initialize and set the given pins */
42
#define LED_MASK (LED0_MASK | LED1_MASK | CS_PIN_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)
57
#define BTN0_PIN GPIO_PIN(0, 13)
58
#define BTN0_MODE GPIO_IN_PU
65
#define BMX280_PARAM_CS GPIO_PIN(0, 3)
72
#define LIS2DH12_PARAM_CS GPIO_PIN(0, 8)
73
#define LIS2DH12_PARAM_INT_PIN1 GPIO_PIN(0, 2)
74
#define LIS2DH12_PARAM_INT_PIN2 GPIO_PIN(0, 6)
77
#ifdef __cplusplus
78
}
79
#endif
80
Generated on Sat Sep 6 2025 20:14:01 by
1.9.1