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) 2017 Kees Bakker, SODAQ
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, 15)
35
36
#define LED0_PORT PORT->Group[PA]
37
#define LED0_MASK (1 << 15)
38
39
#define LED0_OFF (LED0_PORT.OUTSET.reg = LED0_MASK)
40
#define LED0_ON (LED0_PORT.OUTCLR.reg = LED0_MASK)
41
#define LED0_TOGGLE (LED0_PORT.OUTTGL.reg = LED0_MASK)
42
43
#define LED1_PIN GPIO_PIN(PB, 10)
44
45
#define LED1_PORT PORT->Group[PB]
46
#define LED1_MASK (1 << 10)
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 LED2_PIN GPIO_PIN(PB, 11)
53
54
#define LED2_PORT PORT->Group[PB]
55
#define LED2_MASK (1 << 11)
56
57
#define LED2_OFF (LED2_PORT.OUTSET.reg = LED2_MASK)
58
#define LED2_ON (LED2_PORT.OUTCLR.reg = LED2_MASK)
59
#define LED2_TOGGLE (LED2_PORT.OUTTGL.reg = LED2_MASK)
66
#define BTN0_PIN GPIO_PIN(PA, 16)
67
#define BTN0_MODE GPIO_IN
74
#define GPS_TIMEPULSE_PIN GPIO_PIN(PA, 14)
75
#define GPS_TIMEPULSE_MODE GPIO_IN
82
#define GPS_ENABLE_PIN GPIO_PIN(PA, 18)
83
84
#define GPS_ENABLE_PORT PORT->Group[PA]
85
#define GPS_ENABLE_MASK (1 << 18)
86
87
#define GPS_ENABLE_ON (GPS_ENABLE_PORT.OUTSET.reg = GPS_ENABLE_MASK)
88
#define GPS_ENABLE_OFF (GPS_ENABLE_PORT.OUTCLR.reg = GPS_ENABLE_MASK)
95
#define LORA_RESET_PIN GPIO_PIN(PA, 4)
96
97
#define LORA_RESET_PORT PORT->Group[PA]
98
#define LORA_RESET_MASK (1 << 4)
99
100
#define LORA_RESET_OFF (LORA_RESET_PORT.OUTSET.reg = LORA_RESET_MASK)
101
#define LORA_RESET_ON (LORA_RESET_PORT.OUTCLR.reg = LORA_RESET_MASK)
102
#define LORA_RESET_TOGGLE (LORA_RESET_PORT.OUTTGL.reg = LORA_RESET_MASK)
105
#ifdef __cplusplus
106
}
107
#endif
108
109
#endif
/* BOARD_H */
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Sat Nov 23 2024 01:58:05 by
1.9.8