Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Main Page
Related Pages
Supported Boards
Modules
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Enumerations
Data Structures
Data Structures
Class Hierarchy
Data Fields
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
w
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerator
Related Symbols
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
_
a
b
c
d
e
f
g
h
i
k
l
m
n
p
q
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
►
RIOT OS
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2014 Freie Universität Berlin
3
* Copyright (C) 2018 HAW Hamburg
4
*
5
* This file is subject to the terms and conditions of the GNU Lesser General
6
* Public License v2.1. See the file LICENSE in the top level directory for more
7
* details.
8
*/
9
21
#ifndef BOARD_H
22
#define BOARD_H
23
24
#include "cpu.h"
25
#include "
periph/gpio.h
"
26
#include "
cc2538_eui_primary.h
"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
36
#define LED0_PIN GPIO_PIN(2, 4)
37
#define LED1_PIN GPIO_PIN(2, 7)
38
#define LED2_PIN GPIO_PIN(2, 6)
39
#define LED3_PIN GPIO_PIN(2, 5)
40
#define BTN0_PIN GPIO_PIN(3, 5)
41
#define BTN0_MODE GPIO_IN
42
#define RF24_SWITCH_CC2538_PIN GPIO_PIN(3, 4)
43
#define RF24_SWITCH_AT86RF215_PIN GPIO_PIN(3, 3)
45
#define LED_PORT GPIO_C
46
#define LED0_MASK (1 << 4)
47
#define LED1_MASK (1 << 7)
48
#define LED2_MASK (1 << 6)
49
#define LED3_MASK (1 << 5)
50
51
#define RF_SWITCH_PORT GPIO_D
52
#define RF24_SWITCH_CC2538_MASK (1 << 4)
53
#define RF24_SWITCH_AT86RF215_MASK (1 << 3)
54
55
#define LED0_ON (LED_PORT->DATA &= ~LED0_MASK)
56
#define LED0_OFF (LED_PORT->DATA |= LED0_MASK)
57
#define LED0_TOGGLE (LED_PORT->DATA ^= LED0_MASK)
58
59
#define LED1_ON (LED_PORT->DATA &= ~LED1_MASK)
60
#define LED1_OFF (LED_PORT->DATA |= LED1_MASK)
61
#define LED1_TOGGLE (LED_PORT->DATA ^= LED1_MASK)
62
63
#define LED2_ON (LED_PORT->DATA &= ~LED2_MASK)
64
#define LED2_OFF (LED_PORT->DATA |= LED2_MASK)
65
#define LED2_TOGGLE (LED_PORT->DATA ^= LED2_MASK)
66
67
#define LED3_ON (LED_PORT->DATA &= ~LED3_MASK)
68
#define LED3_OFF (LED_PORT->DATA |= LED3_MASK)
69
#define LED3_TOGGLE (LED_PORT->DATA ^= LED3_MASK)
70
71
#define RF24_SWITCH_CC2538_ON (RF_SWITCH_PORT->DATA &= ~RF24_SWITCH_CC2538_MASK)
72
#define RF24_SWITCH_CC2538_OFF (RF_SWITCH_PORT->DATA |= RF24_SWITCH_CC2538_MASK)
73
#define RF24_SWITCH_CC2538_TOGGLE (RF_SWITCH_PORT->DATA ^= RF24_SWITCH_CC2538_MASK)
74
75
#define RF24_SWITCH_AT86RF215_ON (RF_SWITCH_PORT->DATA &= ~RF24_SWITCH_AT86RF215_MASK)
76
#define RF24_SWITCH_AT86RF215_OFF (RF_SWITCH_PORT->DATA |= RF24_SWITCH_AT86RF215_MASK)
77
#define RF24_SWITCH_AT86RF215_TOGGLE (RF_SWITCH_PORT->DATA ^= RF24_SWITCH_AT86RF215_MASK)
84
#define CONFIG_CC2538_RF_OBS_SIG_0_PCX 5
/* PC5 */
85
#define CONFIG_CC2538_RF_OBS_SIG_1_PCX 6
/* PC6 */
86
#define CONFIG_CC2538_RF_OBS_SIG_2_PCX 7
/* PC7 */
96
#define OPENWSN_LEDPIN_ERROR LED0_PIN
97
#define OPENWSN_LEDPIN_SYNC LED1_PIN
98
#define OPENWSN_LEDPIN_RADIO LED3_PIN
99
#define OPENWSN_LEDPIN_DEBUG LED2_PIN
109
#define OPENWSN_DEBUGPIN_FRAME GPIO_PIN(0, 7)
/* A7 */
110
#define OPENWSN_DEBUGPIN_ISR GPIO_PIN(2, 3)
/* C3 */
111
#define OPENWSN_DEBUGPIN_SLOT GPIO_PIN(1, 3)
/* B3 */
112
#define OPENWSN_DEBUGPIN_FSM GPIO_PIN(1, 2)
/* B2 */
113
#define OPENWSN_DEBUGPIN_TASK GPIO_PIN(1, 1)
/* B1 */
114
#define OPENWSN_DEBUGPIN_RADIO GPIO_PIN(1, 0)
/* B0 */
121
#define AT86RF215_PARAM_SPI SPI_DEV(0)
122
#define AT86RF215_PARAM_CS GPIO_PIN(0, 3)
/* A3 */
123
#define AT86RF215_PARAM_INT GPIO_PIN(3, 0)
/* D0 */
124
#define AT86RF215_PARAM_RESET GPIO_PIN(3, 1)
/* D1 */
125
128
#ifndef CONFIG_AT86RF215_RESET_PULSE_WIDTH_US
129
#define CONFIG_AT86RF215_RESET_PULSE_WIDTH_US (50000u)
130
#endif
137
#define XTIMER_WIDTH (16)
138
#define XTIMER_BACKOFF (50)
139
#define XTIMER_ISR_BACKOFF (40)
146
#ifndef UPDATE_CCA
147
#define UPDATE_CCA (1)
148
#endif
149
150
#define CCA_BACKDOOR_ENABLE (1)
151
#define CCA_BACKDOOR_PORT_A_PIN (6)
152
#define CCA_BACKDOOR_ACTIVE_LEVEL (0)
154
#define BOOT_PIN GPIO_PIN(0, CCA_BACKDOOR_PORT_A_PIN)
157
#ifdef __cplusplus
158
}
/* end extern "C" */
159
#endif
160
161
#endif
/* BOARD_H */
cc2538_eui_primary.h
CC2538 EUI-64 provider.
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Wed Apr 9 2025 23:57:12 by
1.12.0