nrf6310/include/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 
23 #ifndef BOARD_H
24 #define BOARD_H
25 
26 #include "cpu.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
36 #define LED0_PIN GPIO_PIN(0, 8)
37 #define LED1_PIN GPIO_PIN(0, 9)
38 #define LED2_PIN GPIO_PIN(0, 10)
39 
40 #define LED0_MASK (1 << 8)
41 #define LED1_MASK (1 << 9)
42 #define LED2_MASK (1 << 10)
43 
44 #define LED0_ON (NRF_GPIO->OUTCLR = LED0_MASK)
45 #define LED0_OFF (NRF_GPIO->OUTSET = LED0_MASK)
46 #define LED0_TOGGLE (NRF_GPIO->OUT ^= LED0_MASK)
47 
48 #define LED1_ON (NRF_GPIO->OUTCLR = LED1_MASK)
49 #define LED1_OFF (NRF_GPIO->OUTSET = LED1_MASK)
50 #define LED1_TOGGLE (NRF_GPIO->OUT ^= LED1_MASK)
51 
52 #define LED2_ON (NRF_GPIO->OUTCLR = LED2_MASK)
53 #define LED2_OFF (NRF_GPIO->OUTSET = LED2_MASK)
54 #define LED2_TOGGLE (NRF_GPIO->OUT ^= LED2_MASK)
55 
60 void board_init(void);
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* BOARD_H */
67 
void board_init(void)
Initialize board specific hardware, including clock, LEDs and std-IO.