Thread View: alt.sys.amiga
1 messages
1 total messages
Started by Alexander Higginson
Fri, 01 Nov 1996 00:00
Switching off/on Hard Disk Motor(SCSI.device) in C
Author: Alexander Higginson
Date: Fri, 01 Nov 1996 00:00
Date: Fri, 01 Nov 1996 00:00
40 lines
2299 bytes
2299 bytes
Hello,
I am having a little problem with coding the hard disk motor in
C.
The problem is this: I can switch off the hard drive motor no problem.
I use the command CMD_STOP and the DIO (synchronous request). After
about a second control is returned to the program and the program exits.
However, what I would like to happen is for the hard disk to
automatically switch on again when a command (eg., list, copy, etc) is
sent.
When my C program stops the hard disk and exits, the hard disk refuses to
operate when you try to access the hard disk again, and the system brings
up an error requester asking me to insert
the hard disk in DH0: !! The only way to reset the hard disk to normal
is to reboot the computer.
I could of course use the CMD_START in my C code but this is not much
good if you are working from the shell and issue a dir command or load in
DPaint program.
I made the assumption that the drive would automatically switch itself
back on again. Obviously I've over looked something. But what?
Also when you issue the CMD_STOP does the hard disk automatically park
itself or do you have to tell the drive that you want this. The
automatic part feature is switch off in the HDToolBox utilities.(ie. 0)
Any sample C code would be welcome.
I am using an Amiga 500+ (release 2) WB2.04 with 4MB RAM (2MB Chip and 2MB
Fast) and a 250MB hard disk drive. I am using the SCSI engine. The name
of my hard disk device is 'oktagon.device' unit 0.
Thankyou,
Alexander P Higginson
a.higginson@dcs.napier.ac.uk
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads