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
* Copyright (C) 2024 Marian Buschsieweke
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 "
periph/gpio.h
"
24
#include "
cc2538_eui_primary.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define LED_GREEN_PIN GPIO_PIN(PORT_C, 0)
35
#define LED_GREEN_PORT GPIO_C
36
#define LED_GREEN_BIT (1U << 0)
37
#define LED0_PIN LED_GREEN_PIN
38
#define LED0_PORT LED_GREEN_PORT
39
#define LED0_BIT LED_GREEN_BIT
41
#define LED_RED_PIN GPIO_PIN(PORT_C, 1)
42
#define LED_RED_PORT GPIO_C
43
#define LED_RED_BIT (1U << 1)
44
#define LED1_PIN LED_RED_PIN
45
#define LED1_PORT LED_RED_PORT
46
#define LED1_BIT LED_RED_BIT
48
#define LED_YELLOW_PIN GPIO_PIN(PORT_B, 1)
49
#define LED_YELLOW_PORT GPIO_B
50
#define LED_YELLOW_BIT (1U << 1)
51
#define LED2_PIN LED_YELLOW_PIN
52
#define LED2_PORT LED_YELLOW_PORT
53
#define LED2_BIT LED_YELLOW_BIT
55
#define LED_BLUE_PIN GPIO_PIN(PORT_B, 0)
56
#define LED_BLUE_PORT GPIO_B
57
#define LED_BLUE_BIT (1U << 0)
58
#define LED3_PIN LED_BLUE_PIN
59
#define LED3_PORT LED_BLUE_PORT
60
#define LED3_BIT LED_BLUE_BIT
62
#define LED0_ON (LED0_PORT->DATA |= LED0_BIT)
63
#define LED0_OFF (LED0_PORT->DATA &= ~LED0_BIT)
64
#define LED0_TOGGLE (LED0_PORT->DATA ^= LED0_BIT)
65
66
#define LED1_ON (LED1_PORT->DATA |= LED1_BIT)
67
#define LED1_OFF (LED1_PORT->DATA &= ~LED1_BIT)
68
#define LED1_TOGGLE (LED1_PORT->DATA ^= LED1_BIT)
69
70
#define LED2_ON (LED2_PORT->DATA |= LED2_BIT)
71
#define LED2_OFF (LED2_PORT->DATA &= ~LED2_BIT)
72
#define LED2_TOGGLE (LED2_PORT->DATA ^= LED2_BIT)
73
74
#define LED3_ON (LED3_PORT->DATA |= LED3_BIT)
75
#define LED3_OFF (LED3_PORT->DATA &= ~LED3_BIT)
76
#define LED3_TOGGLE (LED3_PORT->DATA ^= LED3_BIT)
83
#define BTN_LEFT_PIN GPIO_PIN(PORT_C, 4)
84
#define BTN_LEFT_MODE GPIO_IN_PU
85
#define BTN0_PIN BTN_LEFT_PIN
86
#define BTN0_MODE BTN_LEFT_MODE
88
#define BTN_RIGHT_PIN GPIO_PIN(PORT_C, 5)
89
#define BTN_RIGHT_MODE GPIO_IN_PU
90
#define BTN1_PIN BTN_RIGHT_PIN
91
#define BTN1_MODE BTN_RIGHT_MODE
93
#define BTN_UP_PIN GPIO_PIN(PORT_C, 6)
94
#define BTN_UP_MODE GPIO_IN_PU
95
#define BTN2_PIN BTN_UP_PIN
96
#define BTN2_MODE BTN_UP_MODE
98
#define BTN_DOWN_PIN GPIO_PIN(PORT_C, 7)
99
#define BTN_DOWN_MODE GPIO_IN_PU
100
#define BTN3_PIN BTN_DOWN_PIN
101
#define BTN3_MODE BTN_DOWN_MODE
103
#define BTN_SELECT_PIN GPIO_PIN(PORT_A, 3)
104
#define BTN_SELECT_MODE GPIO_IN_PU
105
#define BTN4_PIN BTN_SELECT_PIN
106
#define BTN4_MODE BTN_SELECT_MODE
113
#ifndef UPDATE_CCA
114
#define UPDATE_CCA 1
115
#endif
116
117
#define CCA_BACKDOOR_ENABLE 1
118
#define CCA_BACKDOOR_PORT_A_PIN 3
119
#define CCA_BACKDOOR_ACTIVE_LEVEL 0
122
#ifdef __cplusplus
123
}
/* end extern "C" */
124
#endif
125
126
#endif
/* BOARD_H */
cc2538_eui_primary.h
CC2538 EUI-64 provider.
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Wed Nov 27 2024 02:41:41 by
1.9.8