2015-08-08 15:59:25 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Freie Universität Berlin
|
|
|
|
* Copyright (C) 2015 Zolertia SL
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2018-07-26 11:59:14 +02:00
|
|
|
* @ingroup boards_remote-pa
|
2015-08-08 15:59:25 +02:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
2016-06-29 16:30:13 +02:00
|
|
|
* @brief Board specific definitions for the Re-Mote board prototype A
|
2015-08-08 15:59:25 +02:00
|
|
|
*
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2017-06-20 21:11:34 +02:00
|
|
|
* @author Antonio Lignan <alinan@zolertia.com>
|
|
|
|
* @author Sebastian Meiling <s@mlng.net>
|
2015-08-08 15:59:25 +02:00
|
|
|
*/
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#ifndef BOARD_H
|
|
|
|
#define BOARD_H
|
2015-08-08 15:59:25 +02:00
|
|
|
|
|
|
|
#include "cpu.h"
|
2017-01-27 09:49:10 +01:00
|
|
|
#include "board_common.h"
|
2015-08-08 15:59:25 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name LED pin definitions and handlers
|
2015-08-08 15:59:25 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2016-03-11 18:04:26 +01:00
|
|
|
#define LED0_PIN GPIO_PIN(3, 2)
|
|
|
|
#define LED1_PIN GPIO_PIN(3, 5)
|
|
|
|
#define LED2_PIN GPIO_PIN(2, 3)
|
|
|
|
|
|
|
|
#define LED0_MASK (1 << 2)
|
|
|
|
#define LED1_MASK (1 << 5)
|
|
|
|
#define LED2_MASK (1 << 3)
|
|
|
|
|
|
|
|
#define LED0_ON (GPIO_D->DATA &= ~LED0_MASK)
|
|
|
|
#define LED0_OFF (GPIO_D->DATA |= LED0_MASK)
|
|
|
|
#define LED0_TOGGLE (GPIO_D->DATA ^= LED0_MASK)
|
|
|
|
|
|
|
|
#define LED1_ON (GPIO_D->DATA &= ~LED1_MASK)
|
|
|
|
#define LED1_OFF (GPIO_D->DATA |= LED1_MASK)
|
|
|
|
#define LED1_TOGGLE (GPIO_D->DATA ^= LED1_MASK)
|
|
|
|
|
|
|
|
#define LED2_ON (GPIO_C->DATA &= ~LED2_MASK)
|
|
|
|
#define LED2_OFF (GPIO_C->DATA |= LED2_MASK)
|
|
|
|
#define LED2_TOGGLE (GPIO_C->DATA ^= LED2_MASK)
|
2015-08-08 15:59:25 +02:00
|
|
|
/** @} */
|
2016-03-11 18:04:26 +01:00
|
|
|
|
2016-10-21 20:50:20 +02:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name User button pin definition
|
2016-10-21 20:50:20 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2016-12-07 09:42:48 +01:00
|
|
|
#define BTN0_PIN GPIO_PIN(0, 3)
|
2017-06-20 21:11:34 +02:00
|
|
|
#define BTN0_MODE GPIO_IN_PU
|
2016-10-21 20:50:20 +02:00
|
|
|
/** @} */
|
|
|
|
|
2015-08-08 15:59:25 +02:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name Radio configuration
|
|
|
|
*
|
|
|
|
* 2.4GHz RF switch controlled by SW
|
2015-08-08 15:59:25 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2017-08-21 15:38:10 +02:00
|
|
|
#define RF_SWITCH_GPIO GPIO_PIN(3, 4)
|
|
|
|
#define RF_SWITCH_SUB_GHZ gpio_set(RF_SWITCH_GPIO)
|
|
|
|
#define RF_SWITCH_2_4_GHZ gpio_clear(RF_SWITCH_GPIO)
|
|
|
|
#define RF_SWITCH_TOGGLE gpio_toggle(RF_SWITCH_GPIO)
|
2015-08-08 15:59:25 +02:00
|
|
|
/** @} */
|
2016-02-22 22:38:39 +01:00
|
|
|
|
2015-08-08 15:59:25 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
} /* end extern "C" */
|
|
|
|
#endif
|
2017-01-18 13:00:05 +01:00
|
|
|
#endif /* BOARD_H */
|
2015-08-08 15:59:25 +02:00
|
|
|
/** @} */
|