MicrOS
harddisk_io_control_status_register_fields Struct Reference

Hard disk I/O or Control based Status Register. More...

#include <harddisk_pio_mode_header.h>

Public Attributes

uint8_t error_occurred: 1
 Indicates an error occurred. Send a new command to clear it (or nuke it with a Software Reset). (short: ERR). More...
 
uint8_t index: 1
 Index. Always set to zero. (short: IDX). More...
 
uint8_t corrected_data: 1
 Corrected data. Always set to zero. (short: CORR). More...
 
uint8_t drive_ready: 1
 Set when the drive has PIO data to transfer, or is ready to accept PIO data. (short: DRQ). More...
 
uint8_t overlapped_mode_service_request: 1
 Overlapped Mode Service Request. (short: SRV). More...
 
uint8_t drive_fault_error: 1
 Drive Fault Error (does not set ERR). (short: DF). More...
 
uint8_t ready: 1
 Bit is clear when drive is spun down, or after an error. Set otherwise. (short: RDY). More...
 
uint8_t busy: 1
 Indicates the drive is preparing to send/receive data (wait for it to clear). In case of 'hang' (it never clears), do a software reset. (short: BSY). More...
 

Detailed Description

Hard disk I/O or Control based Status Register.

Struct used to read from Status Register of I/O or Control port. Used to select a drive and/or head. Supports extra address/flag bits. Technically, when BSY is set, the other bits in the Status byte are meaningless. It is also generally a Bad Idea to test the "Seek Complete" (DSC) bit, because it has been deprecated and replaced by the newer SRV bit. Reading the Device Control Register port gets you the value of the Alternate Status Register, instead. The value of Alternate Status is always the same as the Regular Status port, but reading the Alternate Status port does not affect interrupts.

Member Data Documentation

◆ busy

uint8_t harddisk_io_control_status_register_fields::busy

Indicates the drive is preparing to send/receive data (wait for it to clear). In case of 'hang' (it never clears), do a software reset. (short: BSY).

◆ corrected_data

uint8_t harddisk_io_control_status_register_fields::corrected_data

Corrected data. Always set to zero. (short: CORR).

◆ drive_fault_error

uint8_t harddisk_io_control_status_register_fields::drive_fault_error

Drive Fault Error (does not set ERR). (short: DF).

◆ drive_ready

uint8_t harddisk_io_control_status_register_fields::drive_ready

Set when the drive has PIO data to transfer, or is ready to accept PIO data. (short: DRQ).

◆ error_occurred

uint8_t harddisk_io_control_status_register_fields::error_occurred

Indicates an error occurred. Send a new command to clear it (or nuke it with a Software Reset). (short: ERR).

◆ index

uint8_t harddisk_io_control_status_register_fields::index

Index. Always set to zero. (short: IDX).

◆ overlapped_mode_service_request

uint8_t harddisk_io_control_status_register_fields::overlapped_mode_service_request

Overlapped Mode Service Request. (short: SRV).

◆ ready

uint8_t harddisk_io_control_status_register_fields::ready

Bit is clear when drive is spun down, or after an error. Set otherwise. (short: RDY).


The documentation for this struct was generated from the following file: