aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/stm32/common/gpio_common_f24.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libopencm3/stm32/common/gpio_common_f24.h')
-rw-r--r--include/libopencm3/stm32/common/gpio_common_f24.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/libopencm3/stm32/common/gpio_common_f24.h b/include/libopencm3/stm32/common/gpio_common_f24.h
index 2ce0167..6263d51 100644
--- a/include/libopencm3/stm32/common/gpio_common_f24.h
+++ b/include/libopencm3/stm32/common/gpio_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 GPIO.H */
+/* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA GPIO.H
+The order of header inclusion is important. gpio.h includes the device
+specific memorymap.h header before including this header file.*/
+#ifdef LIBOPENCM3_GPIO_H
#ifndef LIBOPENCM3_GPIO_COMMON_F24_H
#define LIBOPENCM3_GPIO_COMMON_F24_H
@@ -287,4 +290,7 @@ void gpio_set_af(u32 gpioport, u8 alt_func_num, u16 gpios);
END_DECLS
/**@}*/
#endif
+#else
+#warning "gpio_common_f24.h should not be included explicitly, only via gpio.h"
+#endif