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 
9 #pragma once
10 
21 #include "cpu.h"
22 #include "periph/gpio.h"
23 #include "cc2538_eui_primary.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #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
40 #define LED_RED_PIN GPIO_PIN(PORT_C, 1)
41 #define LED_RED_PORT GPIO_C
42 #define LED_RED_BIT (1U << 1)
43 #define LED1_PIN LED_RED_PIN
44 #define LED1_PORT LED_RED_PORT
45 #define LED1_BIT LED_RED_BIT
47 #define LED_YELLOW_PIN GPIO_PIN(PORT_B, 1)
48 #define LED_YELLOW_PORT GPIO_B
49 #define LED_YELLOW_BIT (1U << 1)
50 #define LED2_PIN LED_YELLOW_PIN
51 #define LED2_PORT LED_YELLOW_PORT
52 #define LED2_BIT LED_YELLOW_BIT
54 #define LED_BLUE_PIN GPIO_PIN(PORT_B, 0)
55 #define LED_BLUE_PORT GPIO_B
56 #define LED_BLUE_BIT (1U << 0)
57 #define LED3_PIN LED_BLUE_PIN
58 #define LED3_PORT LED_BLUE_PORT
59 #define LED3_BIT LED_BLUE_BIT
61 #define LED0_ON (LED0_PORT->DATA |= LED0_BIT)
62 #define LED0_OFF (LED0_PORT->DATA &= ~LED0_BIT)
63 #define LED0_TOGGLE (LED0_PORT->DATA ^= LED0_BIT)
64 
65 #define LED1_ON (LED1_PORT->DATA |= LED1_BIT)
66 #define LED1_OFF (LED1_PORT->DATA &= ~LED1_BIT)
67 #define LED1_TOGGLE (LED1_PORT->DATA ^= LED1_BIT)
68 
69 #define LED2_ON (LED2_PORT->DATA |= LED2_BIT)
70 #define LED2_OFF (LED2_PORT->DATA &= ~LED2_BIT)
71 #define LED2_TOGGLE (LED2_PORT->DATA ^= LED2_BIT)
72 
73 #define LED3_ON (LED3_PORT->DATA |= LED3_BIT)
74 #define LED3_OFF (LED3_PORT->DATA &= ~LED3_BIT)
75 #define LED3_TOGGLE (LED3_PORT->DATA ^= LED3_BIT)
82 #define BTN_LEFT_PIN GPIO_PIN(PORT_C, 4)
83 #define BTN_LEFT_MODE GPIO_IN_PU
84 #define BTN0_PIN BTN_LEFT_PIN
85 #define BTN0_MODE BTN_LEFT_MODE
87 #define BTN_RIGHT_PIN GPIO_PIN(PORT_C, 5)
88 #define BTN_RIGHT_MODE GPIO_IN_PU
89 #define BTN1_PIN BTN_RIGHT_PIN
90 #define BTN1_MODE BTN_RIGHT_MODE
92 #define BTN_UP_PIN GPIO_PIN(PORT_C, 6)
93 #define BTN_UP_MODE GPIO_IN_PU
94 #define BTN2_PIN BTN_UP_PIN
95 #define BTN2_MODE BTN_UP_MODE
97 #define BTN_DOWN_PIN GPIO_PIN(PORT_C, 7)
98 #define BTN_DOWN_MODE GPIO_IN_PU
99 #define BTN3_PIN BTN_DOWN_PIN
100 #define BTN3_MODE BTN_DOWN_MODE
102 #define BTN_SELECT_PIN GPIO_PIN(PORT_A, 3)
103 #define BTN_SELECT_MODE GPIO_IN_PU
104 #define BTN4_PIN BTN_SELECT_PIN
105 #define BTN4_MODE BTN_SELECT_MODE
112 #ifndef UPDATE_CCA
113 #define UPDATE_CCA 1
114 #endif
115 
116 #define CCA_BACKDOOR_ENABLE 1
117 #define CCA_BACKDOOR_PORT_A_PIN 3
118 #define CCA_BACKDOOR_ACTIVE_LEVEL 0
121 #ifdef __cplusplus
122 } /* end extern "C" */
123 #endif
124 
CC2538 EUI-64 provider.
Low-level GPIO peripheral driver interface definitions.