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
|
|
|
* @ingroup boards_msbiot
|
2014-07-28 22:41:55 +02:00
|
|
|
* @{
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Board specific implementations for the MSB-IoT board
|
|
|
|
*
|
|
|
|
* @author Fabian Nack <nack@inf.fu-berlin.de>
|
|
|
|
*
|
|
|
|
* @}
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "board.h"
|
2017-03-07 13:42:23 +01:00
|
|
|
#include "periph/gpio.h"
|
2014-07-28 22:41:55 +02:00
|
|
|
|
2018-05-29 09:33:08 +02:00
|
|
|
static void gpios_init(void);
|
2014-07-28 22:41:55 +02:00
|
|
|
|
|
|
|
void board_init(void)
|
|
|
|
{
|
2018-05-29 09:33:08 +02:00
|
|
|
gpios_init();
|
2014-07-28 22:41:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2018-05-29 09:33:08 +02:00
|
|
|
* @brief Initialize the on board GPIO periphs (3 LEDs, 2 buttons)
|
2014-07-28 22:41:55 +02:00
|
|
|
*
|
2018-05-29 09:33:08 +02:00
|
|
|
* The LED and button initialization is hard-coded in this function. As the LEDs
|
|
|
|
* and buttons are soldered onto the board they are fixed to their CPU pins.
|
2014-07-28 22:41:55 +02:00
|
|
|
*
|
|
|
|
* The LEDs are connected to the following pins:
|
|
|
|
* - LED RED: PB8
|
|
|
|
* - LED YELLOW: PB14
|
|
|
|
* - LED GREEN: PB15
|
2018-05-29 09:33:08 +02:00
|
|
|
* - BUTTON T1: PB13
|
|
|
|
* - BUTTON T2: PA0
|
2014-07-28 22:41:55 +02:00
|
|
|
*/
|
2018-05-29 09:33:08 +02:00
|
|
|
static void gpios_init(void)
|
2014-07-28 22:41:55 +02:00
|
|
|
{
|
2018-05-29 09:33:08 +02:00
|
|
|
gpio_init(BUTTON0_PIN, GPIO_IN);
|
|
|
|
gpio_init(BUTTON1_PIN, GPIO_IN);
|
2014-07-28 22:41:55 +02:00
|
|
|
}
|