There is an example of a custom device driver provided as part of the XSISDK installation. If you look under your %XSISDK%\examples\drivers folder, this example is provided as source code:
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License