First step in hiding target_type_s from public interface:
[fw/openocd] / src / target / target.h
index 1eb1ba1b9ac11f5deabaf54b7811c3665a7de596..dc871bf20f6dfae6532d28d35b7b7f762014dcaf 100644 (file)
@@ -105,7 +105,8 @@ typedef struct working_area_s
        struct working_area_s *next;
 } working_area_t;
 
-typedef struct target_type_s
+#ifdef DEFINE_TARGET_TYPE_S
+struct target_type_s
 {
        /**
         * Name of the target.  Do @b not access this field directly, use
@@ -258,7 +259,11 @@ typedef struct target_type_s
        int (*virt2phys)(struct target_s *target, u32 address, u32 *physical);
        int (*mmu)(struct target_s *target, int *enabled);
 
-} target_type_t;
+};
+#else
+struct target_type_s;
+#endif // DEFINE_TARGET_TYPE_S
+typedef struct target_type_s target_type_t;
 
 /* forward decloration */
 typedef struct target_event_action_s target_event_action_t;