MicrOS
harddisk_detection.c File Reference

Functions

int8_t __harddisk_check_presence (HARDDISK_ATA_MASTER_SLAVE type, HARDDISK_ATA_BUS_TYPE bus, harddisk_states *states)
 Check hard disk presence in computer. More...
 
int8_t __harddisk_get_identify_data (HARDDISK_ATA_MASTER_SLAVE type, HARDDISK_ATA_BUS_TYPE bus, harddisk_identify_device_data *data, uint8_t identify_command)
 Check hard disk presence in computer. More...
 

Function Documentation

◆ __harddisk_check_presence()

int8_t __harddisk_check_presence ( HARDDISK_ATA_MASTER_SLAVE  type,
HARDDISK_ATA_BUS_TYPE  bus,
harddisk_states states 
)

Check hard disk presence in computer.

Check if given hard disk is installed in computer.

Parameters
typeType of harddisk.
busType of bus.
statesPointer to struct where to put state of hard disk.
Returns
0 no disk, 1 disk present, -1 disk present but ERR set, -2 wrong parameters.

◆ __harddisk_get_identify_data()

int8_t __harddisk_get_identify_data ( HARDDISK_ATA_MASTER_SLAVE  type,
HARDDISK_ATA_BUS_TYPE  bus,
harddisk_identify_device_data data,
uint8_t  identify_command 
)

Check hard disk presence in computer.

Check if given hard disk is installed in computer.

Parameters
typeType of harddisk.
busType of bus.
dataHarddisk identify device data for current drive.
Returns
0 no disk, 1 disk present, -1 disk present but ERR set, -2 wrong parameters.