|
| 1 | +/* |
| 2 | + * Copyright (C) 2020 Freie Universität Berlin |
| 3 | + * Copyright (C) 2023 HAW Hamburg |
| 4 | + * |
| 5 | + * This file is subject to the terms and conditions of the GNU Lesser |
| 6 | + * General Public License v2.1. See the file LICENSE in the top level |
| 7 | + * directory for more details. |
| 8 | + */ |
| 9 | + |
| 10 | +/** |
| 11 | + * @ingroup boards_feather-nrf52840-sense |
| 12 | + * @{ |
| 13 | + * |
| 14 | + * @file |
| 15 | + * @brief Board specific configuration for the Adafruit Feather nRF52840 |
| 16 | + * Sense |
| 17 | + * |
| 18 | + * @author Martine S. Lenders <[email protected]> |
| 19 | + * @author Michel Rottleuthner <[email protected]> |
| 20 | + */ |
| 21 | + |
| 22 | +#ifndef BOARD_H |
| 23 | +#define BOARD_H |
| 24 | + |
| 25 | +#include "cpu.h" |
| 26 | +#include "board_common.h" |
| 27 | +#include "periph/gpio.h" |
| 28 | + |
| 29 | +#ifdef __cplusplus |
| 30 | +extern "C" { |
| 31 | +#endif |
| 32 | + |
| 33 | +/** |
| 34 | + * @name LED pin configuration |
| 35 | + * @{ |
| 36 | + */ |
| 37 | +#define LED0_PIN GPIO_PIN(1, 9) |
| 38 | +#define LED1_PIN GPIO_PIN(1, 10) |
| 39 | + |
| 40 | +#define LED_PORT (NRF_P1) |
| 41 | +#define LED0_MASK (1 << 9) |
| 42 | +#define LED1_MASK (1 << 10) |
| 43 | +#define LED_MASK (LED0_MASK | LED1_MASK) |
| 44 | + |
| 45 | +#define LED0_ON (LED_PORT->OUTSET = LED0_MASK) |
| 46 | +#define LED0_OFF (LED_PORT->OUTCLR = LED0_MASK) |
| 47 | +#define LED0_TOGGLE (LED_PORT->OUT ^= LED0_MASK) |
| 48 | + |
| 49 | +#define LED1_ON (LED_PORT->OUTSET = LED1_MASK) |
| 50 | +#define LED1_OFF (LED_PORT->OUTCLR = LED1_MASK) |
| 51 | +#define LED1_TOGGLE (LED_PORT->OUT ^= LED1_MASK) |
| 52 | +/** @} */ |
| 53 | + |
| 54 | +/** |
| 55 | + * @name Button pin configuration |
| 56 | + * @{ |
| 57 | + */ |
| 58 | +#define BTN0_PIN GPIO_PIN(1, 2) |
| 59 | +#define BTN0_MODE GPIO_IN_PU |
| 60 | +/** @} */ |
| 61 | + |
| 62 | +/** |
| 63 | + * @name BMP280 sensor configuration |
| 64 | + * @{ |
| 65 | + */ |
| 66 | +#define BMX280_PARAM_I2C_DEV I2C_DEV(0) /**< I2C device */ |
| 67 | +/** @} */ |
| 68 | + |
| 69 | +/** |
| 70 | + * @name LIS3MDL 3-axis magnetometer |
| 71 | + * @{ |
| 72 | + */ |
| 73 | +#define LIS3MDL_PARAM_I2C I2C_DEV(0) /**< I2C device */ |
| 74 | +#define LIS3MDL_PARAM_ADDR (0x1C) /**< I2C address */ |
| 75 | +/** @} */ |
| 76 | + |
| 77 | +/** |
| 78 | + * @name SHT30 temperature and humidity sensor |
| 79 | + * @{ |
| 80 | + */ |
| 81 | +#define SHT3X_PARAM_I2C_DEV I2C_DEV(0) /**< I2C device */ |
| 82 | +#define SHT3X_PARAM_I2C_ADDR (SHT3X_I2C_ADDR_1) /**< I2C address */ |
| 83 | +/** @} */ |
| 84 | + |
| 85 | +#ifdef __cplusplus |
| 86 | +} |
| 87 | +#endif |
| 88 | + |
| 89 | +#endif /* BOARD_H */ |
| 90 | +/** @} */ |
0 commit comments