Article View: alt.sys.amiga
Article #48Switching off/on Hard Disk Motor(SCSI.device) in C
From: 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
Technical Details
Message-ID:
<Pine.SOL.3.91.961101150615.8660A-100000@kronos>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10e72b,7c5ddfb71a5e1a5f,start X-Google-Attributes: gid10e72b,public X-Google-Thread: ffc26,7c5ddfb71a5e1a5f,start X-Google-Attributes: gidffc26,public X-Google-Thread: 105a8b,7c5ddfb71a5e1a5f,start X-Google-Attributes: gid105a8b,public From: Alexander Higginson <oose5009@kronos> Subject: Switching off/on Hard Disk Motor(SCSI.device) in C Date: 1996/11/01 Message-ID: <Pine.SOL.3.91.961101150615.8660A-100000@kronos> X-Deja-AN: 193788700 organization: Computer Studies, Napier University, Edinburgh content-type: TEXT/PLAIN; charset=US-ASCII mime-version: 1.0 newsgroups: alt.sys.amiga,bit.listserv.i-amiga,comp.sys.amiga.programmer