Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 Gunar Schorcht
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
9
#pragma once
10
21
#include "board_common.h"
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
31
#define LED0_PIN GPIO_PIN(0, 13)
32
#define LED1_PIN GPIO_PIN(0, 14)
33
#define LED2_PIN GPIO_PIN(1, 9)
34
#define LED3_PIN GPIO_PIN(0, 16)
35
36
#define LED0_PORT (NRF_P0)
37
#define LED1_PORT (NRF_P0)
38
#define LED2_PORT (NRF_P1)
39
#define LED3_PORT (NRF_P0)
40
41
#define LED0_MASK (1 << 13)
42
#define LED1_MASK (1 << 14)
43
#define LED2_MASK (1 << 9)
44
#define LED3_MASK (1 << 16)
45
46
#define LED0_ON (LED0_PORT->OUTCLR = LED0_MASK)
47
#define LED0_OFF (LED0_PORT->OUTSET = LED0_MASK)
48
#define LED0_TOGGLE (LED0_PORT->OUT ^= LED0_MASK)
49
50
#define LED1_ON (LED1_PORT->OUTCLR = LED1_MASK)
51
#define LED1_OFF (LED1_PORT->OUTSET = LED1_MASK)
52
#define LED1_TOGGLE (LED1_PORT->OUT ^= LED1_MASK)
53
54
#define LED2_ON (LED2_PORT->OUTCLR = LED2_MASK)
55
#define LED2_OFF (LED2_PORT->OUTSET = LED2_MASK)
56
#define LED2_TOGGLE (LED2_PORT->OUT ^= LED2_MASK)
57
58
#define LED3_ON (LED3_PORT->OUTCLR = LED3_MASK)
59
#define LED3_OFF (LED3_PORT->OUTSET = LED3_MASK)
60
#define LED3_TOGGLE (LED3_PORT->OUT ^= LED3_MASK)
67
#define BTN0_PIN GPIO_PIN(0, 11)
68
#define BTN0_MODE GPIO_IN_PU
69
#define BTN1_PIN GPIO_PIN(0, 18)
70
#define BTN1_MODE GPIO_IN_PU
77
#define SDCARD_SPI_PARAM_SPI SPI_DEV(1)
78
#define SDCARD_SPI_PARAM_CS GPIO_PIN(0, 12)
79
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(0, 17)
80
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(0, 24)
81
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(0, 20)
88
#define MTD_0 mtd_dev_get(0)
91
#ifdef __cplusplus
92
}
93
#endif
94
Generated on Fri Jun 20 2025 21:02:35 by
1.9.1