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

boards/arduino-mkr1200: add initial support

This commit is contained in:
Alexandre Abadie 2017-05-20 18:43:48 +02:00
parent 14911c1883
commit 81eb131634
6 changed files with 109 additions and 0 deletions

View File

@ -0,0 +1,5 @@
MODULE = board
DIRS = $(RIOTBOARD)/common/arduino-mkr
include $(RIOTBASE)/Makefile.base

View File

@ -0,0 +1 @@
include $(RIOTBOARD)/common/arduino-mkr/Makefile.dep

View File

@ -0,0 +1,3 @@
include $(RIOTBOARD)/common/arduino-mkr/Makefile.features
-include $(RIOTCPU)/samd21/Makefile.features

View File

@ -0,0 +1,10 @@
USEMODULE += boards_common_arduino-mkr
ifeq ($(PROGRAMMER),jlink)
export MKR_JLINK_DEVICE = atsamd21
endif
include $(RIOTBOARD)/common/arduino-mkr/Makefile.include
# add arduino-mkrfox1200 include path
INCLUDES += -I$(RIOTBOARD)/$(BOARD)/include

View File

@ -0,0 +1,34 @@
/**
* @defgroup boards_arduino-mkrfox1200 Arduino MKRFOX1200
* @ingroup boards
* @brief Support for the Arduino MKRFOX1200 board.
*
* ### General information
*
* The [Arduino MKRFOX1200](https://www.arduino.cc/en/Main.ArduinoBoardMKRFox1200) board is
* a learning and development board that provides Sigfox connectivity and is
* powered by an Atmel SAMD21 microcontroller.
*
* ### Pinout
*
* <img src="https://www.arduino.cc/en/uploads/Main/MKR1000_pinout.png"
* alt="Arduino MKRFOX1200 pinout" style="height:800px;"/>
*
* ### Flash the board
*
* 1. Put the board in bootloader mode by double tapping the reset button.<br/>
* When the board is in bootloader mode, the user led (green) oscillates
* smoothly.
*
*
* 2. Use `BOARD=arduino-mkrfox1200` with the `make` command.<br/>
* Example with `hello-world` application:
* ```
* make BOARD=arduino-mkrfox1200 -C examples/hello-world flash
* ```
*
* ### Accessing STDIO via UART
*
* To access the STDIO of RIOT, a FTDI to USB converter needs to be plugged to
* the RX/TX pins on the board.
*/

View File

@ -0,0 +1,56 @@
/*
* Copyright (C) 2017 Inria
*
* 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.
*/
/**
* @ingroup boards_arduino-mkrfox1200
* @{
*
* @file
* @brief Board specific definitions for the Arduino MKRFOX1200
* board
*
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
*/
#ifndef BOARD_H
#define BOARD_H
#include "cpu.h"
#include "periph_conf.h"
#include "board_common.h"
#include "arduino_pinmap.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief The on-board LED is connected to pin 6 on this board
*/
#define ARDUINO_LED (6U)
/**
* @name LED pin definitions and handlers
* @{
*/
#define LED0_PIN GPIO_PIN(PA, 20)
#define LED_PORT PORT->Group[PA]
#define LED0_MASK (1 << 20)
#define LED0_ON (LED_PORT.OUTSET.reg = LED0_MASK)
#define LED0_OFF (LED_PORT.OUTCLR.reg = LED0_MASK)
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* BOARD_H */
/** @} */