how to write a user space driver?