2018-09-24 15:46:22 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2017 Baptiste Clenet <bapclenet@gmail.com>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup boards_samr30-xpro Atmel SAM R30 Xplained Pro
|
|
|
|
* @ingroup boards
|
|
|
|
* @brief Support for the Atmel SAM R30 Xplained Pro board.
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Board specific definitions for the Atmel SAM R30 Xplained Pro board.
|
|
|
|
*
|
|
|
|
* @author Baptiste Clenet <bapclenet@gmail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BOARD_H
|
|
|
|
#define BOARD_H
|
|
|
|
|
|
|
|
#include "cpu.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name NG_AT86RF212B configuration
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define AT86RF2XX_PARAM_SPI SPI_DEV(0)
|
|
|
|
#define AT86RF2XX_PARAM_CS GPIO_PIN(PB, 31)
|
|
|
|
#define AT86RF2XX_PARAM_INT GPIO_PIN(PB, 0)
|
|
|
|
#define AT86RF2XX_PARAM_SLEEP GPIO_PIN(PA, 20)
|
|
|
|
#define AT86RF2XX_PARAM_RESET GPIO_PIN(PB, 15)
|
2020-03-03 12:29:18 +01:00
|
|
|
#define AT86RF2XX_PARAM_SPI_CLK SPI_CLK_5MHZ
|
2018-09-24 15:46:22 +02:00
|
|
|
/** @}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name LED pin definitions and handlers
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define LED_PORT PORT->Group[0]
|
|
|
|
|
|
|
|
#define LED0_PIN GPIO_PIN(PA, 18)
|
|
|
|
#define LED0_MASK (1 << 18)
|
|
|
|
#define LED0_ON (LED_PORT.OUTCLR.reg = LED0_MASK)
|
|
|
|
#define LED0_OFF (LED_PORT.OUTSET.reg = LED0_MASK)
|
|
|
|
#define LED0_TOGGLE (LED_PORT.OUTTGL.reg = LED0_MASK)
|
|
|
|
|
|
|
|
#define LED1_PIN GPIO_PIN(PA, 19)
|
|
|
|
#define LED1_MASK (1 << 19)
|
|
|
|
#define LED1_ON (LED_PORT.OUTCLR.reg = LED1_MASK)
|
|
|
|
#define LED1_OFF (LED_PORT.OUTSET.reg = LED1_MASK)
|
|
|
|
#define LED1_TOGGLE (LED_PORT.OUTTGL.reg = LED1_MASK)
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name BTN0 (SW0 Button) pin definitions
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define BTN0_PORT PORT->Group[0]
|
|
|
|
#define BTN0_PIN GPIO_PIN(PA, 28)
|
|
|
|
#define BTN0_MODE GPIO_IN_PU
|
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
|
|
|
*/
|
|
|
|
void board_init(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* BOARD_H */
|
|
|
|
/** @} */
|