aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32
diff options
context:
space:
mode:
authorchrysn2012-03-02 23:59:52 +0100
committerchrysn2012-03-02 23:59:52 +0100
commit563586c072c38fe1d0706bfc96dae33773f1dda7 (patch)
tree95ed81a5862e8ba5bfcdf1e908bb91cbb7f51b23 /include/libopencm3/stm32
parente388056fda84a5c85430f5a31a4cfe3af3f2e35f (diff)
parent43561de3297b88d68753cb4625d6dc48bfb43d71 (diff)
Merge branch 'master' into efm32
Diffstat (limited to 'include/libopencm3/stm32')
-rw-r--r--include/libopencm3/stm32/can.h12
-rw-r--r--include/libopencm3/stm32/crc.h12
-rw-r--r--include/libopencm3/stm32/dbgmcu.h12
-rw-r--r--include/libopencm3/stm32/exti.h12
-rw-r--r--include/libopencm3/stm32/f1/adc.h12
-rw-r--r--include/libopencm3/stm32/f1/bkp.h12
-rw-r--r--include/libopencm3/stm32/f1/dma.h816
-rw-r--r--include/libopencm3/stm32/f1/ethernet.h12
-rw-r--r--include/libopencm3/stm32/f1/flash.h14
-rw-r--r--include/libopencm3/stm32/f1/gpio.h12
-rw-r--r--include/libopencm3/stm32/f1/memorymap.h12
-rw-r--r--include/libopencm3/stm32/f1/nvic_f1.h12
-rw-r--r--include/libopencm3/stm32/f1/rcc.h12
-rw-r--r--include/libopencm3/stm32/f1/rtc.h12
-rw-r--r--include/libopencm3/stm32/f1/scb.h12
-rw-r--r--include/libopencm3/stm32/f1/usb.h12
-rw-r--r--include/libopencm3/stm32/f1/usb_desc.h12
-rw-r--r--include/libopencm3/stm32/f2/dma.h12
-rw-r--r--include/libopencm3/stm32/f2/flash.h12
-rw-r--r--include/libopencm3/stm32/f2/gpio.h12
-rw-r--r--include/libopencm3/stm32/f2/memorymap.h12
-rw-r--r--include/libopencm3/stm32/f2/nvic_f2.h12
-rw-r--r--include/libopencm3/stm32/f2/pwr.h12
-rw-r--r--include/libopencm3/stm32/f2/rcc.h12
-rw-r--r--include/libopencm3/stm32/f2/scb.h12
-rw-r--r--include/libopencm3/stm32/f2/spi.h12
-rw-r--r--include/libopencm3/stm32/f2/syscfg.h12
-rw-r--r--include/libopencm3/stm32/f2/timer.h12
-rw-r--r--include/libopencm3/stm32/f2/usart.h12
-rw-r--r--include/libopencm3/stm32/f4/flash.h12
-rw-r--r--include/libopencm3/stm32/f4/gpio.h12
-rw-r--r--include/libopencm3/stm32/f4/memorymap.h12
-rw-r--r--include/libopencm3/stm32/f4/nvic_f4.h12
-rw-r--r--include/libopencm3/stm32/f4/pwr.h12
-rw-r--r--include/libopencm3/stm32/f4/rcc.h12
-rw-r--r--include/libopencm3/stm32/f4/scb.h12
-rw-r--r--include/libopencm3/stm32/f4/spi.h12
-rw-r--r--include/libopencm3/stm32/f4/syscfg.h12
-rw-r--r--include/libopencm3/stm32/f4/timer.h12
-rw-r--r--include/libopencm3/stm32/f4/usart.h12
-rw-r--r--include/libopencm3/stm32/fsmc.h12
-rw-r--r--include/libopencm3/stm32/i2c.h12
-rw-r--r--include/libopencm3/stm32/iwdg.h12
-rw-r--r--include/libopencm3/stm32/memorymap.h12
-rw-r--r--include/libopencm3/stm32/nvic.h12
-rw-r--r--include/libopencm3/stm32/otg_fs.h12
-rw-r--r--include/libopencm3/stm32/pwr.h12
-rw-r--r--include/libopencm3/stm32/spi.h13
-rw-r--r--include/libopencm3/stm32/systick.h12
-rw-r--r--include/libopencm3/stm32/timer.h12
-rw-r--r--include/libopencm3/stm32/tools.h12
-rw-r--r--include/libopencm3/stm32/usart.h12
-rw-r--r--include/libopencm3/stm32/wwdg.h12
53 files changed, 528 insertions, 915 deletions
diff --git a/include/libopencm3/stm32/can.h b/include/libopencm3/stm32/can.h
index 134095f..0a05798 100644
--- a/include/libopencm3/stm32/can.h
+++ b/include/libopencm3/stm32/can.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_CAN_H
diff --git a/include/libopencm3/stm32/crc.h b/include/libopencm3/stm32/crc.h
index a4fa7bb..6ae4085 100644
--- a/include/libopencm3/stm32/crc.h
+++ b/include/libopencm3/stm32/crc.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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
diff --git a/include/libopencm3/stm32/dbgmcu.h b/include/libopencm3/stm32/dbgmcu.h
index 1e14bea..b26b6b9 100644
--- a/include/libopencm3/stm32/dbgmcu.h
+++ b/include/libopencm3/stm32/dbgmcu.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Gareth McMullin <gareth@blacksphere.co.nz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_STM32_DBGMCU_H
diff --git a/include/libopencm3/stm32/exti.h b/include/libopencm3/stm32/exti.h
index 19ab547..d1935ad 100644
--- a/include/libopencm3/stm32/exti.h
+++ b/include/libopencm3/stm32/exti.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Mark Butler <mbutler@physics.otago.ac.nz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_EXTI_H
diff --git a/include/libopencm3/stm32/f1/adc.h b/include/libopencm3/stm32/f1/adc.h
index 6e35d59..a4eb19c 100644
--- a/include/libopencm3/stm32/f1/adc.h
+++ b/include/libopencm3/stm32/f1/adc.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2009 Edward Cheeseman <evbuilder@users.sourceforge.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_ADC_H
diff --git a/include/libopencm3/stm32/f1/bkp.h b/include/libopencm3/stm32/f1/bkp.h
index d700f9b..b488451 100644
--- a/include/libopencm3/stm32/f1/bkp.h
+++ b/include/libopencm3/stm32/f1/bkp.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_BKP_H
diff --git a/include/libopencm3/stm32/f1/dma.h b/include/libopencm3/stm32/f1/dma.h
index 6fe316e..2a3d29c 100644
--- a/include/libopencm3/stm32/f1/dma.h
+++ b/include/libopencm3/stm32/f1/dma.h
@@ -2,19 +2,20 @@
* This file is part of the libopencm3 project.
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
+ * Copyright (C) 2012 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_DMA_H
@@ -41,615 +42,225 @@
#define DMA1_IFCR DMA_IFCR(DMA1)
#define DMA2_IFCR DMA_IFCR(DMA2)
-/* DMA channel 1 configuration register (DMAx_CCR1) */
-#define DMA_CCR1(dma_base) MMIO32(dma_base + 0x08 + 0x14 * 0)
-#define DMA1_CCR1 DMA_CCR1(DMA1)
-#define DMA2_CCR1 DMA_CCR1(DMA2)
-
-/* DMA channel 2 configuration register (DMAx_CCR2) */
-#define DMA_CCR2(dma_base) MMIO32(dma_base + 0x08 + 0x14 * 1)
-#define DMA1_CCR2 DMA_CCR2(DMA1)
-#define DMA2_CCR2 DMA_CCR2(DMA2)
-
-/* DMA channel 3 configuration register (DMAx_CCR3) */
-#define DMA_CCR3(dma_base) MMIO32(dma_base + 0x08 + 0x14 * 2)
-#define DMA1_CCR3 DMA_CCR3(DMA1)
-#define DMA2_CCR3 DMA_CCR3(DMA2)
-
-/* DMA channel 4 configuration register (DMAx_CCR4) */
-#define DMA_CCR4(dma_base) MMIO32(dma_base + 0x08 + 0x14 * 3)
-#define DMA1_CCR4 DMA_CCR4(DMA1)
-#define DMA2_CCR4 DMA_CCR4(DMA2)
-
-/* DMA channel 5 configuration register (DMAx_CCR5) */
-#define DMA_CCR5(dma_base) MMIO32(dma_base + 0x08 + 0x14 * 4)
-#define DMA1_CCR5 DMA_CCR5(DMA1)
-#define DMA2_CCR5 DMA_CCR5(DMA2)
-
-/* DMA channel 6 configuration register (DMAx_CCR6) */
-#define DMA_CCR6(dma_base) MMIO32(dma_base + 0x08 + 0x14 * 5)
-#define DMA1_CCR6 DMA_CCR6(DMA1)
-
-/* DMA channel 7 configuration register (DMAx_CCR7) */
-#define DMA_CCR7(dma_base) MMIO32(dma_base + 0x08 + 0x14 * 6)
-#define DMA1_CCR7 DMA_CCR7(DMA1)
-
-/* DMA channel 1 number of data register (DMAx_CNDTR1) */
-#define DMA_CNDTR1(dma_base) MMIO32(dma_base + 0x0C + 0x14 * 0)
-#define DMA1_CNDTR1 DMA_CNDTR1(DMA1)
-#define DMA2_CNDTR1 DMA_CNDTR1(DMA2)
-
-/* DMA channel 2 number of data register (DMAx_CNDTR2) */
-#define DMA_CNDTR2(dma_base) MMIO32(dma_base + 0x0C + 0x14 * 1)
-#define DMA1_CNDTR2 DMA_CNDTR2(DMA1)
-#define DMA2_CNDTR2 DMA_CNDTR2(DMA2)
-
-/* DMA channel 3 number of data register (DMAx_CNDTR3) */
-#define DMA_CNDTR3(dma_base) MMIO32(dma_base + 0x0C + 0x14 * 2)
-#define DMA1_CNDTR3 DMA_CNDTR3(DMA1)
-#define DMA2_CNDTR3 DMA_CNDTR3(DMA2)
-
-/* DMA channel 4 number of data register (DMAx_CNDTR4) */
-#define DMA_CNDTR4(dma_base) MMIO32(dma_base + 0x0C + 0x14 * 3)
-#define DMA1_CNDTR4 DMA_CNDTR4(DMA1)
-#define DMA2_CNDTR4 DMA_CNDTR4(DMA2)
-
-/* DMA channel 5 number of data register (DMAx_CNDTR5) */
-#define DMA_CNDTR5(dma_base) MMIO32(dma_base + 0x0C + 0x14 * 4)
-#define DMA1_CNDTR5 DMA_CNDTR5(DMA1)
-#define DMA2_CNDTR5 DMA_CNDTR5(DMA2)
-
-/* DMA channel 6 number of data register (DMAx_CNDTR6) */
-#define DMA_CNDTR6(dma_base) MMIO32(dma_base + 0x0C + 0x14 * 5)
-#define DMA1_CNDTR6 DMA_CNDTR6(DMA1)
-
-/* DMA channel 7 number of data register (DMAx_CNDTR7) */
-#define DMA_CNDTR7(dma_base) MMIO32(dma_base + 0x0C + 0x14 * 6)
-#define DMA1_CNDTR7 DMA_CNDTR7(DMA1)
-
-/* DMA channel 1 peripheral address register (DMAx_CPAR1) */
-#define DMA_CPAR1(dma_base) MMIO32(dma_base + 0x10 + 0x14 * 0)
-#define DMA1_CPAR1 DMA_CPAR1(DMA1)
-#define DMA2_CPAR1 DMA_CPAR1(DMA2)
-
-/* DMA channel 2 peripheral address register (DMAx_CPAR2) */
-#define DMA_CPAR2(dma_base) MMIO32(dma_base + 0x10 + 0x14 * 1)
-#define DMA1_CPAR2 DMA_CPAR2(DMA1)
-#define DMA2_CPAR2 DMA_CPAR2(DMA2)
-
-/* DMA channel 3 peripheral address register (DMAx_CPAR3) */
-#define DMA_CPAR3(dma_base) MMIO32(dma_base + 0x10 + 0x14 * 2)
-#define DMA1_CPAR3 DMA_CPAR3(DMA1)
-#define DMA2_CPAR3 DMA_CPAR3(DMA2)
-
-/* DMA channel 4 peripheral address register (DMAx_CPAR4) */
-#define DMA_CPAR4(dma_base) MMIO32(dma_base + 0x10 + 0x14 * 3)
-#define DMA1_CPAR4 DMA_CPAR4(DMA1)
-#define DMA2_CPAR4 DMA_CPAR4(DMA2)
-
-/* DMA channel 5 peripheral address register (DMAx_CPAR5) */
-#define DMA_CPAR5(dma_base) MMIO32(dma_base + 0x10 + 0x14 * 4)
-#define DMA1_CPAR5 DMA_CPAR5(DMA1)
-#define DMA2_CPAR5 DMA_CPAR5(DMA2)
-
-/* DMA channel 6 peripheral address register (DMAx_CPAR6) */
-#define DMA_CPAR6(dma_base) MMIO32(dma_base + 0x10 + 0x14 * 5)
-#define DMA1_CPAR6 DMA_CPAR6(DMA1)
-
-/* DMA channel 7 peripheral address register (DMAx_CPAR7) */
-#define DMA_CPAR7(dma_base) MMIO32(dma_base + 0x10 + 0x14 * 6)
-#define DMA1_CPAR7 DMA_CPAR7(DMA1)
-
-/* DMA channel 1 memory address register (DMAx_CMAR1) */
-#define DMA_CMAR1(dma_base) MMIO32(dma_base + 0x14 + 0x14 * 0)
-#define DMA1_CMAR1 DMA_CMAR1(DMA1)
-#define DMA2_CMAR1 DMA_CMAR1(DMA2)
-
-/* DMA channel 2 memory address register (DMAx_CMAR2) */
-#define DMA_CMAR2(dma_base) MMIO32(dma_base + 0x14 + 0x14 * 1)
-#define DMA1_CMAR2 DMA_CMAR2(DMA1)
-#define DMA2_CMAR2 DMA_CMAR2(DMA2)
-
-/* DMA channel 3 memory address register (DMAx_CMAR3) */
-#define DMA_CMAR3(dma_base) MMIO32(dma_base + 0x14 + 0x14 * 2)
-#define DMA1_CMAR3 DMA_CMAR3(DMA1)
-#define DMA2_CMAR3 DMA_CMAR3(DMA2)
-
-/* DMA channel 4 memory address register (DMAx_CMAR4) */
-#define DMA_CMAR4(dma_base) MMIO32(dma_base + 0x14 + 0x14 * 3)
-#define DMA1_CMAR4 DMA_CMAR4(DMA1)
-#define DMA2_CMAR4 DMA_CMAR4(DMA2)
-
-/* DMA channel 5 memory address register (DMAx_CMAR5) */
-#define DMA_CMAR5(dma_base) MMIO32(dma_base + 0x14 + 0x14 * 4)
-#define DMA1_CMAR5 DMA_CMAR5(DMA1)
-#define DMA2_CMAR5 DMA_CMAR5(DMA2)
-
-/* DMA channel 6 memory address register (DMAx_CMAR6) */
-#define DMA_CMAR6(dma_base) MMIO32(dma_base + 0x14 + 0x14 * 5)
-#define DMA1_CMAR6 DMA_CMAR6(DMA1)
-
-/* DMA channel 7 memory address register (DMAx_CMAR7) */
-#define DMA_CMAR7(dma_base) MMIO32(dma_base + 0x14 + 0x14 * 6)
-#define DMA1_CMAR7 DMA_CMAR7(DMA1)
+/* DMA channel configuration register (DMAx_CCRy) */
+#define DMA_CCR(dma_base, channel) MMIO32(dma_base + 0x08 + \
+ (0x14 * ((channel) - 1)))
+
+#define DMA1_CCR(channel) DMA_CCR(DMA1, channel)
+#define DMA1_CCR1 DMA1_CCR(DMA_CHANNEL1)
+#define DMA1_CCR2 DMA1_CCR(DMA_CHANNEL2)
+#define DMA1_CCR3 DMA1_CCR(DMA_CHANNEL3)
+#define DMA1_CCR4 DMA1_CCR(DMA_CHANNEL4)
+#define DMA1_CCR5 DMA1_CCR(DMA_CHANNEL5)
+#define DMA1_CCR6 DMA1_CCR(DMA_CHANNEL6)
+#define DMA1_CCR7 DMA1_CCR(DMA_CHANNEL7)
+
+#define DMA2_CCR(channel) DMA_CCR(DMA2, channel)
+#define DMA2_CCR1 DMA2_CCR(DMA_CHANNEL1)
+#define DMA2_CCR2 DMA2_CCR(DMA_CHANNEL2)
+#define DMA2_CCR3 DMA2_CCR(DMA_CHANNEL3)
+#define DMA2_CCR4 DMA2_CCR(DMA_CHANNEL4)
+#define DMA2_CCR5 DMA2_CCR(DMA_CHANNEL5)
+
+/* DMA number of data register (DMAx_CNDTRy) */
+#define DMA_CNDTR(dma_base, channel) MMIO32(dma_base + 0x0C + \
+ (0x14 * ((channel) - 1)))
+
+#define DMA1_CNDTR(channel) DMA_CNDTR(DMA1, channel)
+#define DMA1_CNDTR1 DMA1_CNDTR(DMA_CHANNEL1)
+#define DMA1_CNDTR2 DMA1_CNDTR(DMA_CHANNEL2)
+#define DMA1_CNDTR3 DMA1_CNDTR(DMA_CHANNEL3)
+#define DMA1_CNDTR4 DMA1_CNDTR(DMA_CHANNEL4)
+#define DMA1_CNDTR5 DMA1_CNDTR(DMA_CHANNEL5)
+#define DMA1_CNDTR6 DMA1_CNDTR(DMA_CHANNEL6)
+#define DMA1_CNDTR7 DMA1_CNDTR(DMA_CHANNEL7)
+
+#define DMA2_CNDTR(channel) DMA_CNDTR(DMA2, channel)
+#define DMA2_CNDTR1 DMA2_CNDTR(DMA_CHANNEL1)
+#define DMA2_CNDTR2 DMA2_CNDTR(DMA_CHANNEL2)
+#define DMA2_CNDTR3 DMA2_CNDTR(DMA_CHANNEL3)
+#define DMA2_CNDTR4 DMA2_CNDTR(DMA_CHANNEL4)
+#define DMA2_CNDTR5 DMA2_CNDTR(DMA_CHANNEL5)
+
+/* DMA peripheral address register (DMAx_CPARy) */
+#define DMA_CPAR(dma_base, channel) MMIO32(dma_base + 0x10 + \
+ (0x14 * ((channel) - 1)))
+
+#define DMA1_CPAR(channel) DMA_CPAR(DMA1, channel)
+#define DMA1_CPAR1 DMA1_CPAR(DMA_CHANNEL1)
+#define DMA1_CPAR2 DMA1_CPAR(DMA_CHANNEL2)
+#define DMA1_CPAR3 DMA1_CPAR(DMA_CHANNEL3)
+#define DMA1_CPAR4 DMA1_CPAR(DMA_CHANNEL4)
+#define DMA1_CPAR5 DMA1_CPAR(DMA_CHANNEL5)
+#define DMA1_CPAR6 DMA1_CPAR(DMA_CHANNEL6)
+#define DMA1_CPAR7 DMA1_CPAR(DMA_CHANNEL7)
+
+#define DMA2_CPAR(channel) DMA_CPAR(DMA2, channel)
+#define DMA2_CPAR1 DMA2_CPAR(DMA_CHANNEL1)
+#define DMA2_CPAR2 DMA2_CPAR(DMA_CHANNEL2)
+#define DMA2_CPAR3 DMA2_CPAR(DMA_CHANNEL3)
+#define DMA2_CPAR4 DMA2_CPAR(DMA_CHANNEL4)
+#define DMA2_CPAR5 DMA2_CPAR(DMA_CHANNEL5)
+
+/* DMA memory address register (DMAx_CMARy) */
+
+#define DMA_CMAR(dma_base, channel) MMIO32(dma_base + 0x14 + \
+ (0x14 * ((channel) - 1)))
+
+#define DMA1_CMAR(channel) DMA_CMAR(DMA1, channel)
+#define DMA1_CMAR1 DMA1_CMAR(DMA_CHANNEL1)
+#define DMA1_CMAR2 DMA1_CMAR(DMA_CHANNEL2)
+#define DMA1_CMAR3 DMA1_CMAR(DMA_CHANNEL3)
+#define DMA1_CMAR4 DMA1_CMAR(DMA_CHANNEL4)
+#define DMA1_CMAR5 DMA1_CMAR(DMA_CHANNEL5)
+#define DMA1_CMAR6 DMA1_CMAR(DMA_CHANNEL6)
+#define DMA1_CMAR7 DMA1_CMAR(DMA_CHANNEL7)
+
+#define DMA2_CMAR(channel) DMA_CMAR(DMA2, channel)
+#define DMA2_CMAR1 DMA2_CMAR(DMA_CHANNEL1)
+#define DMA2_CMAR2 DMA2_CMAR(DMA_CHANNEL2)
+#define DMA2_CMAR3 DMA2_CMAR(DMA_CHANNEL3)
+#define DMA2_CMAR4 DMA2_CMAR(DMA_CHANNEL4)
+#define DMA2_CMAR5 DMA2_CMAR(DMA_CHANNEL5)
/* --- DMA_ISR values ------------------------------------------------------ */
-/* TEIF7: Channel 7 transfer error flag */
-#define DMA_ISR_TEIF7 (1 << 27)
-/* HTIF7: Channel 7 half transfer flag */
-#define DMA_ISR_HTIF7 (1 << 26)
-/* TCIF7: Channel 7 transfer complete flag */
-#define DMA_ISR_TCIF7 (1 << 25)
-/* GIF7: Channel 7 global interrupt flag */
-#define DMA_ISR_GIF7 (1 << 24)
-/* TEIF6: Channel 6 transfer error flag */
-#define DMA_ISR_TEIF6 (1 << 23)
-/* HTIF6: Channel 6 half transfer flag */
-#define DMA_ISR_HTIF6 (1 << 22)
-/* TCIF6: Channel 6 transfer complete flag */
-#define DMA_ISR_TCIF6 (1 << 21)
-/* GIF6: Channel 6 global interrupt flag */
-#define DMA_ISR_GIF6 (1 << 20)
-/* TEIF5: Channel 5 transfer error flag */
-#define DMA_ISR_TEIF5 (1 << 19)
-/* HTIF5: Channel 5 half transfer flag */
-#define DMA_ISR_HTIF5 (1 << 18)
-/* TCIF5: Channel 5 transfer complete flag */
-#define DMA_ISR_TCIF5 (1 << 17)
-/* GIF5: Channel 5 global interrupt flag */
-#define DMA_ISR_GIF5 (1 << 16)
-/* TEIF4: Channel 4 transfer error flag */
-#define DMA_ISR_TEIF4 (1 << 15)
-/* HTIF4: Channel 4 half transfer flag */
-#define DMA_ISR_HTIF4 (1 << 14)
-/* TCIF4: Channel 4 transfer complete flag */
-#define DMA_ISR_TCIF4 (1 << 13)
-/* GIF4: Channel 4 global interrupt flag */
-#define DMA_ISR_GIF4 (1 << 12)
-/* TEIF3: Channel 3 transfer error flag */
-#define DMA_ISR_TEIF3 (1 << 11)
-/* HTIF3: Channel 3 half transfer flag */
-#define DMA_ISR_HTIF3 (1 << 10)
-/* TCIF3: Channel 3 transfer complete flag */
-#define DMA_ISR_TCIF3 (1 << 9)
-/* GIF3: Channel 3 global interrupt flag */
-#define DMA_ISR_GIF3 (1 << 8)
-/* TEIF2: Channel 2 transfer error flag */
-#define DMA_ISR_TEIF2 (1 << 7)
-/* HTIF2: Channel 23 half transfer flag */
-#define DMA_ISR_HTIF2 (1 << 6)
-/* TCIF2: Channel 2 transfer complete flag */
-#define DMA_ISR_TCIF2 (1 << 5)
-/* GIF2: Channel 2 global interrupt flag */
-#define DMA_ISR_GIF2 (1 << 4)
-/* TEIF1: Channel 1 transfer error flag */
-#define DMA_ISR_TEIF1 (1 << 3)
-/* HTIF1: Channel 1 half transfer flag */
-#define DMA_ISR_HTIF1 (1 << 2)
-/* TCIF1: Channel 1 transfer complete flag */
-#define DMA_ISR_TCIF1 (1 << 1)
-/* GIF1: Channel 1 global interrupt flag */
-#define DMA_ISR_GIF1 (1 << 0)
+/* TEIF: Transfer error interrupt flag */
+#define DMA_ISR_TEIF_BIT (1 << 3)
+#define DMA_ISR_TEIF(channel) (DMA_ISR_TEIF_BIT << (4 * (channel) -1))
+
+#define DMA_ISR_TEIF1 DMA_ISR_TEIF(DMA_CHANNEL1)
+#define DMA_ISR_TEIF2 DMA_ISR_TEIF(DMA_CHANNEL2)
+#define DMA_ISR_TEIF3 DMA_ISR_TEIF(DMA_CHANNEL3)
+#define DMA_ISR_TEIF4 DMA_ISR_TEIF(DMA_CHANNEL4)
+#define DMA_ISR_TEIF5 DMA_ISR_TEIF(DMA_CHANNEL5)
+#define DMA_ISR_TEIF6 DMA_ISR_TEIF(DMA_CHANNEL6)
+#define DMA_ISR_TEIF7 DMA_ISR_TEIF(DMA_CHANNEL7)
+
+/* HTIF: Half transfer interrupt flag */
+#define DMA_ISR_HTIF_BIT (1 << 2)
+#define DMA_ISR_HTIF(channel) (DMA_ISR_HTIF_BIT << (4 * (channel) -1))
+
+#define DMA_ISR_HTIF1 DMA_ISR_HTIF(DMA_CHANNEL1)
+#define DMA_ISR_HTIF2 DMA_ISR_HTIF(DMA_CHANNEL2)
+#define DMA_ISR_HTIF3 DMA_ISR_HTIF(DMA_CHANNEL3)
+#define DMA_ISR_HTIF4 DMA_ISR_HTIF(DMA_CHANNEL4)
+#define DMA_ISR_HTIF5 DMA_ISR_HTIF(DMA_CHANNEL5)
+#define DMA_ISR_HTIF6 DMA_ISR_HTIF(DMA_CHANNEL6)
+#define DMA_ISR_HTIF7 DMA_ISR_HTIF(DMA_CHANNEL7)
+
+/* TCIF: Transfer complete interrupt flag */
+#define DMA_ISR_TCIF_BIT (1 << 1)
+#define DMA_ISR_TCIF(channel) (DMA_ISR_TCIF_BIT << (4 * (channel) -1))
+
+#define DMA_ISR_TCIF1 DMA_ISR_TCIF(DMA_CHANNEL1)
+#define DMA_ISR_TCIF2 DMA_ISR_TCIF(DMA_CHANNEL2)
+#define DMA_ISR_TCIF3 DMA_ISR_TCIF(DMA_CHANNEL3)
+#define DMA_ISR_TCIF4 DMA_ISR_TCIF(DMA_CHANNEL4)
+#define DMA_ISR_TCIF5 DMA_ISR_TCIF(DMA_CHANNEL5)
+#define DMA_ISR_TCIF6 DMA_ISR_TCIF(DMA_CHANNEL6)
+#define DMA_ISR_TCIF7 DMA_ISR_TCIF(DMA_CHANNEL7)
+
+/* GIF: Global interrupt flag */
+#define DMA_ISR_GIF_BIT (1 << 0)
+#define DMA_ISR_GIF(channel) (DMA_ISR_GIF_BIT << (4 * (channel) -1))
+
+#define DMA_ISR_GIF1 DMA_ISR_GIF(DMA_CHANNEL1)
+#define DMA_ISR_GIF2 DMA_ISR_GIF(DMA_CHANNEL2)
+#define DMA_ISR_GIF3 DMA_ISR_GIF(DMA_CHANNEL3)
+#define DMA_ISR_GIF4 DMA_ISR_GIF(DMA_CHANNEL4)
+#define DMA_ISR_GIF5 DMA_ISR_GIF(DMA_CHANNEL5)
+#define DMA_ISR_GIF6 DMA_ISR_GIF(DMA_CHANNEL6)
+#define DMA_ISR_GIF7 DMA_ISR_GIF(DMA_CHANNEL7)
/* --- DMA_IFCR values ----------------------------------------------------- */
-/* CTEIF7: Channel 7 transfer error clear */
-#define DMA_IFCR_CTEIF7 (1 << 27)
-/* CHTIF7: Channel 7 half transfer clear */
-#define DMA_IFCR_CHTIF7 (1 << 26)
-/* CTCIF7: Channel 7 transfer complete clear */
-#define DMA_IFCR_CTCIF7 (1 << 25)
-/* CGIF7: Channel 7 global interrupt clear */
-#define DMA_IFCR_CGIF7 (1 << 24)
-/* CTEIF6: Channel 6 transfer error clear */
-#define DMA_IFCR_CTEIF6 (1 << 23)
-/* CHTIF6: Channel 6 half transfer clear */
-#define DMA_IFCR_CHTIF6 (1 << 22)
-/* CTCIF6: Channel 6 transfer complete clear */
-#define DMA_IFCR_CTCIF6 (1 << 21)
-/* CGIF6: Channel 6 global interrupt clear */
-#define DMA_IFCR_CGIF6 (1 << 20)
-/* CTEIF5: Channel 5 transfer error clear */
-#define DMA_IFCR_CTEIF5 (1 << 19)
-/* CHTIF5: Channel 5 half transfer clear */
-#define DMA_IFCR_CHTIF5 (1 << 18)
-/* CTCIF5: Channel 5 transfer complete clear */
-#define DMA_IFCR_CTCIF5 (1 << 17)
-/* CGIF5: Channel 5 global interrupt clear */
-#define DMA_IFCR_CGIF5 (1 << 16)
-/* CTEIF4: Channel 4 transfer error clear */
-#define DMA_IFCR_CTEIF4 (1 << 15)
-/* CHTIF4: Channel 4 half transfer clear */
-#define DMA_IFCR_CHTIF4 (1 << 14)
-/* CTCIF4: Channel 4 transfer complete clear */
-#define DMA_IFCR_CTCIF4 (1 << 13)
-/* CGIF4: Channel 4 global interrupt clear */
-#define DMA_IFCR_CGIF4 (1 << 12)
-/* CTEIF3: Channel 3 transfer error clear */
-#define DMA_IFCR_CTEIF3 (1 << 11)
-/* CHTIF3: Channel 3 half transfer clear */
-#define DMA_IFCR_CHTIF3 (1 << 10)
-/* CTCIF3: Channel 3 transfer complete clear */
-#define DMA_IFCR_CTCIF3 (1 << 9)
-/* CGIF3: Channel 3 global interrupt clear */
-#define DMA_IFCR_CGIF3 (1 << 8)
-/* CTEIF2: Channel 2 transfer error clear */
-#define DMA_IFCR_CTEIF2 (1 << 7)
-/* CHTIF2: Channel 2 half transfer clear */
-#define DMA_IFCR_CHTIF2 (1 << 6)
-/* CTCIF2: Channel 2 transfer complete clear */
-#define DMA_IFCR_CTCIF2 (1 << 5)
-/* CGIF2: Channel 2 global interrupt clear */
-#define DMA_IFCR_CGIF2 (1 << 4)
-/* CTEIF1: Channel 1 transfer error clear */
-#define DMA_IFCR_CTEIF1 (1 << 3)
-/* CHTIF1: Channel 1 half transfer clear */
-#define DMA_IFCR_CHTIF1 (1 << 2)
-/* CTCIF1: Channel 1 transfer complete clear */
-#define DMA_IFCR_CTCIF1 (1 << 1)
-/* CGIF1: Channel 1 global interrupt clear */
-#define DMA_IFCR_CGIF1 (1 << 0)
-
-/* --- DMA_CCR1 values ----------------------------------------------------- */
-
-/* MEM2MEM: Memory to memory mode */
-#define DMA_CCR1_MEM2MEM (1 << 14)
-
-/* PL[13:12]: Channel priority level */
-#define DMA_CCR1_PL_LSB 12
-#define DMA_CCR1_PL_LOW 0x0
-#define DMA_CCR1_PL_MEDIUM 0x1
-#define DMA_CCR1_PL_HIGH 0x2
-#define DMA_CCR1_PL_VERY_HIGH 0x3
-
-/* MSIZE[11:10]: Memory size */
-#define DMA_CCR1_MSIZE_LSB 10
-#define DMA_CCR1_MSIZE_8BIT 0x0
-#define DMA_CCR1_MSIZE_16BIT 0x1
-#define DMA_CCR1_MSIZE_32BIT 0x2
-
-/* PSIZE[9:8]: Peripheral size */
-#define DMA_CCR1_PSIZE_LSB 8
-#define DMA_CCR1_PSIZE_8BIT 0x0
-#define DMA_CCR1_PSIZE_16BIT 0x1
-#define DMA_CCR1_PSIZE_32BIT 0x2
-
-/* MINC: Memory increment mode */
-#define DMA_CCR1_MINC (1 << 7)
-
-/* PINC: Peripheral increment mode */
-#define DMA_CCR1_PINC (1 << 6)
-
-/* CIRC: Circular mode */
-#define DMA_CCR1_CIRC (1 << 5)
-
-/* DIR: Data transfer direction */
-#define DMA_CCR1_DIR (1 << 4)
-
-/* TEIE: Transfer error interrupt enable */
-#define DMA_CCR1_TEIE (1 << 3)
-
-/* HTIE: Half transfer interrupt enable */
-#define DMA_CCR1_HTIE (1 << 2)
-
-/* TCIE: Transfer complete interrupt enable */
-#define DMA_CCR1_TCIE (1 << 1)
-
-/* EN: Channel enable */
-#define DMA_CCR1_EN (1 << 0)
-
-/* --- DMA_CCR2 values ----------------------------------------------------- */
-
-/* MEM2MEM: Memory to memory mode */
-#define DMA_CCR2_MEM2MEM (1 << 14)
-
-/* PL[13:12]: Channel priority level */
-#define DMA_CCR2_PL_LSB 12
-#define DMA_CCR2_PL_LOW 0x0
-#define DMA_CCR2_PL_MEDIUM 0x1
-#define DMA_CCR2_PL_HIGH 0x2
-#define DMA_CCR2_PL_VERY_HIGH 0x3
-
-/* MSIZE[11:10]: Memory size */
-#define DMA_CCR2_MSIZE_LSB 10
-#define DMA_CCR2_MSIZE_8BIT 0x0
-#define DMA_CCR2_MSIZE_16BIT 0x1
-#define DMA_CCR2_MSIZE_32BIT 0x2
-
-/* PSIZE[9:8]: Peripheral size */
-#define DMA_CCR2_PSIZE_LSB 8
-#define DMA_CCR2_PSIZE_8BIT 0x0
-#define DMA_CCR2_PSIZE_16BIT 0x1
-#define DMA_CCR2_PSIZE_32BIT 0x2
-
-/* MINC: Memory increment mode */
-#define DMA_CCR2_MINC (1 << 7)
-
-/* PINC: Peripheral increment mode */
-#define DMA_CCR2_PINC (1 << 6)
-
-/* CIRC: Circular mode */
-#define DMA_CCR2_CIRC (1 << 5)
-
-/* DIR: Data transfer direction */
-#define DMA_CCR2_DIR (1 << 4)
-
-/* TEIE: Transfer error interrupt enable */
-#define DMA_CCR2_TEIE (1 << 3)
-
-/* HTIE: Half transfer interrupt enable */
-#define DMA_CCR2_HTIE (1 << 2)
-
-/* TCIE: Transfer complete interrupt enable */
-#define DMA_CCR2_TCIE (1 << 1)
-
-/* EN: Channel enable */
-#define DMA_CCR2_EN (1 << 0)
-
-/* --- DMA_CCR3 values ----------------------------------------------------- */
-
-/* MEM2MEM: Memory to memory mode */
-#define DMA_CCR3_MEM2MEM (1 << 14)
-
-/* PL[13:12]: Channel priority level */
-#define DMA_CCR3_PL_LSB 12
-#define DMA_CCR3_PL_LOW 0x0
-#define DMA_CCR3_PL_MEDIUM 0x1
-#define DMA_CCR3_PL_HIGH 0x2
-#define DMA_CCR3_PL_VERY_HIGH 0x3
-
-/* MSIZE[11:10]: Memory size */
-#define DMA_CCR3_MSIZE_LSB 10
-#define DMA_CCR3_MSIZE_8BIT 0x0
-#define DMA_CCR31_MSIZE_16BIT 0x1
-#define DMA_CCR3_MSIZE_32BIT 0x2
-
-/* PSIZE[9:8]: Peripheral size */
-#define DMA_CCR3_PSIZE_LSB 8
-#define DMA_CCR3_PSIZE_8BIT 0x0
-#define DMA_CCR3_PSIZE_16BIT 0x1
-#define DMA_CCR3_PSIZE_32BIT 0x2
-
-/* MINC: Memory increment mode */
-#define DMA_CCR3_MINC (1 << 7)
-
-/* PINC: Peripheral increment mode */
-#define DMA_CCR3_PINC (1 << 6)
-
-/* CIRC: Circular mode */
-#define DMA_CCR3_CIRC (1 << 5)
-
-/* DIR: Data transfer direction */
-#define DMA_CCR3_DIR (1 << 4)
-
-/* TEIE: Transfer error interrupt enable */
-#define DMA_CCR3_TEIE (1 << 3)
-
-/* HTIE: Half transfer interrupt enable */
-#define DMA_CCR3_HTIE (1 << 2)
-
-/* TCIE: Transfer complete interrupt enable */
-#define DMA_CCR3_TCIE (1 << 1)
-
-/* EN: Channel enable */
-#define DMA_CCR3_EN (1 << 0)
-
-/* --- DMA_CCR4 values ----------------------------------------------------- */
-
-/* MEM2MEM: Memory to memory mode */
-#define DMA_CCR4_MEM2MEM (1 << 14)
-
-/* PL[13:12]: Channel priority level */
-#define DMA_CCR4_PL_LSB 12
-#define DMA_CCR4_PL_LOW 0x0
-#define DMA_CCR4_PL_MEDIUM 0x1
-#define DMA_CCR4_PL_HIGH 0x2
-#define DMA_CCR4_PL_VERY_HIGH 0x3
-
-/* MSIZE[11:10]: Memory size */
-#define DMA_CCR4_MSIZE_LSB 10
-#define DMA_CCR4_MSIZE_8BIT 0x0
-#define DMA_CCR4_MSIZE_16BIT 0x1
-#define DMA_CCR4_MSIZE_32BIT 0x2
-
-/* PSIZE[9:8]: Peripheral size */
-#define DMA_CCR4_PSIZE_LSB 8
-#define DMA_CCR4_PSIZE_8BIT 0x0
-#define DMA_CCR4_PSIZE_16BIT 0x1
-#define DMA_CCR4_PSIZE_32BIT 0x2
-
-/* MINC: Memory increment mode */
-#define DMA_CCR4_MINC (1 << 7)
-
-/* PINC: Peripheral increment mode */
-#define DMA_CCR4_PINC (1 << 6)
-
-/* CIRC: Circular mode */
-#define DMA_CCR4_CIRC (1 << 5)
-
-/* DIR: Data transfer direction */
-#define DMA_CCR4_DIR (1 << 4)
-
-/* TEIE: Transfer error interrupt enable */
-#define DMA_CCR4_TEIE (1 << 3)
-
-/* HTIE: Half transfer interrupt enable */
-#define DMA_CCR4_HTIE (1 << 2)
-
-/* TCIE: Transfer complete interrupt enable */
-#define DMA_CCR4_TCIE (1 << 1)
-
-/* EN: Channel enable */
-#define DMA_CCR4_EN (1 << 0)
-
-/* --- DMA_CCR5 values ----------------------------------------------------- */
-
-/* MEM2MEM: Memory to memory mode */
-#define DMA_CCR5_MEM2MEM (1 << 14)
-
-/* PL[13:12]: Channel priority level */
-#define DMA_CCR5_PL_LSB 12
-#define DMA_CCR5_PL_LOW 0x0
-#define DMA_CCR5_PL_MEDIUM 0x1
-#define DMA_CCR5_PL_HIGH 0x2
-#define DMA_CCR5_PL_VERY_HIGH 0x3
-
-/* MSIZE[11:10]: Memory size */
-#define DMA_CCR5_MSIZE_LSB 10
-#define DMA_CCR5_MSIZE_8BIT 0x0
-#define DMA_CCR5_MSIZE_16BIT 0x1
-#define DMA_CCR5_MSIZE_32BIT 0x2
-
-/* PSIZE[9:8]: Peripheral size */
-#define DMA_CCR5_PSIZE_LSB 8
-#define DMA_CCR5_PSIZE_8BIT 0x0
-#define DMA_CCR5_PSIZE_16BIT 0x1
-#define DMA_CCR5_PSIZE_32BIT 0x2
-
-/* MINC: Memory increment mode */
-#define DMA_CCR5_MINC (1 << 7)
-
-/* PINC: Peripheral increment mode */
-#define DMA_CCR5_PINC (1 << 6)
-
-/* CIRC: Circular mode */
-#define DMA_CCR5_CIRC (1 << 5)
-
-/* DIR: Data transfer direction */
-#define DMA_CCR5_DIR (1 << 4)
-
-/* TEIE: Transfer error interrupt enable */
-#define DMA_CCR5_TEIE (1 << 3)
-
-/* HTIE: Half transfer interrupt enable */
-#define DMA_CCR5_HTIE (1 << 2)
-
-/* TCIE: Transfer complete interrupt enable */
-#define DMA_CCR5_TCIE (1 << 1)
-
-/* EN: Channel enable */
-#define DMA_CCR5_EN (1 << 0)
-
-/* --- DMA_CCR6 values ----------------------------------------------------- */
-
-/* MEM2MEM: Memory to memory mode */
-#define DMA_CCR6_MEM2MEM (1 << 14)
-
-/* PL[13:12]: Channel priority level */
-#define DMA_CCR6_PL_LSB 12
-#define DMA_CCR6_PL_LOW 0x0
-#define DMA_CCR6_PL_MEDIUM 0x1
-#define DMA_CCR6_PL_HIGH 0x2
-#define DMA_CCR6_PL_VERY_HIGH 0x3
-
-/* MSIZE[11:10]: Memory size */
-#define DMA_CCR6_MSIZE_LSB 10
-#define DMA_CCR6_MSIZE_8BIT 0x0
-#define DMA_CCR6_MSIZE_16BIT 0x1
-#define DMA_CCR6_MSIZE_32BIT 0x2
-
-/* PSIZE[9:8]: Peripheral size */
-#define DMA_CCR6_PSIZE_LSB 8
-#define DMA_CCR6_PSIZE_8BIT 0x0
-#define DMA_CCR6_PSIZE_16BIT 0x1
-#define DMA_CCR6_PSIZE_32BIT 0x2
-
-/* MINC: Memory increment mode */
-#define DMA_CCR6_MINC (1 << 7)
-
-/* PINC: Peripheral increment mode */
-#define DMA_CCR6_PINC (1 << 6)
-
-/* CIRC: Circular mode */
-#define DMA_CCR6_CIRC (1 << 5)
-
-/* DIR: Data transfer direction */
-#define DMA_CCR6_DIR (1 << 4)
-
-/* TEIE: Transfer error interrupt enable */
-#define DMA_CCR6_TEIE (1 << 3)
-
-/* HTIE: Half transfer interrupt enable */
-#define DMA_CCR6_HTIE (1 << 2)
-
-/* TCIE: Transfer complete interrupt enable */
-#define DMA_CCR6_TCIE (1 << 1)
-
-/* EN: Channel enable */
-#define DMA_CCR6_EN (1 << 0)
-
-/* --- DMA_CCR7 values ----------------------------------------------------- */
-
-/* MEM2MEM: Memory to memory mode */
-#define DMA_CCR7_MEM2MEM (1 << 14)
-
-/* PL[13:12]: Channel priority level */
-#define DMA_CCR7_PL_LSB 12
-#define DMA_CCR7_PL_LOW 0x0
-#define DMA_CCR7_PL_MEDIUM 0x1
-#define DMA_CCR7_PL_HIGH 0x2
-#define DMA_CCR7_PL_VERY_HIGH 0x3
-
-/* MSIZE[11:10]: Memory size */
-#define DMA_CCR7_MSIZE_LSB 10
-#define DMA_CCR7_MSIZE_8BIT 0x0
-#define DMA_CCR7_MSIZE_16BIT 0x1
-#define DMA_CCR7_MSIZE_32BIT 0x2
-
-/* PSIZE[9:8]: Peripheral size */
-#define DMA_CCR7_PSIZE_LSB 8
-#define DMA_CCR7_PSIZE_8BIT 0x0
-#define DMA_CCR7_PSIZE_16BIT 0x1
-#define DMA_CCR7_PSIZE_32BIT 0x2
-
-/* MINC: Memory increment mode */
-#define DMA_CCR7_MINC (1 << 7)
-
-/* PINC: Peripheral increment mode */
-#define DMA_CCR7_PINC (1 << 6)
-
-/* CIRC: Circular mode */
-#define DMA_CCR7_CIRC (1 << 5)
-
-/* DIR: Data transfer direction */
-#define DMA_CCR7_DIR (1 << 4)
-
-/* TEIE: Transfer error interrupt enable */
-#define DMA_CCR7_TEIE (1 << 3)
-
-/* HTIE: Half transfer interrupt enable */
-#define DMA_CCR7_HTIE (1 << 2)
-
-/* TCIE: Transfer complete interrupt enable */
-#define DMA_CCR7_TCIE (1 << 1)
-
-/* EN: Channel enable */
-#define DMA_CCR7_EN (1 << 0)
+/* CTEIF: Transfer error clear */
+#define DMA_IFCR_CTEIF_BIT (1 << 3)
+#define DMA_IFCR_CTEIF(channel) (DMA_IFCR_CTEIF_BIT << (4 * (channel) -1))
+
+#define DMA_IFCR_CTEIF1 DMA_IFCR_CTEIF(DMA_CHANNEL1)
+#define DMA_IFCR_CTEIF2 DMA_IFCR_CTEIF(DMA_CHANNEL2)
+#define DMA_IFCR_CTEIF3 DMA_IFCR_CTEIF(DMA_CHANNEL3)
+#define DMA_IFCR_CTEIF4 DMA_IFCR_CTEIF(DMA_CHANNEL4)
+#define DMA_IFCR_CTEIF5 DMA_IFCR_CTEIF(DMA_CHANNEL5)
+#define DMA_IFCR_CTEIF6 DMA_IFCR_CTEIF(DMA_CHANNEL6)
+#define DMA_IFCR_CTEIF7 DMA_IFCR_CTEIF(DMA_CHANNEL7)
+
+/* CHTIF: Half transfer clear */
+#define DMA_IFCR_CHTIF_BIT (1 << 2)
+#define DMA_IFCR_CHTIF(channel) (DMA_IFCR_CHTIF_BIT << (4 * (channel) -1))
+
+#define DMA_IFCR_CHTIF1 DMA_IFCR_CHTIF(DMA_CHANNEL1)
+#define DMA_IFCR_CHTIF2 DMA_IFCR_CHTIF(DMA_CHANNEL2)
+#define DMA_IFCR_CHTIF3 DMA_IFCR_CHTIF(DMA_CHANNEL3)
+#define DMA_IFCR_CHTIF4 DMA_IFCR_CHTIF(DMA_CHANNEL4)
+#define DMA_IFCR_CHTIF5 DMA_IFCR_CHTIF(DMA_CHANNEL5)
+#define DMA_IFCR_CHTIF6 DMA_IFCR_CHTIF(DMA_CHANNEL6)
+#define DMA_IFCR_CHTIF7 DMA_IFCR_CHTIF(DMA_CHANNEL7)
+
+/* CTCIF: Transfer complete clear */
+#define DMA_IFCR_CTCIF_BIT (1 << 1)
+#define DMA_IFCR_CTCIF(channel) (DMA_IFCR_CTCIF_BIT << (4 * (channel) -1))
+
+#define DMA_IFCR_CTCIF1 DMA_IFCR_CTCIF(DMA_CHANNEL1)
+#define DMA_IFCR_CTCIF2 DMA_IFCR_CTCIF(DMA_CHANNEL2)
+#define DMA_IFCR_CTCIF3 DMA_IFCR_CTCIF(DMA_CHANNEL3)
+#define DMA_IFCR_CTCIF4 DMA_IFCR_CTCIF(DMA_CHANNEL4)
+#define DMA_IFCR_CTCIF5 DMA_IFCR_CTCIF(DMA_CHANNEL5)
+#define DMA_IFCR_CTCIF6 DMA_IFCR_CTCIF(DMA_CHANNEL6)
+#define DMA_IFCR_CTCIF7 DMA_IFCR_CTCIF(DMA_CHANNEL7)
+
+/* CGIF: Global interrupt clear */
+#define DMA_IFCR_CGIF_BIT (1 << 0)
+#define DMA_IFCR_CGIF(channel) (DMA_IFCR_CGIF_BIT << (4 * (channel) -1))
+
+#define DMA_IFCR_CGIF1 DMA_IFCR_CGIF(DMA_CHANNEL1)
+#define DMA_IFCR_CGIF2 DMA_IFCR_CGIF(DMA_CHANNEL2)
+#define DMA_IFCR_CGIF3 DMA_IFCR_CGIF(DMA_CHANNEL3)
+#define DMA_IFCR_CGIF4 DMA_IFCR_CGIF(DMA_CHANNEL4)
+#define DMA_IFCR_CGIF5 DMA_IFCR_CGIF(DMA_CHANNEL5)
+#define DMA_IFCR_CGIF6 DMA_IFCR_CGIF(DMA_CHANNEL6)
+#define DMA_IFCR_CGIF7 DMA_IFCR_CGIF(DMA_CHANNEL7)
+
+/* Clear interrupts mask */
+#define DMA_IFCR_CIF_BIT 0xF
+#define DMA_IFCR_CIF(channel) (DMA_IFCR_CIF_BIT << (4 * ((channel) - 1)))
+
+#define DMA_IFCR_CIF1 DMA_IFCR_CIF(DMA_CHANNEL1)
+#define DMA_IFCR_CIF2 DMA_IFCR_CIF(DMA_CHANNEL2)
+#define DMA_IFCR_CIF3 DMA_IFCR_CIF(DMA_CHANNEL3)
+#define DMA_IFCR_CIF4 DMA_IFCR_CIF(DMA_CHANNEL4)
+#define DMA_IFCR_CIF5 DMA_IFCR_CIF(DMA_CHANNEL5)
+#define DMA_IFCR_CIF6 DMA_IFCR_CIF(DMA_CHANNEL6)
+#define DMA_IFCR_CIF7 DMA_IFCR_CIF(DMA_CHANNEL7)
/* --- DMA_CCRx generic values --------------------------------------------- */
/* MEM2MEM: Memory to memory mode */
-#define DMA_CCR_MEM2MEM (1 << 14)
+#define DMA_CCR_MEM2MEM (1 << 14)
/* PL[13:12]: Channel priority level */
-#define DMA_CCR_PL_LSB 12
-#define DMA_CCR_PL_LOW 0x0
-#define DMA_CCR_PL_MEDIUM 0x1
-#define DMA_CCR_PL_HIGH 0x2
-#define DMA_CCR_PL_VERY_HIGH 0x3
+#define DMA_CCR_PL_LOW (0x0 << 12)
+#define DMA_CCR_PL_MEDIUM (0x1 << 12)
+#define DMA_CCR_PL_HIGH (0x2 << 12)
+#define DMA_CCR_PL_VERY_HIGH (0x3 << 12)
+#define DMA_CCR_PL_MASK (0x3 << 12)
+#define DMA_CCR_PL_SHIFT 12
/* MSIZE[11:10]: Memory size */
-#define DMA_CCR_MSIZE_LSB 10
-#define DMA_CCR_MSIZE_8BIT 0x0
-#define DMA_CCR_MSIZE_16BIT 0x1
-#define DMA_CCR_MSIZE_32BIT 0x2
+#define DMA_CCR_MSIZE_8BIT (0x0 << 10)
+#define DMA_CCR_MSIZE_16BIT (0x1 << 10)
+#define DMA_CCR_MSIZE_32BIT (0x2 << 10)
+#define DMA_CCR_MSIZE_MASK (0x2 << 10)
+#define DMA_CCR_MSIZE_SHIFT 10
/* PSIZE[9:8]: Peripheral size */
-#define DMA_CCR_PSIZE_LSB 8
-#define DMA_CCR_PSIZE_8BIT 0x0
-#define DMA_CCR_PSIZE_16BIT 0x1
-#define DMA_CCR_PSIZE_32BIT 0x2
+#define DMA_CCR_PSIZE_8BIT (0x0 << 10)
+#define DMA_CCR_PSIZE_16BIT (0x1 << 10)
+#define DMA_CCR_PSIZE_32BIT (0x2 << 10)
+#define DMA_CCR_PSIZE_MASK (0x2 << 10)
+#define DMA_CCR_PSIZE_SHIFT 8
/* MINC: Memory increment mode */
#define DMA_CCR_MINC (1 << 7)
@@ -699,10 +310,11 @@
/* --- function prototypes ------------------------------------------------- */
+void dma_channel_reset(u32 dma, u8 channel);
void dma_enable_mem2mem_mode(u32 dma, u8 channel);
-void dma_set_priority(u32 dma, u8 channel, u8 prio);
-void dma_set_memory_size(u32 dma, u8 channel, u8 mem_size);
-void dma_set_peripheral_size(u32 dma, u8 channel, u8 peripheral_size);
+void dma_set_priority(u32 dma, u8 channel, u32 prio);
+void dma_set_memory_size(u32 dma, u8 channel, u32 mem_size);
+void dma_set_peripheral_size(u32 dma, u8 channel, u32 peripheral_size);
void dma_enable_memory_increment_mode(u32 dma, u8 channel);
void dma_enable_peripheral_increment_mode(u32 dma, u8 channel);
void dma_enable_circular_mode(u32 dma, u8 channel);
diff --git a/include/libopencm3/stm32/f1/ethernet.h b/include/libopencm3/stm32/f1/ethernet.h
index 3d7f1ee..08edd84 100644
--- a/include/libopencm3/stm32/f1/ethernet.h
+++ b/include/libopencm3/stm32/f1/ethernet.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Gareth McMullin <gareth@blacksphere.co.nz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_ETHERNET_H
diff --git a/include/libopencm3/stm32/f1/flash.h b/include/libopencm3/stm32/f1/flash.h
index 8512394..2c026d6 100644
--- a/include/libopencm3/stm32/f1/flash.h
+++ b/include/libopencm3/stm32/f1/flash.h
@@ -4,23 +4,23 @@
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
* Copyright (C) 2010 Mark Butler <mbutler@physics.otago.ac.nz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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/>.
*/
/*
* For details see:
- * PM0075 Programming manual: STM32F10xxx Flash programming
+ * PM0075 programming manual: STM32F10xxx Flash programming
* August 2010, Doc ID 17863 Rev 1
* http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/PROGRAMMING_MANUAL/CD00283419.pdf
*/
diff --git a/include/libopencm3/stm32/f1/gpio.h b/include/libopencm3/stm32/f1/gpio.h
index 0266b3b..440b71c 100644
--- a/include/libopencm3/stm32/f1/gpio.h
+++ b/include/libopencm3/stm32/f1/gpio.h
@@ -4,18 +4,18 @@
* Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
* Copyright (C) 2012 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_GPIO_H
diff --git a/include/libopencm3/stm32/f1/memorymap.h b/include/libopencm3/stm32/f1/memorymap.h
index e3c57c8..d2c3651 100644
--- a/include/libopencm3/stm32/f1/memorymap.h
+++ b/include/libopencm3/stm32/f1/memorymap.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_MEMORYMAP_H
diff --git a/include/libopencm3/stm32/f1/nvic_f1.h b/include/libopencm3/stm32/f1/nvic_f1.h
index ae6831b..884f728 100644
--- a/include/libopencm3/stm32/f1/nvic_f1.h
+++ b/include/libopencm3/stm32/f1/nvic_f1.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_NVIC_F1_H
diff --git a/include/libopencm3/stm32/f1/rcc.h b/include/libopencm3/stm32/f1/rcc.h
index 0f91146..9cbe1e7 100644
--- a/include/libopencm3/stm32/f1/rcc.h
+++ b/include/libopencm3/stm32/f1/rcc.h
@@ -4,18 +4,18 @@
* Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
* Copyright (C) 2009 Federico Ruiz-Ugalde <memeruiz at gmail dot com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_RCC_H
diff --git a/include/libopencm3/stm32/f1/rtc.h b/include/libopencm3/stm32/f1/rtc.h
index b71525e..d9c2639 100644
--- a/include/libopencm3/stm32/f1/rtc.h
+++ b/include/libopencm3/stm32/f1/rtc.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_RTC_H
diff --git a/include/libopencm3/stm32/f1/scb.h b/include/libopencm3/stm32/f1/scb.h
index 36b05fd..12a74a2 100644
--- a/include/libopencm3/stm32/f1/scb.h
+++ b/include/libopencm3/stm32/f1/scb.h
@@ -4,18 +4,18 @@
* Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SCB_H
diff --git a/include/libopencm3/stm32/f1/usb.h b/include/libopencm3/stm32/f1/usb.h
index 0aed34c..20e9dff 100644
--- a/include/libopencm3/stm32/f1/usb.h
+++ b/include/libopencm3/stm32/f1/usb.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2009 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_USB_H
diff --git a/include/libopencm3/stm32/f1/usb_desc.h b/include/libopencm3/stm32/f1/usb_desc.h
index da99bb0..0a8cc8b 100644
--- a/include/libopencm3/stm32/f1/usb_desc.h
+++ b/include/libopencm3/stm32/f1/usb_desc.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2009 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_USB_DESC
diff --git a/include/libopencm3/stm32/f2/dma.h b/include/libopencm3/stm32/f2/dma.h
index aa04358..545df6f 100644
--- a/include/libopencm3/stm32/f2/dma.h
+++ b/include/libopencm3/stm32/f2/dma.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_DMA_H
diff --git a/include/libopencm3/stm32/f2/flash.h b/include/libopencm3/stm32/f2/flash.h
index 4f2759e..5b4483f 100644
--- a/include/libopencm3/stm32/f2/flash.h
+++ b/include/libopencm3/stm32/f2/flash.h
@@ -4,18 +4,18 @@
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
* Copyright (C) 2010 Mark Butler <mbutler@physics.otago.ac.nz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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/>.
*/
/*
diff --git a/include/libopencm3/stm32/f2/gpio.h b/include/libopencm3/stm32/f2/gpio.h
index 1c33e44..63d2880 100644
--- a/include/libopencm3/stm32/f2/gpio.h
+++ b/include/libopencm3/stm32/f2/gpio.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_GPIO_H
diff --git a/include/libopencm3/stm32/f2/memorymap.h b/include/libopencm3/stm32/f2/memorymap.h
index 9fe77fa..b316be2 100644
--- a/include/libopencm3/stm32/f2/memorymap.h
+++ b/include/libopencm3/stm32/f2/memorymap.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_MEMORYMAP_H
diff --git a/include/libopencm3/stm32/f2/nvic_f2.h b/include/libopencm3/stm32/f2/nvic_f2.h
index 39677e0..2bf2997 100644
--- a/include/libopencm3/stm32/f2/nvic_f2.h
+++ b/include/libopencm3/stm32/f2/nvic_f2.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_NVIC_F2_H
diff --git a/include/libopencm3/stm32/f2/pwr.h b/include/libopencm3/stm32/f2/pwr.h
index 2ff1d34..7db223d 100644
--- a/include/libopencm3/stm32/f2/pwr.h
+++ b/include/libopencm3/stm32/f2/pwr.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_PWR_F2_H
diff --git a/include/libopencm3/stm32/f2/rcc.h b/include/libopencm3/stm32/f2/rcc.h
index c34c9bb..dfce266 100644
--- a/include/libopencm3/stm32/f2/rcc.h
+++ b/include/libopencm3/stm32/f2/rcc.h
@@ -5,18 +5,18 @@
* Copyright (C) 2009 Federico Ruiz-Ugalde <memeruiz at gmail dot com>
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_RCC_H
diff --git a/include/libopencm3/stm32/f2/scb.h b/include/libopencm3/stm32/f2/scb.h
index 36b05fd..12a74a2 100644
--- a/include/libopencm3/stm32/f2/scb.h
+++ b/include/libopencm3/stm32/f2/scb.h
@@ -4,18 +4,18 @@
* Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SCB_H
diff --git a/include/libopencm3/stm32/f2/spi.h b/include/libopencm3/stm32/f2/spi.h
index 10f7989..df5021c 100644
--- a/include/libopencm3/stm32/f2/spi.h
+++ b/include/libopencm3/stm32/f2/spi.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SPI_F2_H
diff --git a/include/libopencm3/stm32/f2/syscfg.h b/include/libopencm3/stm32/f2/syscfg.h
index fbe647f..7426f16 100644
--- a/include/libopencm3/stm32/f2/syscfg.h
+++ b/include/libopencm3/stm32/f2/syscfg.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SYSCFG_H
diff --git a/include/libopencm3/stm32/f2/timer.h b/include/libopencm3/stm32/f2/timer.h
index 8c9cf80..3436bba 100644
--- a/include/libopencm3/stm32/f2/timer.h
+++ b/include/libopencm3/stm32/f2/timer.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_TIMER_F2_H
diff --git a/include/libopencm3/stm32/f2/usart.h b/include/libopencm3/stm32/f2/usart.h
index 7d244bb..1c007ab 100644
--- a/include/libopencm3/stm32/f2/usart.h
+++ b/include/libopencm3/stm32/f2/usart.h
@@ -4,18 +4,18 @@
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
* Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_USART_F2_H
diff --git a/include/libopencm3/stm32/f4/flash.h b/include/libopencm3/stm32/f4/flash.h
index a2a44e9..f85d56f 100644
--- a/include/libopencm3/stm32/f4/flash.h
+++ b/include/libopencm3/stm32/f4/flash.h
@@ -4,18 +4,18 @@
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
* Copyright (C) 2010 Mark Butler <mbutler@physics.otago.ac.nz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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/>.
*/
/*
diff --git a/include/libopencm3/stm32/f4/gpio.h b/include/libopencm3/stm32/f4/gpio.h
index 20901d0..4981c2a 100644
--- a/include/libopencm3/stm32/f4/gpio.h
+++ b/include/libopencm3/stm32/f4/gpio.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_GPIO_H
diff --git a/include/libopencm3/stm32/f4/memorymap.h b/include/libopencm3/stm32/f4/memorymap.h
index f45face..0a22ad4 100644
--- a/include/libopencm3/stm32/f4/memorymap.h
+++ b/include/libopencm3/stm32/f4/memorymap.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_MEMORYMAP_H
diff --git a/include/libopencm3/stm32/f4/nvic_f4.h b/include/libopencm3/stm32/f4/nvic_f4.h
index d3ae375..91b6c25 100644
--- a/include/libopencm3/stm32/f4/nvic_f4.h
+++ b/include/libopencm3/stm32/f4/nvic_f4.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_NVIC_F4_H
diff --git a/include/libopencm3/stm32/f4/pwr.h b/include/libopencm3/stm32/f4/pwr.h
index aa75a94..ede1ae7 100644
--- a/include/libopencm3/stm32/f4/pwr.h
+++ b/include/libopencm3/stm32/f4/pwr.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_PWR_F4_H
diff --git a/include/libopencm3/stm32/f4/rcc.h b/include/libopencm3/stm32/f4/rcc.h
index 50bafad..648ccb0 100644
--- a/include/libopencm3/stm32/f4/rcc.h
+++ b/include/libopencm3/stm32/f4/rcc.h
@@ -6,18 +6,18 @@
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
* Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_RCC_H
diff --git a/include/libopencm3/stm32/f4/scb.h b/include/libopencm3/stm32/f4/scb.h
index 36b05fd..12a74a2 100644
--- a/include/libopencm3/stm32/f4/scb.h
+++ b/include/libopencm3/stm32/f4/scb.h
@@ -4,18 +4,18 @@
* Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SCB_H
diff --git a/include/libopencm3/stm32/f4/spi.h b/include/libopencm3/stm32/f4/spi.h
index e87ed6c..c852a41 100644
--- a/include/libopencm3/stm32/f4/spi.h
+++ b/include/libopencm3/stm32/f4/spi.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SPI_F4_H
diff --git a/include/libopencm3/stm32/f4/syscfg.h b/include/libopencm3/stm32/f4/syscfg.h
index fbe647f..7426f16 100644
--- a/include/libopencm3/stm32/f4/syscfg.h
+++ b/include/libopencm3/stm32/f4/syscfg.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SYSCFG_H
diff --git a/include/libopencm3/stm32/f4/timer.h b/include/libopencm3/stm32/f4/timer.h
index cb063d2..6d19990 100644
--- a/include/libopencm3/stm32/f4/timer.h
+++ b/include/libopencm3/stm32/f4/timer.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_TIMER_F4_H
diff --git a/include/libopencm3/stm32/f4/usart.h b/include/libopencm3/stm32/f4/usart.h
index 7543fd3..ac113da 100644
--- a/include/libopencm3/stm32/f4/usart.h
+++ b/include/libopencm3/stm32/f4/usart.h
@@ -4,18 +4,18 @@
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
* Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_USART_F4_H
diff --git a/include/libopencm3/stm32/fsmc.h b/include/libopencm3/stm32/fsmc.h
index df0332f..e945123 100644
--- a/include/libopencm3/stm32/fsmc.h
+++ b/include/libopencm3/stm32/fsmc.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Uwe Hermann <uwe@hermann-uwe.de>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_FSMC_H
diff --git a/include/libopencm3/stm32/i2c.h b/include/libopencm3/stm32/i2c.h
index cd25243..1606b64 100644
--- a/include/libopencm3/stm32/i2c.h
+++ b/include/libopencm3/stm32/i2c.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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
diff --git a/include/libopencm3/stm32/iwdg.h b/include/libopencm3/stm32/iwdg.h
index 41d63ca..2d24482 100644
--- a/include/libopencm3/stm32/iwdg.h
+++ b/include/libopencm3/stm32/iwdg.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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
diff --git a/include/libopencm3/stm32/memorymap.h b/include/libopencm3/stm32/memorymap.h
index 3423867..6f213da 100644
--- a/include/libopencm3/stm32/memorymap.h
+++ b/include/libopencm3/stm32/memorymap.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2011 Fergus Noble <fergusnoble@gmail.com>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_MEMORYMAP_COMMON_H
diff --git a/include/libopencm3/stm32/nvic.h b/include/libopencm3/stm32/nvic.h
index 8dfc294..36a8fe5 100644
--- a/include/libopencm3/stm32/nvic.h
+++ b/include/libopencm3/stm32/nvic.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_NVIC_H
diff --git a/include/libopencm3/stm32/otg_fs.h b/include/libopencm3/stm32/otg_fs.h
index 6bdf140..5680e43 100644
--- a/include/libopencm3/stm32/otg_fs.h
+++ b/include/libopencm3/stm32/otg_fs.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Gareth McMullin <gareth@blacksphere.co.nz>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_OTG_FS_H
diff --git a/include/libopencm3/stm32/pwr.h b/include/libopencm3/stm32/pwr.h
index 704ff36..423ab1a 100644
--- a/include/libopencm3/stm32/pwr.h
+++ b/include/libopencm3/stm32/pwr.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_PWR_H
diff --git a/include/libopencm3/stm32/spi.h b/include/libopencm3/stm32/spi.h
index e44127c..e64dd0f 100644
--- a/include/libopencm3/stm32/spi.h
+++ b/include/libopencm3/stm32/spi.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SPI_H
@@ -297,6 +297,7 @@
/* --- Function prototypes ------------------------------------------------- */
+void spi_reset(u32 spi_peripheral);
int spi_init_master(u32 spi, u32 br, u32 cpol, u32 cpha, u32 dff, u32 lsbfirst);
void spi_enable(u32 spi);
void spi_disable(u32 spi);
diff --git a/include/libopencm3/stm32/systick.h b/include/libopencm3/stm32/systick.h
index 7c2c9a3..376bea0 100644
--- a/include/libopencm3/stm32/systick.h
+++ b/include/libopencm3/stm32/systick.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_SYSTICK_H
diff --git a/include/libopencm3/stm32/timer.h b/include/libopencm3/stm32/timer.h
index 40ffd51..c10d015 100644
--- a/include/libopencm3/stm32/timer.h
+++ b/include/libopencm3/stm32/timer.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2009 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_TIMER_H
diff --git a/include/libopencm3/stm32/tools.h b/include/libopencm3/stm32/tools.h
index bac60e7..74bbea8 100644
--- a/include/libopencm3/stm32/tools.h
+++ b/include/libopencm3/stm32/tools.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2009 Piotr Esden-Tempski <piotr@esden.net>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_TOOLS_H
diff --git a/include/libopencm3/stm32/usart.h b/include/libopencm3/stm32/usart.h
index cbf622c..d9f2c8d 100644
--- a/include/libopencm3/stm32/usart.h
+++ b/include/libopencm3/stm32/usart.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_USART_H
diff --git a/include/libopencm3/stm32/wwdg.h b/include/libopencm3/stm32/wwdg.h
index e9eb209..5443c56 100644
--- a/include/libopencm3/stm32/wwdg.h
+++ b/include/libopencm3/stm32/wwdg.h
@@ -3,18 +3,18 @@
*
* Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
+ * 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 program is distributed in the hope that it will be useful,
+ * 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 General Public License for more details.
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 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_WWDG_H