aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/common/usart_common_f24.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libopencm3/stm32/common/usart_common_f24.h')
-rw-r--r--include/libopencm3/stm32/common/usart_common_f24.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/libopencm3/stm32/common/usart_common_f24.h b/include/libopencm3/stm32/common/usart_common_f24.h
index 301eceb..22bb194 100644
--- a/include/libopencm3/stm32/common/usart_common_f24.h
+++ b/include/libopencm3/stm32/common/usart_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 SPI.H */
+/* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA USART.H
+The order of header inclusion is important. usart.h includes the device
+specific memorymap.h header before including this header file.*/
+#ifdef LIBOPENCM3_USART_H
#ifndef LIBOPENCM3_USART_COMMON_F24_H
#define LIBOPENCM3_USART_COMMON_F24_H
@@ -69,3 +72,7 @@
#define USART_CR3_ONEBIT (1 << 11)
#endif
+#else
+#warning "usart_common_f24.h should not be included explicitly, only via usart.h"
+#endif
+