Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Inria
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
20
21#include "cpu.h"
22#include "board_common.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#define LED0_PIN GPIO_PIN(0, 23)
33#define LED1_PIN GPIO_PIN(0, 22)
34#define LED2_PIN GPIO_PIN(0, 24)
35
36#define LED_PORT (NRF_P0)
37#define LED0_MASK (1 << 23)
38#define LED1_MASK (1 << 22)
39#define LED2_MASK (1 << 24)
40#define LED_MASK (LED0_MASK | LED1_MASK | LED2_MASK)
41
42#define LED0_ON (LED_PORT->OUTCLR = LED0_MASK)
43#define LED0_OFF (LED_PORT->OUTSET = LED0_MASK)
44#define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK)
45
46#define LED1_ON (LED_PORT->OUTCLR = LED1_MASK)
47#define LED1_OFF (LED_PORT->OUTSET = LED1_MASK)
48#define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK)
49
50#define LED2_ON (LED_PORT->OUTCLR = LED2_MASK)
51#define LED2_OFF (LED_PORT->OUTSET = LED2_MASK)
52#define LED2_TOGGLE (LED_PORT->OUT ^= LED2_MASK)
54
55#ifdef __cplusplus
56}
57#endif
58