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
20
#ifndef BOARD_H
21
#define BOARD_H
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
31
#define XTIMER_WIDTH (16)
32
#define XTIMER_BACKOFF (50)
33
#define XTIMER_ISR_BACKOFF (40)
34
40
#define LED0_PORT GPIOA
41
#define LED0_PIN GPIO_PIN(PORT_A, 1)
42
#define LED0_MASK (1 << 1)
43
44
#define LED0_ON (LED0_PORT->BSRR = (LED0_MASK << 16))
45
#define LED0_OFF (LED0_PORT->BSRR = LED0_MASK)
46
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK)
47
48
#define EN3V3_PORT GPIOA
49
#define EN3V3_PIN GPIO_PIN(PORT_A, 11)
50
#define EN3V3_MASK (1 << 11)
51
52
#define EN3V3_ON (EN3V3_PORT->BSRR = EN3V3_MASK)
53
#define EN3V3_OFF (EN3V3_PORT->BSRR = (EN3V3_MASK << 16))
54
#define EN3V3_TOGGLE (EN3V3_PORT->ODR ^= EN3V3_MASK)
55
63
#define SX127X_PARAM_SPI_NSS GPIO_PIN(PORT_B, 0)
64
#define SX127X_PARAM_RESET GPIO_PIN(PORT_A, 4)
65
#define SX127X_PARAM_DIO0 GPIO_PIN(PORT_B, 1)
66
#define SX127X_PARAM_DIO1 GPIO_PIN(PORT_B, 10)
67
#define SX127X_PARAM_DIO2 GPIO_PIN(PORT_B, 11)
68
#define SX127X_PARAM_DIO3 GPIO_PIN(PORT_B, 7)
69
74
void
board_init
(
void
);
75
76
#ifdef __cplusplus
77
}
78
#endif
79
80
#endif
/* BOARD_H */
81
board_init
void board_init(void)
Board level initialization.
Generated on Tue Nov 24 2020 19:46:49 by
1.8.17