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) 2018 HAW Hamburg
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 "board_common.h"
24
#include "
periph/gpio.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
34
#define LED0_PIN GPIO_PIN(PA, 21)
35
36
#define LED0_PORT PORT->Group[PA]
37
#define LED0_MASK (1 << 21)
38
39
#define LED0_OFF (LED0_PORT.OUTCLR.reg = LED0_MASK)
40
#define LED0_ON (LED0_PORT.OUTSET.reg = LED0_MASK)
41
#define LED0_TOGGLE (LED0_PORT.OUTTGL.reg = LED0_MASK)
42
43
#define LED1_PIN GPIO_PIN(PA, 12)
44
45
#define LED1_PORT PORT->Group[PA]
46
#define LED1_MASK (1 << 12)
47
48
#define LED1_OFF (LED1_PORT.OUTSET.reg = LED1_MASK)
49
#define LED1_ON (LED1_PORT.OUTCLR.reg = LED1_MASK)
50
#define LED1_TOGGLE (LED1_PORT.OUTTGL.reg = LED1_MASK)
51
52
#define LED_RED_PIN LED1_PIN
53
#define LED_RED_OFF LED1_OFF
54
#define LED_RED_ON LED1_ON
55
#define LED_RED_TOGGLE LED1_TOGGLE
56
57
#define LED2_PIN GPIO_PIN(PB, 15)
58
59
#define LED2_PORT PORT->Group[PB]
60
#define LED2_MASK (1 << 15)
61
62
#define LED2_OFF (LED2_PORT.OUTSET.reg = LED2_MASK)
63
#define LED2_ON (LED2_PORT.OUTCLR.reg = LED2_MASK)
64
#define LED2_TOGGLE (LED2_PORT.OUTTGL.reg = LED2_MASK)
65
66
#define LED_GREEN_PIN LED2_PIN
67
#define LED_GREEN_OFF LED2_OFF
68
#define LED_GREEN_ON LED2_ON
69
#define LED_GREEN_TOGGLE LED2_TOGGLE
70
71
#define LED3_PIN GPIO_PIN(PA, 13)
72
73
#define LED3_PORT PORT->Group[PA]
74
#define LED3_MASK (1 << 13)
75
76
#define LED3_OFF (LED3_PORT.OUTSET.reg = LED3_MASK)
77
#define LED3_ON (LED3_PORT.OUTCLR.reg = LED3_MASK)
78
#define LED3_TOGGLE (LED3_PORT.OUTTGL.reg = LED3_MASK)
79
80
#define LED_BLUE_PIN LED3_PIN
81
#define LED_BLUE_OFF LED3_OFF
82
#define LED_BLUE_ON LED3_ON
83
#define LED_BLUE_TOGGLE LED3_TOGGLE
90
#define GPS_TIMEPULSE_PIN GPIO_PIN(PA, 7)
91
#define GPS_TIMEPULSE_MODE GPIO_IN
98
#define GPS_ENABLE_PIN GPIO_PIN(PA, 28)
99
100
#define GPS_ENABLE_PORT PORT->Group[PA]
101
#define GPS_ENABLE_MASK (1 << 28)
102
103
#define GPS_ENABLE_ON (GPS_ENABLE_PORT.OUTSET.reg = GPS_ENABLE_MASK)
104
#define GPS_ENABLE_OFF (GPS_ENABLE_PORT.OUTCLR.reg = GPS_ENABLE_MASK)
111
#define NB_IOT_ENABLE_PIN GPIO_PIN(PA, 27)
112
113
#define NB_IOT_ENABLE_PORT PORT->Group[PA]
114
#define NB_IOT_ENABLE_MASK (1 << 27)
115
116
#define NB_IOT_ENABLE (NB_IOT_ENABLE_PORT.OUTSET.reg = NB_IOT_ENABLE_MASK)
117
#define NB_IOT_DISABLE (NB_IOT_ENABLE_PORT.OUTCLR.reg = NB_IOT_ENABLE_MASK)
118
119
#define NB_IOT_RESET_PIN GPIO_PIN(PB, 14)
120
121
#define NB_IOT_RESET_PORT PORT->Group[PB]
122
#define NB_IOT_RESET_MASK (1 << 14)
123
124
#define NB_IOT_RESET_ON (NB_IOT_RESET_PORT.OUTSET.reg = NB_IOT_RESET_MASK)
125
#define NB_IOT_RESET_OFF (NB_IOT_RESET_PORT.OUTCLR.reg = NB_IOT_RESET_MASK)
126
127
#define NB_IOT_RESET_PIN GPIO_PIN(PB, 14)
128
129
#define NB_IOT_RESET_PORT PORT->Group[PB]
130
#define NB_IOT_RESET_MASK (1 << 14)
131
132
#define NB_IOT_RESET_ON (NB_IOT_RESET_PORT.OUTSET.reg = NB_IOT_RESET_MASK)
133
#define NB_IOT_RESET_OFF (NB_IOT_RESET_PORT.OUTCLR.reg = NB_IOT_RESET_MASK)
134
135
#define NB_IOT_TX_EN_PIN GPIO_PIN(PB, 13)
136
137
#define NB_IOT_TX_EN_PORT PORT->Group[PB]
138
#define NB_IOT_TX_EN_MASK (1 << 13)
139
140
#define NB_IOT_TX_EN_ON (NB_IOT_TX_EN_PORT.OUTSET.reg = NB_IOT_TX_EN_MASK)
141
#define NB_IOT_TX_EN_OFF (NB_IOT_TX_EN_PORT.OUTCLR.reg = NB_IOT_TX_EN_MASK)
142
143
#define NB_IOT_TOGGLE_PIN GPIO_PIN(PB, 17)
144
145
#define NB_IOT_TOGGLE_PORT PORT->Group[PB]
146
#define NB_IOT_TOGGLE_MASK (1 << 17)
147
148
#define NB_IOT_TOGGLE_ON (NB_IOT_TOGGLE_PORT.OUTSET.reg = NB_IOT_TOGGLE_MASK)
149
#define NB_IOT_TOGGLE_OFF (NB_IOT_TOGGLE_PORT.OUTCLR.reg = NB_IOT_TOGGLE_MASK)
152
#ifdef __cplusplus
153
}
154
#endif
155
156
#endif
/* BOARD_H */
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Sat Dec 21 2024 20:58:01 by
1.9.8