FreeBSD Device Driver Writer's Guide : Supported Busses : ISA -- Industry Standard Architecture : Entry Points
Previous: Data Structures
Next: Header Files

3.1.2. Entry Points

3.1.2.1. probe()

probe() takes a struct isa_device pointer as an argument and returns an int. The return value is ``zero'' or ``non-zero'' as to the absence or presence of your device. This entry point may (and probably should) be declared as static because it is accessed via the probe member of the struct isa_driver structure. This function is intended to detect the presence of your device only; it should not do any configuration of the device itself.

3.1.2.2. attach()

attach() also takes a struct isa_device pointer as an argument and returns an int. The return value is also ``zero'' or ``non-zero'' indicating whether or not the attach was successful. This function is intended to do any special initialization of the device as well as confirm that the device is usable. It too should be declared static because it is accessed through the attach member of the isa_driver structure.


FreeBSD Device Driver Writer's Guide : Supported Busses : ISA -- Industry Standard Architecture : Entry Points
Previous: Data Structures
Next: Header Files
freebsd-questions@freebsd.org