Skip to content

Commit

Permalink
Merge pull request RIOT-OS#1 from RIOT-OS/master
Browse files Browse the repository at this point in the history
catch up
  • Loading branch information
travisgriggs committed Mar 31, 2017
2 parents 340ed33 + f4dd0a3 commit 9093fa2
Show file tree
Hide file tree
Showing 60 changed files with 3,039 additions and 136 deletions.
7 changes: 7 additions & 0 deletions Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,13 @@ ifneq (,$(filter sock_dns,$(USEMODULE)))
USEMODULE += sock_util
endif

ifneq (,$(filter spiffs,$(USEMODULE)))
USEPKG += spiffs
USEMODULE += vfs
USEMODULE += spiffs_fs
USEMODULE += mtd
endif

# include package dependencies
-include $(USEPKG:%=$(RIOTPKG)/%/Makefile.dep)

Expand Down
2 changes: 1 addition & 1 deletion boards/fox/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (36000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/iotlab-common/include/periph_conf_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static const uart_conf_t uart_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (36000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/limifrog-v1/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_1_EN 1
#define I2C_NUMOF (I2C_0_EN + I2C_1_EN)
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (36000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_EVT_ISR isr_i2c1_ev
Expand Down
2 changes: 1 addition & 1 deletion boards/maple-mini/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static const uart_conf_t uart_config[] = {
#define I2C_0_EN 1
#define I2C_1_EN 0
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (36000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/msbiot/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (42000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
25 changes: 25 additions & 0 deletions boards/native/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,31 @@ void _native_LED_RED_TOGGLE(void);
extern mtd_dev_t *mtd0;
#endif

#ifdef MODULE_SPIFFS
#define SPIFFS_READ_ONLY 0
#define SPIFFS_SINGLETON 0

#define SPIFFS_HAL_CALLBACK_EXTRA 1

#define SPIFFS_CACHE 1

#if SPIFFS_SINGLETON == 1
#define SPIFFS_CFG_PHYS_SZ(ignore) (0x800000)

#define SPIFFS_CFG_PHYS_ERASE_SZ(ignore) (4096)

#define SPIFFS_CFG_PHYS_ADDR(ignore) (0)

#define SPIFFS_CFG_LOG_PAGE_SZ(ignore) (256)

#define SPIFFS_CFG_LOG_BLOCK_SZ(ignore) (4096)
#endif

#if SPIFFS_HAL_CALLBACK_EXTRA == 0
#define SPIFFS_MTD_DEV (MTD_0)
#endif
#endif

#ifdef __cplusplus
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo-f103/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static const uart_conf_t uart_config[] = {
#define I2C_0_EN 1
#define I2C_1_EN 0
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (36000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo-f303/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_0_EN 1
#define I2C_1_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (36000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo-f401/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (42000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo-f410/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (42000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo-f411/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (42000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo-f446/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (42000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
1 change: 1 addition & 0 deletions boards/nucleo-l053/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
Expand Down
1 change: 1 addition & 0 deletions boards/nucleo-l073/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo-l1/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_1_EN 1
#define I2C_NUMOF (I2C_0_EN + I2C_1_EN)
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (36000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_EVT_ISR isr_i2c1_ev
Expand Down
1 change: 1 addition & 0 deletions boards/nucleo-l476/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
Expand Down
1 change: 1 addition & 0 deletions boards/nucleo144-f207/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc
Expand Down
5 changes: 3 additions & 2 deletions boards/nucleo144-f413/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += periph_timer
FEATURES_PROVIDED += periph_uart
FEATURES_PROVIDED += periph_pwm

# load the common Makefile.features for Nucleo boards
include $(RIOTBOARD)/nucleo144-common/Makefile.features
Expand Down
2 changes: 1 addition & 1 deletion boards/nucleo144-f413/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (42000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
1 change: 1 addition & 0 deletions boards/nucleo144-f429/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Put defined MCU peripherals here (in alphabetical order)
FEATURES_PROVIDED += periph_cpuid
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_i2c
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_spi
Expand Down
9 changes: 9 additions & 0 deletions boards/opencm904/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ extern "C" {
*/
#define UART_STDIO_DEV UART_DEV(0)

/**
* @brief Override with ROBOTIS Bluetooth antenna baudrate for STDIO
* @{
*/
#ifndef UART_STDIO_BAUDRATE
#define UART_STDIO_BAUDRATE (921600UL)
#endif
/** @} */

/**
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
*/
Expand Down
2 changes: 1 addition & 1 deletion boards/stm32f3discovery/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_0_EN 1
#define I2C_1_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (36000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
2 changes: 1 addition & 1 deletion boards/stm32f4discovery/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static const spi_conf_t spi_config[] = {
#define I2C_NUMOF (1U)
#define I2C_0_EN 1
#define I2C_IRQ_PRIO 1
#define I2C_APBCLK (42000000U)
#define I2C_APBCLK (CLOCK_APB1)

/* I2C 0 device configuration */
#define I2C_0_DEV I2C1
Expand Down
4 changes: 2 additions & 2 deletions cpu/native/include/mtd_native.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*/

/**
* @ingroup mtd
* @defgroup mtd_native Native MTD
* @ingroup drivers_mtd
* @defgroup drivers_mtd_native Native MTD
* @{
* @brief mtd flash emulation for native
*
Expand Down
1 change: 0 additions & 1 deletion cpu/native/mtd/mtd_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

/**
* @ingroup mtd_native
* @{
* @brief mtd flash emulation for native
*
Expand Down
10 changes: 8 additions & 2 deletions cpu/stm32f4/periph/hwrng.c → cpu/stm32_common/periph/hwrng.c
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
/*
* Copyright (C) 2014-2016 Freie Universität Berlin
* Copyright (C) 2014-2017 Freie Universität Berlin
* 2016 OTA keys S.A.
*
* 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 cpu_stm32f4
* @ingroup cpu_stm32_common
* @{
*
* @file
* @brief Low-level random number generator driver implementation
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
* @author Aurelien Gonce <aurelien.gonce@altran.fr>
*
* @}
*/
Expand All @@ -38,6 +40,8 @@ void hwrng_read(void *buf, unsigned int num)
/* power on and enable the device */
#if defined(CPU_MODEL_STM32F410RB)
periph_clk_en(AHB1, RCC_AHB1ENR_RNGEN);
#elif defined(CPU_FAM_STM32L0)
periph_clk_en(AHB, RCC_AHBENR_RNGEN);
#else
periph_clk_en(AHB2, RCC_AHB2ENR_RNGEN);
#endif
Expand All @@ -60,6 +64,8 @@ void hwrng_read(void *buf, unsigned int num)
RNG->CR = 0;
#if defined(CPU_MODEL_STM32F410RB)
periph_clk_dis(AHB1, RCC_AHB1ENR_RNGEN);
#elif defined(CPU_FAM_STM32L0)
periph_clk_dis(AHB, RCC_AHBENR_RNGEN);
#else
periph_clk_dis(AHB2, RCC_AHB2ENR_RNGEN);
#endif
Expand Down
69 changes: 0 additions & 69 deletions cpu/stm32f2/periph/hwrng.c

This file was deleted.

3 changes: 3 additions & 0 deletions cpu/stm32l4/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ static void cpu_clock_init(void)
while (!(RCC->CSR & RCC_CSR_LSIRDY)) {}
#endif

/* select the MSI clock for the 48MHz clock tree (USB, RNG) */
RCC->CCIPR = (RCC_CCIPR_CLK48SEL_0 | RCC_CCIPR_CLK48SEL_1);

/* if configured: enable the HSE clock */
#if CLOCK_HSE
RCC->CR |= RCC_CR_HSEON;
Expand Down
Loading

0 comments on commit 9093fa2

Please sign in to comment.