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 
9 #pragma once
10 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
30 #define XTIMER_WIDTH (16)
31 #define XTIMER_BACKOFF (50)
32 #define XTIMER_ISR_BACKOFF (40)
39 #define LED0_PIN_NUM 1
40 #define LED0_PORT GPIO_PORT_A
41 #define LED0_PORT_NUM PORT_A
42 #define LED0_IS_INVERTED 1
43 
44 #define EN3V3_PORT GPIOA
45 #define EN3V3_PIN GPIO_PIN(PORT_A, 11)
46 #define EN3V3_MASK (1 << 11)
47 
48 #define EN3V3_ON (EN3V3_PORT->BSRR = EN3V3_MASK)
49 #define EN3V3_OFF (EN3V3_PORT->BSRR = (EN3V3_MASK << 16))
50 #define EN3V3_TOGGLE (EN3V3_PORT->ODR ^= EN3V3_MASK)
59 #define SX127X_PARAM_SPI_NSS GPIO_PIN(PORT_B, 0)
60 #define SX127X_PARAM_RESET GPIO_PIN(PORT_A, 4)
61 #define SX127X_PARAM_DIO0 GPIO_PIN(PORT_B, 1)
62 #define SX127X_PARAM_DIO1 GPIO_PIN(PORT_B, 10)
63 #define SX127X_PARAM_DIO2 GPIO_PIN(PORT_B, 11)
64 #define SX127X_PARAM_DIO3 GPIO_PIN(PORT_B, 7)
67 #ifdef __cplusplus
68 }
69 #endif
70 
71 #include "stm32_leds.h"
72 
Common LED macros.