pca10000/include/board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2015 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 
22 #ifndef BOARD_H
23 #define BOARD_H
24 
25 #include "cpu.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
35 #define XTIMER_DEV (0)
36 #define XTIMER_CHAN (0)
37 #define XTIMER_WIDTH (24)
38 #define XTIMER_BACKOFF (40)
39 
45 #define LED0_PIN GPIO_PIN(0, 21)
46 #define LED1_PIN GPIO_PIN(0, 22)
47 #define LED2_PIN GPIO_PIN(0, 23)
48 
49 #define LED0_MASK (1 << 21)
50 #define LED1_MASK (1 << 22)
51 #define LED2_MASK (1 << 23)
52 
53 #define LED0_ON (NRF_GPIO->OUTCLR = LED0_MASK)
54 #define LED0_OFF (NRF_GPIO->OUTSET = LED0_MASK)
55 #define LED0_TOGGLE (NRF_GPIO->OUT ^= LED0_MASK)
56 
57 #define LED1_ON (NRF_GPIO->OUTCLR = LED1_MASK)
58 #define LED1_OFF (NRF_GPIO->OUTSET = LED1_MASK)
59 #define LED1_TOGGLE (NRF_GPIO->OUT ^= LED1_MASK)
60 
61 #define LED2_ON (NRF_GPIO->OUTCLR = LED2_MASK)
62 #define LED2_OFF (NRF_GPIO->OUTSET = LED2_MASK)
63 #define LED2_TOGGLE (NRF_GPIO->OUT ^= LED2_MASK)
64 
69 void board_init(void);
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
75 #endif
void board_init(void)
Initialize the board, including triggering the CPU initialization.