gtpc2mj8 | C/C++ Language Support User's Guide |
To add a user-defined device driver to the system:
/**********************************************************************/ /* Declare the functions for the user-defined device driver. */ /**********************************************************************/ TPF_FSDD_APPEND new_device_driver_append_function; TPF_FSDD_CLOSE new_device driver_close_function; TPF_FSDD_GET new_device_driver_get_function; TPF_FSDD_OPEN new_device_driver_open_function; TPF_FSDD_PUT new_device_driver_put_function; TPF_FSDD_RESIZE new_device_driver_resize_function; TPF_FSDD_SIZE new_device_driver_size_function; TPF_FSDD_POLL new_device_driver_poll_function; TPF_FSDD_POLL_CLEAN new_device_driver_poll_clean_function; /**********************************************************************/ /* The following macro defines the initializer for the new struct */ /* tpf_spif entry in the UDDTBL device driver table. */ /**********************************************************************/ #define NEW_DEVICE_DRIVER_TABLE_ENTRY { \ new_device_driver_append_function, \ new_device driver_close_function, \ new_device_driver_get_function, \ new_device_driver_open_function, \ new_device_driver_put_function, \ new_device_driver_resize_function, \ new_device_driver_size_function \ new_device_driver_poll_function \ new_device_driver_poll_clean_function \ }
The device driver is now accessible to online load modules by opening the special files defined in step 7.