1
0
mirror of https://github.com/mist-devel/mist-firmware.git synced 2026-04-17 00:15:25 +00:00

Add ATA commands 21h,31h

This commit is contained in:
root
2023-10-08 17:23:30 -04:00
parent 2d1341160d
commit a948ab0252
2 changed files with 7 additions and 1 deletions

6
hdd.c
View File

@@ -1531,10 +1531,14 @@ void HandleHDD(unsigned char c1, unsigned char c2, unsigned char cs1ena)
ATA_SetMultipleMode(tfr, unit);
} else if (tfr[7] == ACMD_READ_SECTORS) {
ATA_ReadSectors(tfr, sector, cylinder, head, unit, sector_count, false, lbamode, false);
} else if (tfr[7] == ACMD_READ_SECTORS1) {
ATA_ReadSectors(tfr, sector, cylinder, head, unit, sector_count, false, lbamode, false);
} else if (tfr[7] == ACMD_READ_MULTIPLE) {
ATA_ReadSectors(tfr, sector, cylinder, head, unit, sector_count, true, lbamode, false);
} else if (tfr[7] == ACMD_WRITE_SECTORS) {
ATA_WriteSectors(tfr, sector, cylinder, head, unit, sector_count ,false, lbamode);
ATA_WriteSectors(tfr, sector, cylinder, head, unit, sector_count, false, lbamode);
} else if (tfr[7] == ACMD_WRITE_SECTORS1) {
ATA_WriteSectors(tfr, sector, cylinder, head, unit, sector_count, false, lbamode);
} else if (tfr[7] == ACMD_WRITE_MULTIPLE) {
ATA_WriteSectors(tfr, sector, cylinder, head, unit, sector_count, true, lbamode);
} else if (tfr[7] == ACMD_READ_VERIFY_SECTORS) {

2
hdd.h
View File

@@ -35,7 +35,9 @@
#define ACMD_IDENTIFY_DEVICE 0xEC
#define ACMD_INITIALIZE_DEVICE_PARAMETERS 0x91
#define ACMD_READ_SECTORS 0x20
#define ACMD_READ_SECTORS1 0x21
#define ACMD_WRITE_SECTORS 0x30
#define ACMD_WRITE_SECTORS1 0x31
#define ACMD_READ_VERIFY_SECTORS 0x40
#define ACMD_READ_MULTIPLE 0xC4
#define ACMD_WRITE_MULTIPLE 0xC5