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

boards/feather-m0: add ATWINC15x0 WiFi driver

This commit is contained in:
Gunar Schorcht 2020-06-24 16:27:50 +02:00
parent 35c0524aff
commit 3f8b237f60
4 changed files with 38 additions and 4 deletions

View File

@ -2,6 +2,12 @@ ifneq (,$(filter saul_default,$(USEMODULE)))
USEMODULE += saul_gpio
endif
ifneq (,$(filter feather-m0-wifi,$(USEMODULE)))
ifneq (,$(filter gnrc_netdev_default netdev_default,$(USEMODULE)))
USEMODULE += atwinc15x0
endif
endif
# use arduino-bootloader only if no other stdio_% other than stdio_cdc_acm
# is requested
ifeq (,$(filter-out stdio_cdc_acm,$(filter stdio_% slipdev_stdio,$(USEMODULE))))

View File

@ -1,3 +1,5 @@
PSEUDOMODULES += feather-m0-wifi
PORT_LINUX ?= /dev/ttyACM0
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.usbmodem*)))

View File

@ -12,10 +12,10 @@ All the feather M0 boards are built based on the same Atmel SAMD21G18A
microcontroller. See @ref cpu_samd21.
Several types of Feather M0 boards exist:
* [Feather M0 WiFi](https://learn.adafruit.com/adafruit-feather-m0-wifi-atwinc1500/)
* [Feather M0 BLE](https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/overview)
* [Feather M0 Adalogger](https://learn.adafruit.com/adafruit-feather-m0-adalogger/)
* [Feather M0 LoRa](https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module)
- [Feather M0 WiFi](https://learn.adafruit.com/adafruit-feather-m0-wifi-atwinc1500/)
- [Feather M0 BLE](https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/overview)
- [Feather M0 Adalogger](https://learn.adafruit.com/adafruit-feather-m0-adalogger/)
- [Feather M0 LoRa](https://learn.adafruit.com/adafruit-feather-m0-radio-with-lora-radio-module)
The different modules used to differentiate the boards (ATWINC1500 WiFi,
Bluefruit LE, SD card, LoRa) are connected via SPI (SPI_DEV(0)) to the
@ -52,6 +52,20 @@ Example with `hello-world` application:
bootloader mode by double tapping the reset button before running the
flash command.
### Using the WiFi interface
To enable the WiFi interface of the Feather M0 WiFi variant of the board
automatically for networking applications, add `USEMODULE=atwin1x0` to
the `make` command and define the required parameters, for example:
```
USEMODULE='feather-m0-wifi' \
CFLAGS='-DWIFI_SSID=\"<ssid>\" -DWIFI_PASS=\"<pass>\"' \
make BOARD=feather-m0 -C examples/gnrc_networking
```
For detailed information about the parameters, see section
@ref drivers_atwinc15x0.
### Accessing STDIO via UART
STDIO of RIOT is directly available over the USB port.

View File

@ -42,6 +42,18 @@ extern "C" {
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
/** @} */
/**
* @name Configuration for Feather M0 WiFi and the ATWINC15x0 WiFi netdev
* @{
*/
#define ATWINC15X0_PARAM_SPI SPI_DEV(0)
#define ATWINC15X0_PARAM_SSN_PIN GPIO_PIN(0, 6)
#define ATWINC15X0_PARAM_RESET_PIN GPIO_PIN(0, 8)
#define ATWINC15X0_PARAM_CHIP_EN_PIN GPIO_PIN(0, 14)
#define ATWINC15X0_PARAM_IRQ_PIN GPIO_PIN(0, 21)
#define ATWINC15X0_PARAM_WAKE_PIN GPIO_UNDEF
/** @} */
/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
*/