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
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#define SX127X_PARAM_SPI SPI_DEV(0)
34#define SX127X_PARAM_SPI_NSS GPIO_PIN(1, 31)
35#define SX127X_PARAM_RESET GPIO_PIN(1, 15)
36#define SX127X_PARAM_DIO0 GPIO_PIN(1, 16)
37#define SX127X_PARAM_DIO1 GPIO_PIN(0, 11)
38#define SX127X_PARAM_DIO2 GPIO_PIN(0, 12)
39#define SX127X_PARAM_DIO3 GPIO_PIN(1, 17)
40#define SX127X_PARAM_PASELECT SX127X_PA_RFO
47#define TCXO_PWR_PIN GPIO_PIN(PA, 9)
48#define TX_OUTPUT_SEL_PIN GPIO_PIN(PA, 13)
55#define LED_PORT PORT->Group[0]
57#define LED0_PIN GPIO_PIN(PA, 18)
58#define LED0_MASK (1 << 18)
59#define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
60#define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
61#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
63#define LED1_PIN GPIO_PIN(PA, 19)
64#define LED1_MASK (1 << 19)
65#define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
66#define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
67#define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
74#define BTN0_PIN GPIO_PIN(PA, 28)
75#define BTN0_MODE GPIO_IN_PU
82#define MTD_0 mtd_dev_get(0)
85#ifdef __cplusplus
86}
87#endif
88
89#endif /* BOARD_H */