To support the increasing number of sensor devices with various characteristics and requirements, sensor network operating systems should provide an appropriate device driver model that can cover a wide range of device types. Unfortunately, current sensor network operating systems force the user to build complex drivers for even simple devices, provide restricted interfaces, or do not provide any mechanisms. We present a device driver model that is flexible enough to support both simple devices with simple drivers, and complex devices with portable and high-performance device drivers. Users can write a device driver for simple devices with only a few lines of code using the user-mode device driver. Devices that need highly efficient code or portability can be supported by a single-layer or 2-layer kernel-mode device driver. Moreover, shared access and power management can easily be included in the device driver using the device manager. We also provide guidelines for choosing a proper device driver model with concrete examples of real-world devices and support our claims through the evaluation of the device driver model using the RETOS kernel.