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