Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 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
9#pragma once
10
21
22#include "cpu.h"
23#include "board_common.h"
24#include "periph/gpio.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#define LED0_PIN GPIO_PIN(1, 15)
35#define LED1_PIN GPIO_PIN(1, 10)
36
37#define LED_PORT (NRF_P1)
38#define LED0_MASK (1 << 15)
39#define LED1_MASK (1 << 10)
40#define LED_MASK (LED0_MASK | LED1_MASK)
41
42#define LED0_ON (LED_PORT->OUTSET = LED0_MASK)
43#define LED0_OFF (LED_PORT->OUTCLR = LED0_MASK)
44#define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK)
45
46#define LED1_ON (LED_PORT->OUTSET = LED1_MASK)
47#define LED1_OFF (LED_PORT->OUTCLR = LED1_MASK)
48#define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK)
50
55#define BTN0_PIN GPIO_PIN(1, 2)
56#define BTN0_MODE GPIO_IN_PU
58
63#define MTD_0 mtd_dev_get(0)
65
70#ifndef WS281X_PARAM_PIN
74#define WS281X_PARAM_PIN GPIO_PIN(0, 16)
75#endif
76#ifndef WS281X_PARAM_NUMOF
77#define WS281X_PARAM_NUMOF (1U)
78#endif
80
81#ifdef __cplusplus
82}
83#endif
84
Low-level GPIO peripheral driver interface definitions.