stm32:rng: add common v1 to l0,l4,f7

This is a common peripheral based on reference manual inspection.
This commit is contained in:
Karl Palsson 2017-01-12 22:56:46 +00:00
parent 2476099f29
commit 05829037de
8 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,23 @@
/*
* This file is part of the libopencm3 project.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBOPENCM3_RNG_H
#define LIBOPENCM3_RNG_H
#include <libopencm3/stm32/common/rng_common_v1.h>
#endif

View File

@ -0,0 +1,23 @@
/*
* This file is part of the libopencm3 project.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBOPENCM3_RNG_H
#define LIBOPENCM3_RNG_H
#include <libopencm3/stm32/common/rng_common_v1.h>
#endif

View File

@ -0,0 +1,23 @@
/*
* This file is part of the libopencm3 project.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef LIBOPENCM3_RNG_H
#define LIBOPENCM3_RNG_H
#include <libopencm3/stm32/common/rng_common_v1.h>
#endif

View File

@ -24,6 +24,12 @@
# include <libopencm3/stm32/f2/rng.h>
#elif defined(STM32F4)
# include <libopencm3/stm32/f4/rng.h>
#elif defined(STM32F7)
# include <libopencm3/stm32/f7/rng.h>
#elif defined(STM32L0)
# include <libopencm3/stm32/l0/rng.h>
#elif defined(STM32L4)
# include <libopencm3/stm32/l4/rng.h>
#else
# error "stm32 family not defined."
#endif

View File

@ -42,6 +42,8 @@ ARFLAGS = rcs
OBJS = gpio.o gpio_common_all.o gpio_common_f0234.o
OBJS += rng_common_v1.o
VPATH += ../../usb:../:../../cm3:../common
VPATH += ../../ethernet

View File

@ -43,6 +43,7 @@ OBJS += gpio_common_all.o gpio_common_f0234.o rcc_common_all.o
OBJS += adc_common_v2.o
OBJS += crs_common_all.o
OBJS += exti_common_all.o
OBJS += rng_common_v1.o
OBJS += usb.o usb_control.o usb_standard.o
OBJS += st_usbfs_core.o st_usbfs_v2.o

31
lib/stm32/l0/rng.c Normal file
View File

@ -0,0 +1,31 @@
/* This file is used for documentation purposes. It does not need
to be compiled. All source code is in the common area.
If there is any device specific code required it can be included here,
in which case this file must be added to the compile list. */
/** @defgroup rng_file RNG
@ingroup STM32L0xx
@brief <b>libopencm3 STM32L0xx RNG</b>
*/
/*
* This file is part of the libopencm3 project.
*
* This library is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libopencm3/stm32/rng.h>

View File

@ -43,6 +43,7 @@ OBJS = adc.o flash.o pwr.o rcc.o
OBJS += rcc_common_all.o
OBJS += gpio_common_all.o gpio_common_f0234.o
OBJS += adc_common_v2.o adc_common_v2_multi.o
OBJS += rng_common_v1.o
OBJS += timer_common_all.o
VPATH += ../../usb:../:../../cm3:../common