-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
412 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
MODULE = board | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ifneq (,$(filter saul_default,$(USEMODULE))) | ||
USEMODULE += saul_gpio | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Put defined MCU peripherals here (in alphabetical order) | ||
FEATURES_PROVIDED += periph_cpuid | ||
FEATURES_PROVIDED += periph_gpio | ||
FEATURES_PROVIDED += periph_pwm | ||
FEATURES_PROVIDED += periph_spi | ||
FEATURES_PROVIDED += periph_timer | ||
FEATURES_PROVIDED += periph_uart | ||
FEATURES_PROVIDED += periph_adc | ||
|
||
# Various other features (if any) | ||
FEATURES_PROVIDED += cpp | ||
|
||
# The board MPU family (used for grouping by the CI system) | ||
FEATURES_MCU_GROUP = cortex_m3_2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
## the cpu to build for | ||
export CPU = stm32f1 | ||
export CPU_MODEL = stm32f103c8 | ||
|
||
# define the default port depending on the host OS | ||
PORT_LINUX ?= /dev/ttyUSB0 | ||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*))) | ||
|
||
# setup serial terminal | ||
include $(RIOTMAKE)/tools/serial.inc.mk | ||
|
||
# this board uses openocd | ||
include $(RIOTMAKE)/tools/openocd.inc.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright (C) 2015 TriaGnoSys GmbH | ||
* 2017 Alexander Kurth, Sören Tempel, Tristan Bruns | ||
* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_bluepill | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific implementations for the bluepill board | ||
* | ||
* @author Víctor Ariño <victor.arino@triagnosys.com> | ||
* @author Sören Tempel <tempel@uni-bremen.de> | ||
* @author Tristan Bruns <tbruns@uni-bremen.de> | ||
* @author Alexander Kurth <kurth1@uni-bremen.de> | ||
* | ||
* @} | ||
*/ | ||
|
||
#include "board.h" | ||
#include "periph/gpio.h" | ||
|
||
void board_init(void) | ||
{ | ||
cpu_init(); | ||
gpio_init(LED0_PIN, GPIO_OUT); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
source [find interface/stlink-v2.cfg] | ||
transport select hla_swd | ||
|
||
source [find target/stm32f1x.cfg] | ||
reset_config none separate | ||
|
||
$_TARGETNAME configure -rtos auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright (C) 2015 TriaGnoSys GmbH | ||
* 2017 Alexander Kurth, Sören Tempel, Tristan Bruns | ||
* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_bluepill | ||
* @{ | ||
* | ||
* @file | ||
* @brief Peripheral MCU configuration for the bluepill board | ||
* | ||
* @author Víctor Ariño <victor.arino@triagnosys.com> | ||
* @author Sören Tempel <tempel@uni-bremen.de> | ||
* @author Tristan Bruns <tbruns@uni-bremen.de> | ||
* @author Alexander Kurth <kurth1@uni-bremen.de> | ||
* | ||
*/ | ||
|
||
#ifndef BOARD_H | ||
#define BOARD_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief LED pin definitions and handlers | ||
* @{ | ||
*/ | ||
#define LED0_PORT GPIOC | ||
#define LED0_PIN GPIO_PIN(PORT_C, 13) | ||
#define LED0_MASK (1 << 13) | ||
|
||
#define LED0_ON (LED0_PORT->BSRR = LED0_MASK) | ||
#define LED0_OFF (LED0_PORT->BSRR = (LED0_MASK << 16)) | ||
#define LED0_TOGGLE (LED0_PORT->ODR ^= LED0_MASK) | ||
/** @} */ | ||
|
||
/** | ||
* @brief Initialize board specific hardware, including clock, LEDs and std-IO | ||
*/ | ||
void board_init(void); | ||
|
||
/** | ||
* @brief Use the 2nd UART for STDIO on this board | ||
*/ | ||
#define UART_STDIO_DEV UART_DEV(1) | ||
|
||
/** | ||
* @name xtimer configuration | ||
*/ | ||
#define XTIMER_WIDTH (16) | ||
#define XTIMER_BACKOFF 5 | ||
/** @} */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* BOARD_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (C) 2017 HAW Hamburg | ||
* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* @ingroup boards_stm32f130c8t6 | ||
* @{ | ||
* | ||
* @file | ||
* @brief Board specific configuration of direct mapped GPIOs | ||
* | ||
* @author Sebastian Meiling <s@mlng.net> | ||
*/ | ||
|
||
#ifndef GPIO_PARAMS_H | ||
#define GPIO_PARAMS_H | ||
|
||
#include "board.h" | ||
#include "saul/periph.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief GPIO pin configuration | ||
*/ | ||
static const saul_gpio_params_t saul_gpio_params[] = | ||
{ | ||
{ | ||
.name = "LED", | ||
.pin = LED0_PIN, | ||
.mode = GPIO_OUT | ||
}, | ||
}; | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* GPIO_PARAMS_H */ | ||
/** @} */ |
Oops, something went wrong.