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) 2014 Freie Universität Berlin
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser General
5
* Public License v2.1. See the file LICENSE in the top level directory for more
6
* details.
7
*/
8
21
#ifndef BOARD_H
22
#define BOARD_H
23
24
#include "cpu.h"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define LED0_PIN GPIO_PIN(0, 8)
35
#define LED1_PIN GPIO_PIN(0, 9)
36
#define LED2_PIN GPIO_PIN(0, 10)
37
38
#define LED0_MASK (1 << 8)
39
#define LED1_MASK (1 << 9)
40
#define LED2_MASK (1 << 10)
41
42
#define LED0_ON (NRF_GPIO->OUTCLR = LED0_MASK)
43
#define LED0_OFF (NRF_GPIO->OUTSET = LED0_MASK)
44
#define LED0_TOGGLE (NRF_GPIO->OUT ^= LED0_MASK)
45
46
#define LED1_ON (NRF_GPIO->OUTCLR = LED1_MASK)
47
#define LED1_OFF (NRF_GPIO->OUTSET = LED1_MASK)
48
#define LED1_TOGGLE (NRF_GPIO->OUT ^= LED1_MASK)
49
50
#define LED2_ON (NRF_GPIO->OUTCLR = LED2_MASK)
51
#define LED2_OFF (NRF_GPIO->OUTSET = LED2_MASK)
52
#define LED2_TOGGLE (NRF_GPIO->OUT ^= LED2_MASK)
53
58
void
board_init
(
void
);
59
60
#ifdef __cplusplus
61
}
62
#endif
63
64
#endif
/* BOARD_H */
65
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17