2013-11-28 12:57:41 +01:00
|
|
|
/*
|
2014-11-09 15:06:25 +01:00
|
|
|
* Copyright (C) 2013 Milan Babel <babel@inf.fu-berlin.de>
|
2016-03-11 14:12:07 +01:00
|
|
|
* 2016 Freie Universität Berlin
|
2014-11-09 15:06:25 +01:00
|
|
|
*
|
|
|
|
* 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.
|
2013-11-28 12:57:41 +01:00
|
|
|
*/
|
|
|
|
|
2013-05-28 10:10:45 +02:00
|
|
|
/**
|
2013-11-28 12:57:41 +01:00
|
|
|
* @defgroup boards_wsn430-common WSN430 common
|
|
|
|
* @ingroup boards
|
|
|
|
* @brief Common files for WSN430 based boards
|
|
|
|
* @{
|
|
|
|
*
|
2014-10-21 16:52:30 +02:00
|
|
|
* @file
|
2013-11-28 12:57:41 +01:00
|
|
|
* @brief Common definitions for WSN430 based boards
|
|
|
|
*
|
2016-03-11 14:12:07 +01:00
|
|
|
* @author Milan Babel <babel@inf.fu-berlin.de>
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
|
|
*
|
2013-11-28 12:57:41 +01:00
|
|
|
*/
|
2013-05-28 10:10:45 +02:00
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#ifndef BOARD_COMMON_H
|
|
|
|
#define BOARD_COMMON_H
|
2013-10-28 23:01:45 +01:00
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-03-11 14:12:07 +01:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @brief Address of the info memory
|
2016-03-11 14:12:07 +01:00
|
|
|
*/
|
2013-05-25 12:34:18 +02:00
|
|
|
#define INFOMEM (0x1000)
|
|
|
|
|
2016-03-11 14:12:07 +01:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name Xtimer configuration
|
2016-03-11 14:12:07 +01:00
|
|
|
* @{
|
|
|
|
*/
|
2016-07-05 16:45:41 +02:00
|
|
|
#define XTIMER_DEV (0)
|
2016-03-11 14:12:07 +01:00
|
|
|
#define XTIMER_CHAN (0)
|
2016-05-06 22:10:52 +02:00
|
|
|
#define XTIMER_WIDTH (16)
|
2016-03-11 14:12:07 +01:00
|
|
|
#define XTIMER_BACKOFF (40)
|
|
|
|
/** @} */
|
|
|
|
|
2016-03-11 18:04:27 +01:00
|
|
|
/**
|
2017-04-10 19:04:32 +02:00
|
|
|
* @name LED pin definitions and handlers
|
2016-03-11 18:04:27 +01:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define LED0_PIN GPIO_PIN(4, 4)
|
|
|
|
#define LED1_PIN GPIO_PIN(4, 5)
|
|
|
|
#define LED2_PIN GPIO_PIN(4, 6)
|
|
|
|
|
|
|
|
#define LED_DIR_REG P5DIR
|
|
|
|
#define LED0_MASK (1 << 4)
|
|
|
|
#define LED1_MASK (1 << 5)
|
|
|
|
#define LED2_MASK (1 << 6)
|
|
|
|
|
|
|
|
#define LED0_ON (LED_DIR_REG &=~LED0_MASK)
|
|
|
|
#define LED0_OFF (LED_DIR_REG |= LED0_MASK)
|
|
|
|
#define LED0_TOGGLE (LED_DIR_REG ^= LED0_MASK)
|
|
|
|
|
|
|
|
#define LED1_ON (LED_DIR_REG &=~LED1_MASK)
|
|
|
|
#define LED1_OFF (LED_DIR_REG |= LED1_MASK)
|
|
|
|
#define LED1_TOGGLE (LED_DIR_REG ^= LED1_MASK)
|
|
|
|
|
|
|
|
#define LED2_ON (LED_DIR_REG &=~LED2_MASK)
|
|
|
|
#define LED2_OFF (LED_DIR_REG |= LED2_MASK)
|
|
|
|
#define LED2_TOGGLE (LED_DIR_REG ^= LED2_MASK)
|
|
|
|
/** @} */
|
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#endif /* BOARD_COMMON_H */
|
2013-11-28 12:57:41 +01:00
|
|
|
/** @} */
|