Writing device drivers