X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/202a8b1f31fa458e96ad7f20ae056d200b31b029..c4d08ac5260bb26db10bcfd9dc6fd2db60efebe9:/lunaix-os/includes/hal/ahci/ahci.h?ds=sidebyside diff --git a/lunaix-os/includes/hal/ahci/ahci.h b/lunaix-os/includes/hal/ahci/ahci.h index 0494181..c768510 100644 --- a/lunaix-os/includes/hal/ahci/ahci.h +++ b/lunaix-os/includes/hal/ahci/ahci.h @@ -1,6 +1,8 @@ #ifndef __LUNAIX_AHCI_H #define __LUNAIX_AHCI_H +#include "hba.h" + /* * Macro naming rule: * HBA_R[xxx] @@ -12,10 +14,6 @@ #define AHCI_HBA_CLASS 0x10601 -#define ATA_IDENTIFY_DEVICE 0xec -#define ATA_IDENTIFY_PAKCET_DEVICE 0xa1 -#define ATA_PACKET 0xa0 - /** * @brief 初始化AHCI与HBA * @@ -26,4 +24,19 @@ ahci_init(); void ahci_list_device(); +unsigned int +ahci_get_port_usage(); + +struct hba_port* +ahci_get_port(unsigned int index); + +void +ahci_parse_dev_info(struct hba_device* dev_info, uint16_t* data); + +void +ahci_parsestr(char* str, uint16_t* reg_start, int size_word); + +int +ahci_try_send(struct hba_port* port, int slot); + #endif /* __LUNAIX_AHCI_H */