Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
27#define XTIMER_WIDTH (16)
28#define XTIMER_BACKOFF (50)
29#define XTIMER_ISR_BACKOFF (40)
31
36#define LED0_PIN_NUM 1
37#define LED0_PORT GPIO_PORT_A
38#define LED0_PORT_NUM PORT_A
39#define LED0_IS_INVERTED 1
40
41#define EN3V3_PORT GPIOA
42#define EN3V3_PIN GPIO_PIN(PORT_A, 11)
43#define EN3V3_MASK (1 << 11)
44
45#define EN3V3_ON (EN3V3_PORT->BSRR = EN3V3_MASK)
46#define EN3V3_OFF (EN3V3_PORT->BSRR = (EN3V3_MASK << 16))
47#define EN3V3_TOGGLE (EN3V3_PORT->ODR ^= EN3V3_MASK)
49
56#define SX127X_PARAM_SPI_NSS GPIO_PIN(PORT_B, 0)
57#define SX127X_PARAM_RESET GPIO_PIN(PORT_A, 4)
58#define SX127X_PARAM_DIO0 GPIO_PIN(PORT_B, 1)
59#define SX127X_PARAM_DIO1 GPIO_PIN(PORT_B, 10)
60#define SX127X_PARAM_DIO2 GPIO_PIN(PORT_B, 11)
61#define SX127X_PARAM_DIO3 GPIO_PIN(PORT_B, 7)
63
64#ifdef __cplusplus
65}
66#endif
67
68#include "stm32_leds.h"
69
Common LED macros.