Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2017 Freie Universität Berlin
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
20
#ifndef BOARD_H
21
#define BOARD_H
22
23
#include "board_common.h"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
33
#define LED0_PIN GPIO_PIN(0, 13)
34
#define LED1_PIN GPIO_PIN(0, 14)
35
#define LED2_PIN GPIO_PIN(0, 15)
36
#define LED3_PIN GPIO_PIN(0, 16)
37
38
#define LED_PORT (NRF_P0)
39
#define LED0_MASK (1 << 13)
40
#define LED1_MASK (1 << 14)
41
#define LED2_MASK (1 << 15)
42
#define LED3_MASK (1 << 16)
43
#define LED_MASK (LED0_MASK | LED1_MASK | LED2_MASK | LED3_MASK)
44
45
#define LED0_ON (LED_PORT->OUTCLR = LED0_MASK)
46
#define LED0_OFF (LED_PORT->OUTSET = LED0_MASK)
47
#define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK)
48
49
#define LED1_ON (LED_PORT->OUTCLR = LED1_MASK)
50
#define LED1_OFF (LED_PORT->OUTSET = LED1_MASK)
51
#define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK)
52
53
#define LED2_ON (LED_PORT->OUTCLR = LED2_MASK)
54
#define LED2_OFF (LED_PORT->OUTSET = LED2_MASK)
55
#define LED2_TOGGLE (LED_PORT->OUT ^= LED2_MASK)
56
57
#define LED3_ON (LED_PORT->OUTCLR = LED3_MASK)
58
#define LED3_OFF (LED_PORT->OUTSET = LED3_MASK)
59
#define LED3_TOGGLE (LED_PORT->OUT ^= LED3_MASK)
68
#define NRF52840DK_NOR_PAGE_SIZE (256)
69
#define NRF52840DK_NOR_PAGES_PER_SECTOR (16)
70
#define NRF52840DK_NOR_SECTOR_COUNT (2048)
71
#define NRF52840DK_NOR_FLAGS (SPI_NOR_F_SECT_4K | SPI_NOR_F_SECT_32K)
72
#define NRF52840DK_NOR_SPI_DEV SPI_DEV(1)
73
#define NRF52840DK_NOR_SPI_CLK SPI_CLK_10MHZ
74
#define NRF52840DK_NOR_SPI_CS GPIO_PIN(0, 17)
75
#define NRF52840DK_NOR_SPI_MODE SPI_MODE_0
79
#define MTD_0 mtd_dev_get(0)
80
85
#define BTN0_PIN GPIO_PIN(0, 11)
86
#define BTN0_MODE GPIO_IN_PU
87
#define BTN1_PIN GPIO_PIN(0, 12)
88
#define BTN1_MODE GPIO_IN_PU
89
#define BTN2_PIN GPIO_PIN(0, 24)
90
#define BTN2_MODE GPIO_IN_PU
91
#define BTN3_PIN GPIO_PIN(0, 25)
92
#define BTN3_MODE GPIO_IN_PU
95
#ifdef __cplusplus
96
}
97
#endif
98
99
#endif
/* BOARD_H */
Generated on Sun Dec 22 2024 10:22:27 by
1.9.8