Floppy disk driver problem
Posted: Thu Jan 15, 2004 12:00 am
Some months ago I wrote some floppy disk routines with the follow services:
1) init() --> Initialize the floppy system.
2) motor_control() --> Turn on/off motor.
3) read_sector() --> Read one sector.
4) write_sector() --> Write one sector.
Now I am working in my Operating System 'File System' and I must use these routines, but I realize that is very tedious turn on/off the floppy motor each time I need read/write sectors (and it make my code some complex).
How must be handled the floppy motors?
It is right let the user turn on/off the floppy motors?
Is better let the floppy disk driver to do it?
Thank you very much,
pepito
(sorry my poor english)
1) init() --> Initialize the floppy system.
2) motor_control() --> Turn on/off motor.
3) read_sector() --> Read one sector.
4) write_sector() --> Write one sector.
Now I am working in my Operating System 'File System' and I must use these routines, but I realize that is very tedious turn on/off the floppy motor each time I need read/write sectors (and it make my code some complex).
How must be handled the floppy motors?
It is right let the user turn on/off the floppy motors?
Is better let the floppy disk driver to do it?
Thank you very much,
pepito
(sorry my poor english)