aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/f4
diff options
context:
space:
mode:
Diffstat (limited to 'include/libopencm3/stm32/f4')
-rw-r--r--include/libopencm3/stm32/f4/crc.h40
-rw-r--r--include/libopencm3/stm32/f4/dac.h40
-rw-r--r--include/libopencm3/stm32/f4/gpio.h2
-rw-r--r--include/libopencm3/stm32/f4/i2c.h41
-rw-r--r--include/libopencm3/stm32/f4/iwdg.h41
-rw-r--r--include/libopencm3/stm32/f4/spi.h43
-rw-r--r--include/libopencm3/stm32/f4/usart.h63
7 files changed, 203 insertions, 67 deletions
diff --git a/include/libopencm3/stm32/f4/crc.h b/include/libopencm3/stm32/f4/crc.h
new file mode 100644
index 0000000..1c375fa
--- /dev/null
+++ b/include/libopencm3/stm32/f4/crc.h
@@ -0,0 +1,40 @@
+/** @defgroup crc_defines CRC Defines
+
+@brief <b>libopencm3 Defined Constants and Types for the STM32F4xx CRC Generator </b>
+
+@ingroup STM32F4xx_defines
+
+@version 1.0.0
+
+@author @htmlonly &copy; @endhtmlonly 2010 Thomas Otto <tommi@viadmin.org>
+
+@date 18 August 2012
+
+LGPL License Terms @ref lgpl_license
+ */
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
+ *
+ * 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_CRC_H
+#define LIBOPENCM3_CRC_H
+
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/stm32/common/crc_common_all.h>
+
+#endif
diff --git a/include/libopencm3/stm32/f4/dac.h b/include/libopencm3/stm32/f4/dac.h
new file mode 100644
index 0000000..0961c30
--- /dev/null
+++ b/include/libopencm3/stm32/f4/dac.h
@@ -0,0 +1,40 @@
+/** @defgroup dac_defines DAC Defines
+
+@brief <b>Defined Constants and Types for the STM32F4xx DAC</b>
+
+@ingroup STM32F4xx_defines
+
+@version 1.0.0
+
+@author @htmlonly &copy; @endhtmlonly 2012 Ken Sarkies <ksarkies@internode.on.net>
+
+@date 5 December 2012
+
+LGPL License Terms @ref lgpl_license
+ */
+
+/*
+ * 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_DAC_H
+#define LIBOPENCM3_DAC_H
+
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/stm32/common/dac_common_all.h>
+
+#endif
+
diff --git a/include/libopencm3/stm32/f4/gpio.h b/include/libopencm3/stm32/f4/gpio.h
index 9e0685f..4eedc6e 100644
--- a/include/libopencm3/stm32/f4/gpio.h
+++ b/include/libopencm3/stm32/f4/gpio.h
@@ -35,7 +35,7 @@ LGPL License Terms @ref lgpl_license
#ifndef LIBOPENCM3_GPIO_H
#define LIBOPENCM3_GPIO_H
-#include <libopencm3/stm32/f4/memorymap.h>
+#include <libopencm3/stm32/memorymap.h>
#include <libopencm3/stm32/common/gpio_common_f24.h>
#endif
diff --git a/include/libopencm3/stm32/f4/i2c.h b/include/libopencm3/stm32/f4/i2c.h
new file mode 100644
index 0000000..e1a41cf
--- /dev/null
+++ b/include/libopencm3/stm32/f4/i2c.h
@@ -0,0 +1,41 @@
+/** @defgroup i2c_defines I2C Defines
+
+@brief <b>Defined Constants and Types for the STM32F4xx I2C </b>
+
+@ingroup STM32F4xx_defines
+
+@version 1.0.0
+
+@author @htmlonly &copy; @endhtmlonly 2010 Thomas Otto <tommi@viadmin.org>
+@author @htmlonly &copy; @endhtmlonly 2012 Ken Sarkies <ksarkies@internode.on.net>
+
+@date 12 October 2012
+
+LGPL License Terms @ref lgpl_license
+ */
+
+/*
+ * 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_I2C_H
+#define LIBOPENCM3_I2C_H
+
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/stm32/common/i2c_common_f24.h>
+
+#endif
+
diff --git a/include/libopencm3/stm32/f4/iwdg.h b/include/libopencm3/stm32/f4/iwdg.h
new file mode 100644
index 0000000..d5baef4
--- /dev/null
+++ b/include/libopencm3/stm32/f4/iwdg.h
@@ -0,0 +1,41 @@
+/** @defgroup iwdg_defines IWDG Defines
+
+@brief <b>Defined Constants and Types for the STM32F4xx Independent Watchdog Timer</b>
+
+@ingroup STM32F4xx_defines
+
+@version 1.0.0
+
+@author @htmlonly &copy; @endhtmlonly 2010 Thomas Otto <tommi@viadmin.org>
+
+@date 18 August 2012
+
+LGPL License Terms @ref lgpl_license
+ */
+/*
+ * This file is part of the libopencm3 project.
+ *
+ * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
+ *
+ * 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_IWDG_H
+#define LIBOPENCM3_IWDG_H
+
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/stm32/common/iwdg_common_all.h>
+
+#endif
+
diff --git a/include/libopencm3/stm32/f4/spi.h b/include/libopencm3/stm32/f4/spi.h
index c852a41..6589290 100644
--- a/include/libopencm3/stm32/f4/spi.h
+++ b/include/libopencm3/stm32/f4/spi.h
@@ -1,8 +1,21 @@
+/** @defgroup spi_defines SPI Defines
+
+@brief <b>Defined Constants and Types for the STM32F4xx SPI</b>
+
+@ingroup STM32F4xx_defines
+
+@version 1.0.0
+
+@author @htmlonly &copy; @endhtmlonly 2012 Ken Sarkies <ksarkies@internode.on.net>
+
+@date 5 December 2012
+
+LGPL License Terms @ref lgpl_license
+ */
+
/*
* This file is part of the libopencm3 project.
*
- * Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
- *
* 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
@@ -17,27 +30,11 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef LIBOPENCM3_SPI_F4_H
-#define LIBOPENCM3_SPI_F4_H
+#ifndef LIBOPENCM3_SPI_H
+#define LIBOPENCM3_SPI_H
-#include <libopencm3/stm32/spi.h>
-
-/*
- * This file extends the common STM32 version with definitions only
- * applicable to the STM32F4 series of devices.
- */
-
-/* --- SPI_CR2 values ------------------------------------------------------ */
-
-/* FRF: Frame format */
-/* Note: Not used in I2S mode. */
-#define SPI_CR2_FRF (1 << 4)
-#define SPI_CR2_FRF_MOTOROLA_MODE (0 << 4)
-#define SPI_CR2_FRF_TI_MODE (1 << 4)
-
-/* --- SPI_SR values ------------------------------------------------------- */
-
-/* TIFRFE: TI frame format error */
-#define SPI_SR_TIFRFE (1 << 8)
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/stm32/common/spi_common_f24.h>
#endif
+
diff --git a/include/libopencm3/stm32/f4/usart.h b/include/libopencm3/stm32/f4/usart.h
index ac113da..740f0a8 100644
--- a/include/libopencm3/stm32/f4/usart.h
+++ b/include/libopencm3/stm32/f4/usart.h
@@ -1,9 +1,21 @@
+/** @defgroup usart_defines USART Defines
+
+@brief <b>Defined Constants and Types for the STM32F4xx USART</b>
+
+@ingroup STM32F4xx_defines
+
+@version 1.0.0
+
+@author @htmlonly &copy; @endhtmlonly 2012 Ken Sarkies <ksarkies@internode.on.net>
+
+@date 5 December 2012
+
+LGPL License Terms @ref lgpl_license
+ */
+
/*
* This file is part of the libopencm3 project.
*
- * Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
- * Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
- *
* 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
@@ -18,46 +30,11 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef LIBOPENCM3_USART_F4_H
-#define LIBOPENCM3_USART_F4_H
-
-#include <libopencm3/stm32/usart.h>
-
-/* --- Convenience macros -------------------------------------------------- */
-
-#define USART6 USART6_BASE
+#ifndef LIBOPENCM3_USART_H
+#define LIBOPENCM3_USART_H
-/* --- USART registers ----------------------------------------------------- */
-
-/* Status register (USARTx_SR) */
-#define USART6_SR USART_SR(USART6_BASE)
-
-/* Data register (USARTx_DR) */
-#define USART6_DR USART_DR(USART6_BASE)
-
-/* Baud rate register (USARTx_BRR) */
-#define USART6_BRR USART_BRR(USART6_BASE)
-
-/* Control register 1 (USARTx_CR1) */
-#define USART6_CR1 USART_CR1(USART6_BASE)
-
-/* Control register 2 (USARTx_CR2) */
-#define USART6_CR2 USART_CR2(USART6_BASE)
-
-/* Control register 3 (USARTx_CR3) */
-#define USART6_CR3 USART_CR3(USART6_BASE)
-
-/* Guard time and prescaler register (USARTx_GTPR) */
-#define USART6_GTPR USART_GTPR(USART6_BASE)
-
-/* --- USART_CR1 values ---------------------------------------------------- */
-
-/* OVER8: Oversampling mode */
-#define USART_CR1_OVER8 (1 << 15)
-
-/* --- USART_CR3 values ---------------------------------------------------- */
-
-/* ONEBIT: One sample bit method enable */
-#define USART_CR3_ONEBIT (1 << 11)
+#include <libopencm3/stm32/memorymap.h>
+#include <libopencm3/stm32/common/usart_common_f24.h>
#endif
+