Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Mesotic SAS
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#include "cpu.h"
24#include "periph/gpio.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#define SX127X_PARAM_SPI SPI_DEV(0)
35#define SX127X_PARAM_SPI_NSS GPIO_PIN(1, 31)
36#define SX127X_PARAM_RESET GPIO_PIN(1, 15)
37#define SX127X_PARAM_DIO0 GPIO_PIN(1, 16)
38#define SX127X_PARAM_DIO1 GPIO_PIN(0, 11)
39#define SX127X_PARAM_DIO2 GPIO_PIN(0, 12)
40#define SX127X_PARAM_DIO3 GPIO_PIN(1, 17)
41#define SX127X_PARAM_PASELECT SX127X_PA_RFO
48#define TCXO_PWR_PIN GPIO_PIN(PA, 9)
49#define TX_OUTPUT_SEL_PIN GPIO_PIN(PA, 13)
56#define LED_PORT PORT->Group[0]
58#define LED0_PIN GPIO_PIN(PA, 18)
59#define LED0_MASK (1 << 18)
60#define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
61#define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
62#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
64#define LED1_PIN GPIO_PIN(PA, 19)
65#define LED1_MASK (1 << 19)
66#define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
67#define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
68#define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
75#define BTN0_PIN GPIO_PIN(PA, 28)
76#define BTN0_MODE GPIO_IN_PU
83#define MTD_0 mtd_dev_get(0)
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* BOARD_H */
Low-level GPIO peripheral driver interface definitions.