Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2024 Marian Buschsieweke
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
17
18
#include "cpu.h"
19
#include "
periph/gpio.h
"
20
#include "
cc2538_eui_primary.h
"
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
30
#define LED_GREEN_PIN GPIO_PIN(PORT_C, 0)
31
#define LED_GREEN_PORT GPIO_C
32
#define LED_GREEN_BIT (1U << 0)
33
#define LED0_PIN LED_GREEN_PIN
34
#define LED0_PORT LED_GREEN_PORT
35
#define LED0_BIT LED_GREEN_BIT
36
37
#define LED_RED_PIN GPIO_PIN(PORT_C, 1)
38
#define LED_RED_PORT GPIO_C
39
#define LED_RED_BIT (1U << 1)
40
#define LED1_PIN LED_RED_PIN
41
#define LED1_PORT LED_RED_PORT
42
#define LED1_BIT LED_RED_BIT
43
44
#define LED_YELLOW_PIN GPIO_PIN(PORT_B, 1)
45
#define LED_YELLOW_PORT GPIO_B
46
#define LED_YELLOW_BIT (1U << 1)
47
#define LED2_PIN LED_YELLOW_PIN
48
#define LED2_PORT LED_YELLOW_PORT
49
#define LED2_BIT LED_YELLOW_BIT
50
51
#define LED_BLUE_PIN GPIO_PIN(PORT_B, 0)
52
#define LED_BLUE_PORT GPIO_B
53
#define LED_BLUE_BIT (1U << 0)
54
#define LED3_PIN LED_BLUE_PIN
55
#define LED3_PORT LED_BLUE_PORT
56
#define LED3_BIT LED_BLUE_BIT
57
58
#define LED0_ON (LED0_PORT->DATA |= LED0_BIT)
59
#define LED0_OFF (LED0_PORT->DATA &= ~LED0_BIT)
60
#define LED0_TOGGLE (LED0_PORT->DATA ^= LED0_BIT)
61
62
#define LED1_ON (LED1_PORT->DATA |= LED1_BIT)
63
#define LED1_OFF (LED1_PORT->DATA &= ~LED1_BIT)
64
#define LED1_TOGGLE (LED1_PORT->DATA ^= LED1_BIT)
65
66
#define LED2_ON (LED2_PORT->DATA |= LED2_BIT)
67
#define LED2_OFF (LED2_PORT->DATA &= ~LED2_BIT)
68
#define LED2_TOGGLE (LED2_PORT->DATA ^= LED2_BIT)
69
70
#define LED3_ON (LED3_PORT->DATA |= LED3_BIT)
71
#define LED3_OFF (LED3_PORT->DATA &= ~LED3_BIT)
72
#define LED3_TOGGLE (LED3_PORT->DATA ^= LED3_BIT)
74
79
#define BTN_LEFT_PIN GPIO_PIN(PORT_C, 4)
80
#define BTN_LEFT_MODE GPIO_IN_PU
81
#define BTN0_PIN BTN_LEFT_PIN
82
#define BTN0_MODE BTN_LEFT_MODE
83
84
#define BTN_RIGHT_PIN GPIO_PIN(PORT_C, 5)
85
#define BTN_RIGHT_MODE GPIO_IN_PU
86
#define BTN1_PIN BTN_RIGHT_PIN
87
#define BTN1_MODE BTN_RIGHT_MODE
88
89
#define BTN_UP_PIN GPIO_PIN(PORT_C, 6)
90
#define BTN_UP_MODE GPIO_IN_PU
91
#define BTN2_PIN BTN_UP_PIN
92
#define BTN2_MODE BTN_UP_MODE
93
94
#define BTN_DOWN_PIN GPIO_PIN(PORT_C, 7)
95
#define BTN_DOWN_MODE GPIO_IN_PU
96
#define BTN3_PIN BTN_DOWN_PIN
97
#define BTN3_MODE BTN_DOWN_MODE
98
99
#define BTN_SELECT_PIN GPIO_PIN(PORT_A, 3)
100
#define BTN_SELECT_MODE GPIO_IN_PU
101
#define BTN4_PIN BTN_SELECT_PIN
102
#define BTN4_MODE BTN_SELECT_MODE
104
109
#ifndef UPDATE_CCA
110
#define UPDATE_CCA 1
111
#endif
112
113
#define CCA_BACKDOOR_ENABLE 1
114
#define CCA_BACKDOOR_PORT_A_PIN 3
115
#define CCA_BACKDOOR_ACTIVE_LEVEL 0
117
118
#ifdef __cplusplus
119
}
/* end extern "C" */
120
#endif
121
cc2538_eui_primary.h
CC2538 EUI-64 provider.
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Wed Aug 27 2025 20:40:39 by
1.13.2