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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup board_remote Re-Mote
|
|
|
|
* @ingroup boards
|
2016-06-29 16:30:13 +02:00
|
|
|
* @brief Support for the Re-Mote board prototype A
|
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>
|
|
|
|
* Antonio Lignan <alinan@zolertia.com>
|
|
|
|
*/
|
|
|
|
|
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
|
|
|
|
|
|
|
|
/**
|
2016-03-11 18:04:26 +01:00
|
|
|
* @brief 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
|
|
|
/**
|
|
|
|
* @name User button pin definition
|
|
|
|
* @{
|
|
|
|
*/
|
2016-12-07 09:42:48 +01:00
|
|
|
#define BTN0_PIN GPIO_PIN(0, 3)
|
2016-10-21 20:50:20 +02:00
|
|
|
/** @} */
|
|
|
|
|
2015-08-08 15:59:25 +02:00
|
|
|
/**
|
|
|
|
* @name 2.4GHz RF switch controlled by SW
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define RF_SWITCH_PORT GPIO_D
|
|
|
|
#define RF_SWITCH_PIN (4)
|
|
|
|
#define RF_SWITCH_EXTERNAL (RF_SWITCH_PORT->DATA |= (1 << RF_SWITCH_PIN))
|
|
|
|
#define RF_SWITCH_INTERNAL (RF_SWITCH_PORT->DATA &= ~(1 << RF_SWITCH_PIN))
|
|
|
|
#define RF_SWITCH_TOGGLE (RF_SWITCH_PORT->DATA ^= (1 << RF_SWITCH_PIN))
|
|
|
|
/** @} */
|
2016-02-22 22:38:39 +01:00
|
|
|
|
2017-01-20 09:38:20 +01:00
|
|
|
/**
|
|
|
|
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
|
|
|
*/
|
|
|
|
void board_init(void);
|
|
|
|
|
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
|
|
|
/** @} */
|