Loading...
Searching...
No Matches
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
19#ifndef BOARD_H
20#define BOARD_H
21
22#include "board_common.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#define LED0_PIN GPIO_PIN(0, 13)
33#define LED1_PIN GPIO_PIN(0, 14)
34#define LED2_PIN GPIO_PIN(1, 9)
35#define LED3_PIN GPIO_PIN(0, 16)
36
37#define LED0_PORT (NRF_P0)
38#define LED1_PORT (NRF_P0)
39#define LED2_PORT (NRF_P1)
40#define LED3_PORT (NRF_P0)
41
42#define LED0_MASK (1 << 13)
43#define LED1_MASK (1 << 14)
44#define LED2_MASK (1 << 9)
45#define LED3_MASK (1 << 16)
46
47#define LED0_ON (LED0_PORT->OUTCLR = LED0_MASK)
48#define LED0_OFF (LED0_PORT->OUTSET = LED0_MASK)
49#define LED0_TOGGLE (LED0_PORT->OUT ^= LED0_MASK)
50
51#define LED1_ON (LED1_PORT->OUTCLR = LED1_MASK)
52#define LED1_OFF (LED1_PORT->OUTSET = LED1_MASK)
53#define LED1_TOGGLE (LED1_PORT->OUT ^= LED1_MASK)
54
55#define LED2_ON (LED2_PORT->OUTCLR = LED2_MASK)
56#define LED2_OFF (LED2_PORT->OUTSET = LED2_MASK)
57#define LED2_TOGGLE (LED2_PORT->OUT ^= LED2_MASK)
58
59#define LED3_ON (LED3_PORT->OUTCLR = LED3_MASK)
60#define LED3_OFF (LED3_PORT->OUTSET = LED3_MASK)
61#define LED3_TOGGLE (LED3_PORT->OUT ^= LED3_MASK)
68#define BTN0_PIN GPIO_PIN(0, 11)
69#define BTN0_MODE GPIO_IN_PU
70#define BTN1_PIN GPIO_PIN(0, 18)
71#define BTN1_MODE GPIO_IN_PU
78#define SDCARD_SPI_PARAM_SPI SPI_DEV(1)
79#define SDCARD_SPI_PARAM_CS GPIO_PIN(0, 12)
80#define SDCARD_SPI_PARAM_CLK GPIO_PIN(0, 17)
81#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(0, 24)
82#define SDCARD_SPI_PARAM_MISO GPIO_PIN(0, 20)
89#define MTD_0 mtd_dev_get(0)
92#ifdef __cplusplus
93}
94#endif
95
96#endif /* BOARD_H */