ARMv7-M: make DAP commands verify target is an ARMv7-M
[openocd.git] / src / target / armv7m.h
index 9787e30..b6be1d2 100644 (file)
@@ -131,6 +131,11 @@ target_to_armv7m(struct target *target)
        return target->arch_info;
 }
 
+static inline bool is_armv7m(struct armv7m_common *armv7m)
+{
+       return armv7m->common_magic == ARMV7M_COMMON_MAGIC;
+}
+
 struct armv7m_algorithm
 {
        int common_magic;