MicrOS
|
#include "harddisk_ata.h"
Functions | |
uint64_t | __harddisk_ata_get_user_addressable_sectors (const harddisk_identify_device_data *data) |
Get user addressable sectors of hard disk. More... | |
uint64_t | __harddisk_ata_get_disk_space (const harddisk_identify_device_data *data) |
Get space of hard disk. More... | |
int8_t | __harddisk_ata_read_sector (HARDDISK_ATA_MASTER_SLAVE type, HARDDISK_ATA_BUS_TYPE bus, uint32_t high_lba, uint32_t low_lba, uint16_t *buffer) |
Reads hard disk sector. More... | |
int8_t | __harddisk_ata_write_sector (HARDDISK_ATA_MASTER_SLAVE type, HARDDISK_ATA_BUS_TYPE bus, uint32_t high_lba, uint32_t low_lba, uint16_t *buffer) |
Write hard disk sector. More... | |
int8_t | __harddisk_ata_poll (uint16_t port) |
Doing pooling. More... | |
uint64_t __harddisk_ata_get_disk_space | ( | const harddisk_identify_device_data * | data | ) |
Get space of hard disk.
data | Pointer to identify data of device. |
uint64_t __harddisk_ata_get_user_addressable_sectors | ( | const harddisk_identify_device_data * | data | ) |
Get user addressable sectors of hard disk.
data | Pointer to identify data of device. |
int8_t __harddisk_ata_poll | ( | uint16_t | port | ) |
Doing pooling.
Check if disk is ready.
port | Port for do delay. |
int8_t __harddisk_ata_read_sector | ( | HARDDISK_ATA_MASTER_SLAVE | type, |
HARDDISK_ATA_BUS_TYPE | bus, | ||
uint32_t | high_lba, | ||
uint32_t | low_lba, | ||
uint16_t * | buffer | ||
) |
Reads hard disk sector.
type | Type of harddisk. |
bus | Type of bus. |
high_lba | Higher bits of lba (24 bits are used). |
low_lba | Lower bits of lba (24 bits are used). |
buffer | Buffer of 256 16-bits values for store data. |
int8_t __harddisk_ata_write_sector | ( | HARDDISK_ATA_MASTER_SLAVE | type, |
HARDDISK_ATA_BUS_TYPE | bus, | ||
uint32_t | high_lba, | ||
uint32_t | low_lba, | ||
uint16_t * | buffer | ||
) |
Write hard disk sector.
type | Type of harddisk. |
bus | Type of bus. |
high_lba | Higher bits of lba (24 bits are used). |
low_lba | Lower bits of lba (24 bits are used). |
buffer | Buffer of 256 16-bits values for store data. |