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
23extern "C" {
24#endif
25
30#define LED_GREEN_PIN GPIO_PIN(PORT_C, 0)
34#define LED_GREEN_PORT GPIO_C
35#define LED_GREEN_BIT (1U << 0)
36#define LED0_PIN LED_GREEN_PIN
37#define LED0_PORT LED_GREEN_PORT
38#define LED0_BIT LED_GREEN_BIT
39
40#define LED_RED_PIN GPIO_PIN(PORT_C, 1)
44#define LED_RED_PORT GPIO_C
45#define LED_RED_BIT (1U << 1)
46#define LED1_PIN LED_RED_PIN
47#define LED1_PORT LED_RED_PORT
48#define LED1_BIT LED_RED_BIT
49
50#define LED_YELLOW_PIN GPIO_PIN(PORT_B, 1)
54#define LED_YELLOW_PORT GPIO_B
55#define LED_YELLOW_BIT (1U << 1)
56#define LED2_PIN LED_YELLOW_PIN
57#define LED2_PORT LED_YELLOW_PORT
58#define LED2_BIT LED_YELLOW_BIT
59
60#define LED_BLUE_PIN GPIO_PIN(PORT_B, 0)
64#define LED_BLUE_PORT GPIO_B
65#define LED_BLUE_BIT (1U << 0)
66#define LED3_PIN LED_BLUE_PIN
67#define LED3_PORT LED_BLUE_PORT
68#define LED3_BIT LED_BLUE_BIT
69
70#define LED0_ON (LED0_PORT->DATA |= LED0_BIT)
71#define LED0_OFF (LED0_PORT->DATA &= ~LED0_BIT)
72#define LED0_TOGGLE (LED0_PORT->DATA ^= LED0_BIT)
73
74#define LED1_ON (LED1_PORT->DATA |= LED1_BIT)
75#define LED1_OFF (LED1_PORT->DATA &= ~LED1_BIT)
76#define LED1_TOGGLE (LED1_PORT->DATA ^= LED1_BIT)
77
78#define LED2_ON (LED2_PORT->DATA |= LED2_BIT)
79#define LED2_OFF (LED2_PORT->DATA &= ~LED2_BIT)
80#define LED2_TOGGLE (LED2_PORT->DATA ^= LED2_BIT)
81
82#define LED3_ON (LED3_PORT->DATA |= LED3_BIT)
83#define LED3_OFF (LED3_PORT->DATA &= ~LED3_BIT)
84#define LED3_TOGGLE (LED3_PORT->DATA ^= LED3_BIT)
86
91#define BTN_LEFT_PIN GPIO_PIN(PORT_C, 4)
92#define BTN_LEFT_MODE GPIO_IN_PU
93#define BTN0_PIN BTN_LEFT_PIN
94#define BTN0_MODE BTN_LEFT_MODE
95
96#define BTN_RIGHT_PIN GPIO_PIN(PORT_C, 5)
97#define BTN_RIGHT_MODE GPIO_IN_PU
98#define BTN1_PIN BTN_RIGHT_PIN
99#define BTN1_MODE BTN_RIGHT_MODE
100
101#define BTN_UP_PIN GPIO_PIN(PORT_C, 6)
102#define BTN_UP_MODE GPIO_IN_PU
103#define BTN2_PIN BTN_UP_PIN
104#define BTN2_MODE BTN_UP_MODE
105
106#define BTN_DOWN_PIN GPIO_PIN(PORT_C, 7)
107#define BTN_DOWN_MODE GPIO_IN_PU
108#define BTN3_PIN BTN_DOWN_PIN
109#define BTN3_MODE BTN_DOWN_MODE
110
111#define BTN_SELECT_PIN GPIO_PIN(PORT_A, 3)
112#define BTN_SELECT_MODE GPIO_IN_PU
113#define BTN4_PIN BTN_SELECT_PIN
114#define BTN4_MODE BTN_SELECT_MODE
116
121#ifndef UPDATE_CCA
122#define UPDATE_CCA 1
123#endif
124
125#define CCA_BACKDOOR_ENABLE 1
126#define CCA_BACKDOOR_PORT_A_PIN 3
127#define CCA_BACKDOOR_ACTIVE_LEVEL 0
129
130#ifdef __cplusplus
131} /* end extern "C" */
132#endif
133
CC2538 EUI-64 provider.
Low-level GPIO peripheral driver interface definitions.