Commit | Line | Data |
---|---|---|
b85e4829 AC |
1 | /* The common simulator framework for GDB, the GNU Debugger. |
2 | ||
3 | Copyright 2002 Free Software Foundation, Inc. | |
4 | ||
5 | Contributed by Andrew Cagney and Red Hat. | |
6 | ||
7 | This file is part of GDB. | |
8 | ||
9 | This program is free software; you can redistribute it and/or modify | |
10 | it under the terms of the GNU General Public License as published by | |
11 | the Free Software Foundation; either version 2 of the License, or | |
12 | (at your option) any later version. | |
13 | ||
14 | This program is distributed in the hope that it will be useful, | |
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | GNU General Public License for more details. | |
18 | ||
19 | You should have received a copy of the GNU General Public License | |
20 | along with this program; if not, write to the Free Software | |
21 | Foundation, Inc., 59 Temple Place - Suite 330, | |
22 | Boston, MA 02111-1307, USA. */ | |
c906108c SS |
23 | |
24 | ||
25 | #ifndef HW_BASE | |
26 | #define HW_BASE | |
27 | ||
28 | /* Create a primative device */ | |
29 | ||
30 | struct hw *hw_create | |
31 | (struct sim_state *sd, | |
32 | struct hw *parent, | |
33 | const char *family, | |
34 | const char *name, | |
35 | const char *unit, | |
36 | const char *args); | |
37 | ||
38 | ||
39 | /* Complete the creation of that device (finish overrides methods | |
40 | using the set_hw_* operations below) */ | |
41 | ||
42 | void hw_finish | |
43 | (struct hw *me); | |
44 | ||
45 | int hw_finished_p | |
46 | (struct hw *me); | |
47 | ||
48 | ||
49 | /* Delete the entire device */ | |
50 | ||
51 | void hw_delete | |
52 | (struct hw *me); | |
53 | ||
54 | ||
55 | /* Override device methods */ | |
56 | ||
57 | typedef void (hw_delete_callback) | |
58 | (struct hw *me); | |
59 | ||
ce13044d | 60 | extern void set_hw_delete(struct hw* hw, hw_delete_callback method); |
c906108c SS |
61 | |
62 | ||
63 | /* ALLOC */ | |
64 | ||
65 | extern void create_hw_alloc_data | |
66 | (struct hw *hw); | |
67 | extern void delete_hw_alloc_data | |
68 | (struct hw *hw); | |
69 | ||
70 | ||
71 | /* PORTS */ | |
72 | ||
73 | extern void create_hw_port_data | |
74 | (struct hw *hw); | |
75 | extern void delete_hw_port_data | |
76 | (struct hw *hw); | |
77 | ||
78 | ||
79 | /* PROPERTIES */ | |
80 | ||
81 | extern void create_hw_property_data | |
82 | (struct hw *hw); | |
83 | extern void delete_hw_property_data | |
84 | (struct hw *hw); | |
85 | ||
86 | ||
87 | /* EVENTS */ | |
88 | ||
89 | extern void create_hw_event_data | |
90 | (struct hw *hw); | |
91 | extern void delete_hw_event_data | |
92 | (struct hw *hw); | |
93 | ||
94 | ||
95 | /* HANDLES */ | |
96 | ||
97 | extern void create_hw_handle_data | |
98 | (struct hw *hw); | |
99 | extern void delete_hw_handle_data | |
100 | (struct hw *hw); | |
101 | ||
102 | ||
103 | /* INSTANCES */ | |
104 | ||
105 | extern void create_hw_instance_data | |
106 | (struct hw *hw); | |
107 | extern void delete_hw_instance_data | |
108 | (struct hw *hw); | |
109 | ||
110 | ||
111 | #endif |