1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

boards/feather-m0: add support for feather-m0-lora version

This commit is contained in:
Thomas Perale 2020-11-05 15:07:48 +01:00
parent 568e1e3635
commit f8ed7bcd56
8 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,23 @@
# Copyright (c) 2020 HAW Hamburg
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
config BOARD
default "feather-m0-lora" if BOARD_FEATHER_M0_LORA
config BOARD_FEATHER_M0_LORA
bool
default y
select CPU_MODEL_SAMD21G18A
select HAS_PERIPH_ADC
select HAS_PERIPH_I2C
select HAS_PERIPH_PWM
select HAS_PERIPH_RTC
select HAS_PERIPH_RTT
select HAS_PERIPH_SPI
select HAS_PERIPH_TIMER
select HAS_PERIPH_UART
select HAS_PERIPH_USBDEV
select HAS_HIGHLEVEL_STDIO

View File

@ -0,0 +1,2 @@
DIRS = $(RIOTBOARD)/feather-m0
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1,5 @@
ifneq (,$(filter netdev_default,$(USEMODULE)))
USEMODULE += sx1276
endif
include $(RIOTBOARD)/feather-m0/Makefile.dep

View File

@ -0,0 +1 @@
include $(RIOTBOARD)/feather-m0/Makefile.features

View File

@ -0,0 +1,2 @@
INCLUDES += -I$(RIOTBOARD)/feather-m0/include
include $(RIOTBOARD)/feather-m0/Makefile.include

View File

@ -0,0 +1,12 @@
/**
@defgroup boards_feather-m0-lora Adafruit Feather M0 LoRa
@ingroup boards
@brief Support for the Adafruit Feather M0 LoRa.
### General information
The board is a variant of the @ref boards_feather-m0 board with
a LoRa module on board. Please see @ref boards_feather-m0 for detailed
information about the board and how to flash it.
*/

View File

@ -65,6 +65,20 @@ and define the required WiFi parameters, for example:
For detailed information about the parameters, see section
@ref drivers_atwinc15x0.
### Using with LoRa module
To enable the LoRa module available on the
[Feather M0 LoRa](https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module)
variant of the board automatically for LoRa applications,
use `feather-m0-lora` as board:
```
make BOARD=feather-m0-lora -C examples/gnrc_lorawan
```
For detailed information about the parameters, see section
@ref drivers_sx127x.
### Accessing STDIO via UART
STDIO of RIOT is directly available over the USB port.

View File

@ -54,6 +54,20 @@ extern "C" {
#define ATWINC15X0_PARAM_WAKE_PIN GPIO_UNDEF
/** @} */
/**
* @name Configuration for Feather M0 LoRa and the SX1276 module
* @{
**/
#define SX127X_PARAM_SPI SPI_DEV(0)
#define SX127X_PARAM_SPI_NSS GPIO_PIN(PA, 6)
#define SX127X_PARAM_RESET GPIO_PIN(PA, 8)
#define SX127X_PARAM_DIO0 GPIO_PIN(PA, 9)
#define SX127X_PARAM_DIO1 GPIO_UNDEF
#define SX127X_PARAM_DIO2 GPIO_UNDEF
#define SX127X_PARAM_DIO3 GPIO_UNDEF
#define SX127X_PARAM_PASELECT (SX127X_PA_BOOST)
/** @} */
/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
*/