Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKen Sarkies <ksarkies@HyperEmbed>2013-03-07 12:05:04 +0400
committerKen Sarkies <ksarkies@HyperEmbed>2013-03-07 12:05:04 +0400
commita9a85f080bb8fc729125d3ad162058f063496e60 (patch)
treecee25cef4074fe637d9d653ddf41bcf005fc26b2 /include/libopencm3/stm32/common/dma_common_f24.h
parente2022f588492d5c117743b6b13801940f4a4b03e (diff)
Add test in common headers for improper inclusion of such files in application.
(prevents inclusion and also issues warning) Changes to some source files to remove references to common headers. Changes to rng.h to make guard symbols the same in f2 and f4.
Diffstat (limited to 'include/libopencm3/stm32/common/dma_common_f24.h')
-rw-r--r--include/libopencm3/stm32/common/dma_common_f24.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/libopencm3/stm32/common/dma_common_f24.h b/include/libopencm3/stm32/common/dma_common_f24.h
index ecf9fcfc..c8aab3ea 100644
--- a/include/libopencm3/stm32/common/dma_common_f24.h
+++ b/include/libopencm3/stm32/common/dma_common_f24.h
@@ -24,8 +24,11 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-/* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA DMA.H */
+/* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA DMA.H
+The order of header inclusion is important. dma.h includes the device
+specific memorymap.h header before including this header file.*/
+#ifdef LIBOPENCM3_DMA_H
#ifndef LIBOPENCM3_DMA_COMMON_F24_H
#define LIBOPENCM3_DMA_COMMON_F24_H
@@ -605,4 +608,7 @@ void dma_set_number_of_data(u32 dma, u8 stream, u16 number);
END_DECLS
/**@}*/
#endif
+#else
+#warning "dma_common_f24.h should not be included explicitly, only via dma.h"
+#endif