aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/common/i2c_common_f24.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libopencm3/stm32/common/i2c_common_f24.h')
-rw-r--r--include/libopencm3/stm32/common/i2c_common_f24.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/libopencm3/stm32/common/i2c_common_f24.h b/include/libopencm3/stm32/common/i2c_common_f24.h
index c267bd8..8cb4ae7 100644
--- a/include/libopencm3/stm32/common/i2c_common_f24.h
+++ b/include/libopencm3/stm32/common/i2c_common_f24.h
@@ -23,8 +23,11 @@
* along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
-/* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA I2C.H */
+/* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA I2C.H
+The order of header inclusion is important. i2c.h includes the device
+specific memorymap.h header before including this header file.*/
+#ifdef LIBOPENCM3_I2C_H
#ifndef LIBOPENCM3_I2C_COMMON_F24_H
#define LIBOPENCM3_I2C_COMMON_F24_H
@@ -37,3 +40,6 @@
/**@}*/
#endif
+#else
+#warning "i2c_common_f24.h should not be included explicitly, only via i2c.h"
+#endif