Changeset 3843ecb in mainline for uspace/srv/drivers/rootia32/rootia32.c
- Timestamp:
- 2010-04-09T13:54:06Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 892e4e1
- Parents:
- 3a5909f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/drivers/rootia32/rootia32.c
r3a5909f r3843ecb 51 51 #include <ipc/dev_iface.h> 52 52 #include <resource.h> 53 #include <device/hw_res.h> 53 54 54 55 #define NAME "rootia32" … … 111 112 }; 112 113 114 // initialized in root_ia32_init() function 115 static device_class_t rootia32_child_class; 116 113 117 static bool rootia32_add_child( 114 118 device_t *parent, const char *name, const char *str_match_id, … … 136 140 add_match_id(&child->match_ids, match_id); 137 141 138 // add an interfaceto the device139 device_set_iface(child, HW_RES_DEV_IFACE, &child_res_iface);142 // set class to the device 143 child->class = &rootia32_child_class; 140 144 141 145 // register child device … … 181 185 } 182 186 187 static void root_ia32_init() { 188 // initialize child device class 189 rootia32_child_class.id = 0; // TODO 190 rootia32_child_class.interfaces[HW_RES_DEV_IFACE] = &child_res_iface; 191 } 192 183 193 int main(int argc, char *argv[]) 184 194 { 185 195 printf(NAME ": HelenOS root device driver\n"); 196 root_ia32_init(); 186 197 return driver_main(&rootia32_driver); 187 198 }
Note:
See TracChangeset
for help on using the changeset viewer.