2014-07-28 22:41:55 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2014 Freie Universität Berlin
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-02-12 13:39:47 +01:00
|
|
|
* @defgroup boards_msbiot MSB-IoT
|
2014-07-28 22:41:55 +02:00
|
|
|
* @ingroup boards
|
|
|
|
* @brief Board specific files for the MSB-IoT board
|
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Board specific definitions for the MSB-IoT board
|
|
|
|
*
|
|
|
|
* @author Fabian Nack <nack@inf.fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#ifndef BOARD_H
|
|
|
|
#define BOARD_H
|
2014-07-28 22:41:55 +02:00
|
|
|
|
|
|
|
#include "cpu.h"
|
|
|
|
#include "periph_conf.h"
|
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-09-23 01:33:45 +02:00
|
|
|
/**
|
|
|
|
* @name Configure connected CC1101 (radio) device
|
|
|
|
* @{
|
|
|
|
*/
|
2016-11-08 18:28:32 +01:00
|
|
|
#define CC110X_SPI SPI_DEV(0)
|
2015-09-15 11:45:21 +02:00
|
|
|
#define CC110X_CS GPIO_PIN(PORT_B, 12)
|
|
|
|
#define CC110X_GDO0 GPIO_PIN(PORT_C, 4)
|
|
|
|
#define CC110X_GDO1 GPIO_PIN(PORT_A, 6)
|
|
|
|
#define CC110X_GDO2 GPIO_PIN(PORT_C, 5)
|
2014-09-23 01:33:45 +02:00
|
|
|
/** @} */
|
|
|
|
|
2015-01-28 09:17:18 +01:00
|
|
|
/**
|
|
|
|
* @name Configure connected MPU-9150 device
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define MPU9150_I2C I2C_0
|
|
|
|
#define MPU9150_HW_ADDR (0x68)
|
|
|
|
#define MPU9150_COMP_ADDR (0x0E)
|
|
|
|
/** @} */
|
|
|
|
|
2014-07-28 22:41:55 +02:00
|
|
|
/**
|
2016-03-11 18:04:26 +01:00
|
|
|
* @brief LED pin definitions and handlers
|
2014-07-28 22:41:55 +02:00
|
|
|
* @{
|
|
|
|
*/
|
2017-03-13 21:13:37 +01:00
|
|
|
#define LED0_PIN GPIO_PIN(PORT_B, 8)
|
|
|
|
#define LED1_PIN GPIO_PIN(PORT_B, 14)
|
|
|
|
#define LED2_PIN GPIO_PIN(PORT_B, 15)
|
2016-03-11 18:04:26 +01:00
|
|
|
|
2014-07-28 22:41:55 +02:00
|
|
|
#define LED_PORT GPIOB
|
2016-03-11 18:04:26 +01:00
|
|
|
#define LED0_MASK (1 << 8)
|
|
|
|
#define LED1_MASK (1 << 14)
|
|
|
|
#define LED2_MASK (1 << 15)
|
2014-07-28 22:41:55 +02:00
|
|
|
|
2017-03-07 13:42:23 +01:00
|
|
|
#define LED0_ON (LED_PORT->BSRR = LED0_MASK)
|
|
|
|
#define LED0_OFF (LED_PORT->BSRR = (LED0_MASK << 16))
|
2016-03-11 18:04:26 +01:00
|
|
|
#define LED0_TOGGLE (LED_PORT->ODR ^= LED0_MASK)
|
|
|
|
|
2017-03-07 13:42:23 +01:00
|
|
|
#define LED1_ON (LED_PORT->BSRR = LED1_MASK)
|
|
|
|
#define LED1_OFF (LED_PORT->BSRR = (LED1_MASK << 16))
|
2016-03-11 18:04:26 +01:00
|
|
|
#define LED1_TOGGLE (LED_PORT->ODR ^= LED1_MASK)
|
|
|
|
|
2017-03-07 13:42:23 +01:00
|
|
|
#define LED2_ON (LED_PORT->BSRR = LED2_MASK)
|
|
|
|
#define LED2_OFF (LED_PORT->BSRR = (LED2_MASK << 16))
|
2016-03-11 18:04:26 +01:00
|
|
|
#define LED2_TOGGLE (LED_PORT->ODR ^= LED2_MASK)
|
2014-07-28 22:41:55 +02:00
|
|
|
/** @} */
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
|
|
|
*/
|
|
|
|
void board_init(void);
|
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2017-01-18 13:00:05 +01:00
|
|
|
#endif /* BOARD_H */
|
2014-07-28 22:41:55 +02:00
|
|
|
/** @} */
|