board.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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 
19 #ifndef BOARD_H
20 #define BOARD_H
21 
22 #include "cpu.h"
23 #include "board_common.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
49 #ifdef DOXYGEN
50 #define PARTICLE_MONOFIRMWARE
51 #endif
52 
64 #ifdef DOXYGEN
65 #define PARTICLE_MONOFIRMWARE_CHECKSUMLIMIT
66 #endif
67 
78 #ifdef DOXYGEN
79 #define PARTICLE_PLATFORM_ID
80 #endif
81 
88 #define LED0_PIN GPIO_PIN(0, 13)
89 #define LED1_PIN GPIO_PIN(0, 14)
90 #define LED2_PIN GPIO_PIN(0, 15)
91 
92 #define LED_PORT (NRF_P0)
93 #define LED0_MASK (1 << 13)
94 #define LED1_MASK (1 << 14)
95 #define LED2_MASK (1 << 15)
96 #define LED_MASK (LED0_MASK | LED1_MASK | LED2_MASK)
97 
98 #define LED0_ON (LED_PORT->OUTCLR = LED0_MASK)
99 #define LED0_OFF (LED_PORT->OUTSET = LED0_MASK)
100 #define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK)
101 
102 #define LED1_ON (LED_PORT->OUTCLR = LED1_MASK)
103 #define LED1_OFF (LED_PORT->OUTSET = LED1_MASK)
104 #define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK)
105 
106 #define LED2_ON (LED_PORT->OUTCLR = LED2_MASK)
107 #define LED2_OFF (LED_PORT->OUTSET = LED2_MASK)
108 #define LED2_TOGGLE (LED_PORT->OUT ^= LED2_MASK)
109 
115 #define BTN0_PIN GPIO_PIN(0, 11)
116 #define BTN0_MODE GPIO_IN_PU
117 
132 };
133 
144 
145 #if defined(BOARD_PARTICLE_XENON) || defined(DOXYGEN)
146 
151 #define VCTL1_PIN GPIO_PIN(0, 24)
152 
160 #define VCTL2_PIN GPIO_PIN(0, 25)
161 #endif
162 
163 #ifdef BOARD_PARTICLE_ARGON
164 #define VCTL1_PIN GPIO_PIN(0, 25)
165 #define VCTL2_PIN GPIO_PIN(0, 2)
166 #endif
167 
168 #ifdef BOARD_PARTICLE_BORON
169 #define VCTL1_PIN GPIO_PIN(0, 7)
170 #endif
171 
174 #ifdef __cplusplus
175 }
176 #endif
177 
178 #endif /* BOARD_H */
179 
board_nrfantenna_selection
board_nrfantenna_selection
Choices in antenna outputs for the board's nRF radio.
Definition: board.h:127
board_nrfantenna_select
void board_nrfantenna_select(enum board_nrfantenna_selection choice)
Antenna output selection.
BOARD_NRFANTENNA_BUILTIN
@ BOARD_NRFANTENNA_BUILTIN
The board's built-in antenna.
Definition: board.h:129
BOARD_NRFANTENNA_EXTERNAL
@ BOARD_NRFANTENNA_EXTERNAL
The board's uFL connector.
Definition: board.h:131